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

Igor Gajowiak <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 1f313f8eef96ebbd748bd937165c88c8499bf568
Author:	 Igor Gajowiak <[email protected]>
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;

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.