[evolution-data-server] Bug #620815 - Memory leaks with Evolution



commit 4b9c37c1bf5721126fe665739dfbf89dfeec5423
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jun 24 20:42:16 2010 +0200

    Bug #620815 - Memory leaks with Evolution

 libedataserverui/e-book-auth-util.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/libedataserverui/e-book-auth-util.c b/libedataserverui/e-book-auth-util.c
index b5d2ff0..e8e6166 100644
--- a/libedataserverui/e-book-auth-util.c
+++ b/libedataserverui/e-book-auth-util.c
@@ -153,10 +153,9 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
 	const gchar *auth;
 	const gchar *user;
 	const gchar *component_name;
-	const gchar *password     = NULL;
-	gchar *pass_dup           = NULL;
-	const gchar *uri               = e_book_get_uri (book);
-        gchar *stripped_uri      = remove_parameters_from_uri (uri);
+	gchar *password = NULL;
+	const gchar *uri = e_book_get_uri (book);
+        gchar *stripped_uri = remove_parameters_from_uri (uri);
 	const gchar *auth_domain = e_source_get_property (source, "auth-domain");
 
 	component_name = auth_domain ? auth_domain : "Addressbook";
@@ -203,7 +202,7 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
 		g_free (password_prompt);
 
 		remember = get_remember_password (source);
-		pass_dup = e_passwords_ask_password (prompt, component_name, uri, prompt,
+		password = e_passwords_ask_password (prompt, component_name, uri, prompt,
 						     flags, &remember,
 						     NULL);
 		if (remember != get_remember_password (source))
@@ -212,11 +211,11 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
 		g_free (prompt);
 	}
 
-	if (password || pass_dup) {
-		e_book_async_authenticate_user (book, user, password ? password : pass_dup,
+	if (password) {
+		e_book_async_authenticate_user (book, user, password,
 						e_source_get_property (source, "auth"),
 						cb, closure);
-		g_free (pass_dup);
+		g_free (password);
 	}
 	else {
 		/* they hit cancel */



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