/soc/2015/igor.gajowiak/chatlog: 1f313f8eef96: Fixed memory leaks.

Igor Gajowiak igor.gajowiak at gmail.com
Sat Aug 8 16:55:32 EDT 2015


Changeset: 1f313f8eef96ebbd748bd937165c88c8499bf568
Author:	 Igor Gajowiak <igor.gajowiak at gmail.com>
Date:	 2015-08-08 22:55 +0200
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/igor.gajowiak/chatlog/rev/1f313f8eef96

Description:

Fixed memory leaks.

diffstat:

 pidgin/gtkgenericlog.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (29 lines):

diff --git a/pidgin/gtkgenericlog.c b/pidgin/gtkgenericlog.c
--- a/pidgin/gtkgenericlog.c
+++ b/pidgin/gtkgenericlog.c
@@ -600,10 +600,8 @@ on_buddylist_row_changed(GtkTreeSelectio
 	if (gtk_tree_selection_get_selected(sel, &model, &row)) {
 		gtk_tree_model_get(model, &row, BLIST_TREE_STORE_COL_BUDDY, &buddy, -1);
 
-		if (buddy) {
-			g_object_ref(G_OBJECT(buddy));
+		if (buddy)
 			viewer->current_buddy = buddy;
-		}
 	}
 
 	update_menu_buttons(viewer);
@@ -889,8 +887,12 @@ on_calendar_row_changed(GtkTreeSelection
 	if (!gtk_tree_selection_get_selected(sel, &model, &row))
 		return;
 
+	GtkTreePath *path = gtk_tree_model_get_path(model, &row);
+	gint depth = gtk_tree_path_get_depth(path);
+	gtk_tree_path_free(path);
+
 	/* Row with year selected */
-	if (gtk_tree_path_get_depth(gtk_tree_model_get_path(model, &row)) == 1)
+	if (depth == 1)
 		return;
 
 	guint64 day;



More information about the Commits mailing list