diff options
author | Alan F <ajf@eth0.org.uk> | 2014-03-10 09:10:07 +0000 |
---|---|---|
committer | Alan F <ajf@eth0.org.uk> | 2014-03-10 09:10:07 +0000 |
commit | 118b702bec50d9872699357a379413f69e9b176e (patch) | |
tree | e5623aa1792773f5c92b14a2e6b0cea5f083b0c6 | |
parent | 56a60210894a344d66ec3c77f807c2867491f45d (diff) |
fix a memory leak found in new RSS window found by valgrind
-rw-r--r-- | src/trg-rss-window.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/trg-rss-window.c b/src/trg-rss-window.c index 64c1452..442cce9 100644 --- a/src/trg-rss-window.c +++ b/src/trg-rss-window.c @@ -100,15 +100,18 @@ static gboolean upload_complete_searchfunc(GtkTreeModel *model, gpointer data) { trg_upload *upload = (trg_upload*)data; gchar *item_guid = NULL; + gboolean stop = FALSE; gtk_tree_model_get(model, iter, RSSCOL_ID, &item_guid, -1); if (!g_strcmp0(item_guid, upload->uid)) { gtk_list_store_set(GTK_LIST_STORE(model), iter, RSSCOL_UPLOADED, TRUE, -1); - return TRUE; + stop = TRUE; } - return FALSE; + g_free(item_guid); + + return stop; } static gboolean on_upload_complete(gpointer data) { |