Patch for a leak in gaimbuddies.c

Kjartan Maraas <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <1155813319.24205.0.camel@rivendell>
Another leak found by valgrind.

Cheers
Kjartan

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
gaimbuddies.c-leak.patch (text/x-patch, 1.3 KB)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/bbdb/ChangeLog,v
retrieving revision 1.28
diff -u -p -r1.28 ChangeLog
--- ChangeLog	17 Aug 2006 07:25:01 -0000	1.28
+++ ChangeLog	17 Aug 2006 11:13:56 -0000
@@ -1,5 +1,10 @@
 2006-08-17  Kjartan Maraas  <[email protected]>
 
+	* gaimbuddies.c: (bbdb_sync_buddy_list_check): Don't leak
+	the file path here.
+
+2006-08-17  Kjartan Maraas  <[email protected]>
+
 	* bbdb.c: (bbdb_open_addressbook),
 	(create_addressbook_option_menu): Plug a couple leaks.
 
Index: gaimbuddies.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/bbdb/gaimbuddies.c,v
retrieving revision 1.8
diff -u -p -r1.8 gaimbuddies.c
--- gaimbuddies.c	24 Jul 2006 13:06:20 -0000	1.8
+++ gaimbuddies.c	17 Aug 2006 11:13:56 -0000
@@ -92,9 +92,12 @@ bbdb_sync_buddy_list_check (void)
 
 	blist_path = g_build_path ("/", getenv ("HOME"), ".gaim/blist.xml", NULL);
 	if (stat (blist_path, &statbuf) < 0) {
+		g_free (blist_path);
 		g_object_unref (G_OBJECT (gconf));
 		return;
 	}
+
+	g_free (blist_path);
 
 	/* Reprocess the buddy list if it's been updated. */
 	last_sync_str = gconf_client_get_string (gconf, GCONF_KEY_GAIM_LAST_SYNC, NULL);
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.