[evolution-patches] Patch for a leak in gaimbuddies.c



Another leak found by valgrind.

Cheers
Kjartan
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  <kmaraas gnome org>
 
+	* gaimbuddies.c: (bbdb_sync_buddy_list_check): Don't leak
+	the file path here.
+
+2006-08-17  Kjartan Maraas  <kmaraas gnome org>
+
 	* 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);


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