[gitg] Fix memory leak



commit 8acc0aab8ee87095f97146b5f819ff039d7cbc54
Author: Guilhem Bonnefille <guilhem bonnefille gmail com>
Date:   Sun Apr 26 11:13:05 2009 +0200

    Fix memory leak

 gitg/gitg-revision-tree-view.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gitg/gitg-revision-tree-view.c b/gitg/gitg-revision-tree-view.c
index 19d1ec7..59e5d47 100644
--- a/gitg/gitg-revision-tree-view.c
+++ b/gitg/gitg-revision-tree-view.c
@@ -276,9 +276,11 @@ export_drag_files(GitgRevisionTreeView *tree_view)
 
 	GList *rows = gtk_tree_selection_get_selected_rows(selection, &model);
 	gint num = g_list_length(rows);
-
-	if (num == 0)
+	
+	if (num == 0) {
+		g_list_free(rows);
 		return;
+	}
 
 	GList *item;
 



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