From 85fd237f28e4d9c85470e051923fcd7b59b164f5 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 1 May 2011 18:50:25 +0200 Subject: [PATCH] Release references to icons in completion --- midori/midori-locationaction.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c index b56fb77b..36c4baec 100644 --- a/midori/midori-locationaction.c +++ b/midori/midori-locationaction.c @@ -468,7 +468,7 @@ midori_location_action_popup_timeout_cb (gpointer data) const unsigned char* title = sqlite3_column_text (stmt, 2); GdkPixbuf* icon = katze_load_cached_icon ((gchar*)uri, NULL); if (!icon) - icon = action->default_icon; + icon = g_object_ref (action->default_icon); if (type == 1 /* history_view */) { gtk_list_store_insert_with_values (store, NULL, matches, @@ -483,6 +483,8 @@ midori_location_action_popup_timeout_cb (gpointer data) STYLE_COL, 1, FAVICON_COL, icon, -1); g_free (search_title); } + if (icon != NULL) + g_object_unref (icon); matches++; result = sqlite3_step (stmt); @@ -509,6 +511,8 @@ midori_location_action_popup_timeout_cb (gpointer data) STYLE_COL, 1, FAVICON_COL, icon, -1); g_free (uri); g_free (title); + if (icon != NULL) + g_object_unref (icon); i++; } searches += i; -- 2.39.5