[evolution-patches] 69757, small memleak in imap




? camel/c.diff
? camel/tests/folder/test10
? camel/tests/folder/test11
? camel/tests/message/test4
? camel/tests/mime-filter/test-tohtml
? camel/tests/misc/test2
? camel/tests/misc/url-scan
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/Attic/ChangeLog,v
retrieving revision 1.2251.2.36
diff -u -p -r1.2251.2.36 ChangeLog
--- camel/ChangeLog	31 Jan 2005 00:11:41 -0000	1.2251.2.36
+++ camel/ChangeLog	31 Jan 2005 03:44:48 -0000
@@ -1,3 +1,11 @@
+2005-01-31  Not Zed  <NotZed Ximian com>
+
+	** See bug #69757.
+	
+	* providers/imap/camel-imap-store.c (create_folder)
+	(parse_list_response_as_folder_info): free the
+	folder from parse_list_response.
+
 2005-01-28  Not Zed  <NotZed Ximian com>
 
 	** See bug #22496.
Index: camel/providers/imap/camel-imap-store.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/Attic/camel-imap-store.c,v
retrieving revision 1.300.2.6
diff -u -p -r1.300.2.6 camel-imap-store.c
--- camel/providers/imap/camel-imap-store.c	30 Nov 2004 07:56:07 -0000	1.300.2.6
+++ camel/providers/imap/camel-imap-store.c	31 Jan 2005 03:44:49 -0000
@@ -2300,7 +2300,7 @@ create_folder (CamelStore *store, const 
 	}
 	
 	/* FIXME: does not handle unexpected circumstances very well */
-	for (i = 0; i < response->untagged->len; i++) {
+	for (i = 0; i < response->untagged->len && !need_convert; i++) {
 		resp = response->untagged->pdata[i];
 		
 		if (!imap_parse_list_response (imap_store, resp, &flags, NULL, &thisone))
@@ -2309,8 +2309,9 @@ create_folder (CamelStore *store, const 
 		if (strcmp (thisone, parent_name) == 0) {
 			if (flags & CAMEL_FOLDER_NOINFERIORS)
 				need_convert = TRUE;
-			break;
 		}
+
+		g_free(thisone);
 	}
 	
 	camel_imap_response_free (imap_store, response);
@@ -2417,6 +2418,7 @@ parse_list_response_as_folder_info (Came
 	/* FIXME: should use imap_build_folder_info, note the differences with param setting tho */
 
 	si = camel_imap_store_summary_add_from_full(imap_store->summary, dir, sep?sep:'/');
+	g_free(dir);
 	if (si == NULL)
 		return NULL;
 


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