[gyrus] Fix a leak



commit 6f5bd4ded528ec6f685c459493ae687a320b3e49
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Wed Dec 29 01:40:53 2010 +0200

    Fix a leak

 src/gyrus-admin-mailbox.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gyrus-admin-mailbox.c b/src/gyrus-admin-mailbox.c
index 5a92056..05eab8d 100644
--- a/src/gyrus-admin-mailbox.c
+++ b/src/gyrus-admin-mailbox.c
@@ -361,6 +361,7 @@ gyrus_admin_mailbox_new (GyrusAdmin *admin, const gchar *mailbox,
 		g_free (msg);
 		*error = g_strdup (_("Unable to create the mailbox. "
 				     "Are you sure do you have the appropriate permissions?"));
+		g_free (new_mailbox);
 		return FALSE;
 	}
 
@@ -371,9 +372,12 @@ gyrus_admin_mailbox_new (GyrusAdmin *admin, const gchar *mailbox,
 						    quota)) {
 			*error = g_strdup (_("Mailbox created, "
 					     "but could not set quota."));
+			g_free (new_mailbox);
 			return FALSE;
 		}
 	}
+
+	g_free (new_mailbox);
 	return TRUE;
 }
 



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