diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2012-03-21 00:01:58 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2012-03-21 16:18:09 +0800 |
commit | 8322393f79b67deeeb952216cb0de23aa2ed9138 (patch) | |
tree | 4a8aa2d542193f5333a01f09c4a995cb653b6958 /src | |
parent | dea0cd3eb1f325af336fa6e027fafb23b39bc194 (diff) | |
download | gsoc2013-epiphany-8322393f79b67deeeb952216cb0de23aa2ed9138.tar gsoc2013-epiphany-8322393f79b67deeeb952216cb0de23aa2ed9138.tar.gz gsoc2013-epiphany-8322393f79b67deeeb952216cb0de23aa2ed9138.tar.bz2 gsoc2013-epiphany-8322393f79b67deeeb952216cb0de23aa2ed9138.tar.lz gsoc2013-epiphany-8322393f79b67deeeb952216cb0de23aa2ed9138.tar.xz gsoc2013-epiphany-8322393f79b67deeeb952216cb0de23aa2ed9138.tar.zst gsoc2013-epiphany-8322393f79b67deeeb952216cb0de23aa2ed9138.zip |
ephy-completion-model: fix a few leaks
https://bugzilla.gnome.org/show_bug.cgi?id=672481
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-completion-model.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c index bea7776f0..efa5769f1 100644 --- a/src/ephy-completion-model.c +++ b/src/ephy-completion-model.c @@ -170,15 +170,18 @@ static void icon_loaded_cb (GObject *source, GAsyncResult *result, gpointer user_data) { GtkTreeIter iter; + GtkTreePath *path; IconLoadData *data = (IconLoadData *) user_data; GdkPixbuf *favicon = webkit_favicon_database_get_favicon_pixbuf_finish (webkit_get_favicon_database (), result, NULL); if (favicon) { /* The completion model might have changed its contents */ if (gtk_tree_row_reference_valid (data->row_reference)) { - gtk_tree_model_get_iter (GTK_TREE_MODEL (data->model), &iter, - gtk_tree_row_reference_get_path (data->row_reference)); + path = gtk_tree_row_reference_get_path (data->row_reference); + gtk_tree_model_get_iter (GTK_TREE_MODEL (data->model), &iter, path); gtk_list_store_set (data->model, &iter, EPHY_COMPLETION_FAVICON_COL, favicon, -1); + g_object_unref (favicon); + gtk_tree_path_free (path); } } @@ -211,6 +214,7 @@ set_row_in_model (EphyCompletionModel *model, int position, PotentialRow *row) FAVICON_SIZE, FAVICON_SIZE); if (favicon) { gtk_list_store_set (GTK_LIST_STORE (model), &iter, EPHY_COMPLETION_FAVICON_COL, favicon, -1); + g_object_unref (favicon); return; } |