[anjuta] sourceview: Fix leak of list of GtkSourceCompletionItem.



commit caf43b25042a7f1fc46ad9cb74d0cee8ffa2abb6
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Sun Jan 13 18:36:19 2013 +0100

    sourceview: Fix leak of list of GtkSourceCompletionItem.
    
    gtk_source_completion_context_add_proposals() doesn't take ownership of
    the list so we have to free it and unref the items.

 plugins/sourceview/sourceview.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/plugins/sourceview/sourceview.c b/plugins/sourceview/sourceview.c
index 31ab768..623fcd3 100644
--- a/plugins/sourceview/sourceview.c
+++ b/plugins/sourceview/sourceview.c
@@ -2382,6 +2382,7 @@ iassist_proposals(IAnjutaEditorAssist* iassist,
 			}
 			gtk_source_completion_context_add_proposals (prov->context, GTK_SOURCE_COMPLETION_PROVIDER(prov),
 			                                             items, finished);
+			g_list_free_full (items, g_object_unref);
 			break;
 		}
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]