[evolution-data-server/gnome-2-32] Bug #628655 - imapx parser thread gerror memory leak



commit f95b430bd0c8696eab54d99d006ab9373a9a95b7
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 29 11:49:25 2010 +0200

    Bug #628655 - imapx parser thread gerror memory leak

 camel/providers/imapx/camel-imapx-server.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 3bc67f2..6aa59fc 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -4413,12 +4413,17 @@ imapx_command_sync_changes_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 	   if it isn't, i guess we'll fix up next refresh */
 
 	if (ic->error != NULL || ic->status->result != IMAPX_OK) {
-		if (ic->error == NULL)
-			g_set_error (
-				&job->error, CAMEL_IMAPX_ERROR, 1,
-				"Error syncing changes: %s", ic->status->text);
-		else
-			g_propagate_error (&job->error, ic->error);
+		if (!job->error) {
+			if (ic->error == NULL)
+				g_set_error (
+					&job->error, CAMEL_IMAPX_ERROR, 1,
+					"Error syncing changes: %s", ic->status->text);
+			else
+				g_propagate_error (&job->error, ic->error);
+		} else if (ic->error) {
+			g_clear_error (&ic->error);
+		}
+
 		failed = TRUE;
 	}
 



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