[evolution-patches] Small leak fixes



Hi,

Attached are some tiny patches to fix some small leaks:

eds-server-gconf-leak.diff -- src/offline-listener.c got a GconfValue
with gconf_client_get and didn't free the value.  Using
gconf_client_get_bool is easier and doesn't leak.

eds-sexp-leak.diff -- every time a search was done on the file backend
the sexp was leaked.

Ross
Index: src/offline-listener.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/src/offline-listener.c,v
retrieving revision 1.2
diff -u -r1.2 offline-listener.c
--- src/offline-listener.c	23 Dec 2004 17:45:16 -0000	1.2
+++ src/offline-listener.c	19 Apr 2005 16:20:59 -0000
@@ -94,11 +94,8 @@
 	priv->default_client = gconf_client_get_default ();
 	gconf_client_add_dir (priv->default_client, "/apps/evolution/shell", GCONF_CLIENT_PRELOAD_RECURSIVE,NULL);
 	gconf_client_notify_add (priv->default_client, "/apps/evolution/shell/start_offline", (GConfClientNotifyFunc)online_status_changed, offline_listener, NULL, NULL);
-	value = gconf_client_get (priv->default_client, "/apps/evolution/shell/start_offline", NULL);
-	priv->is_offline_now =  gconf_value_get_bool (value);
+	priv->is_offline_now = gconf_client_get_bool (priv->default_client, "/apps/evolution/shell/start_offline", NULL);
 	set_online_status (offline_listener, priv->is_offline_now); 
-	
-
 }
 
 OfflineListener*
Index: addressbook/backends/file/e-book-backend-file.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/file/e-book-backend-file.c,v
retrieving revision 1.30
diff -u -r1.30 e-book-backend-file.c
--- addressbook/backends/file/e-book-backend-file.c	14 Mar 2005 07:06:19 -0000	1.30
+++ addressbook/backends/file/e-book-backend-file.c	19 Apr 2005 16:21:26 -0000
@@ -445,6 +445,8 @@
 			db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
 
 		}
+		g_object_unref (card_sexp);
+		
 		status = db_error != DB_NOTFOUND
 			? GNOME_Evolution_Addressbook_OtherError
 			: GNOME_Evolution_Addressbook_Success;


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