Free the EUri (#447749).
authorMatthew Barnes <mbarnes@redhat.com>
Fri, 15 Jun 2007 13:13:35 +0000 (13:13 +0000)
committerMatthew Barnes <mbarnes@src.gnome.org>
Fri, 15 Jun 2007 13:13:35 +0000 (13:13 +0000)
2007-06-15  Matthew Barnes  <mbarnes@redhat.com>

* e-passwords.c (ep_forget_password_keyring),
(ep_get_password_keyring): Free the EUri (#447749).

svn path=/trunk/; revision=7821

libedataserverui/ChangeLog
libedataserverui/e-passwords.c

index 4bf8385..7fbd803 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-15  Matthew Barnes  <mbarnes@redhat.com>
+
+       * e-passwords.c (ep_forget_password_keyring),
+       (ep_get_password_keyring): Free the EUri (#447749).
+
 2007-05-28  Pascal Terjan  <pterjan@linuxfr.org>
 
        * e-passwords.c (e_passwords_ask_password):
index 4ca4282..92eb807 100644 (file)
@@ -493,20 +493,14 @@ ep_forget_password_keyring (EPassMsg *msg)
                g_free (value);
        }
 
-       if (!uri->host && !uri->user) {
+       if (!uri->host && !uri->user)
                /* No need to remove from keyring for pass phrases */
-               if (!msg->noreply)
-                       e_msgport_reply(&msg->msg);
-               return;
-       }
+               goto exit;
        
        result = gnome_keyring_get_default_keyring_sync (&default_keyring);
        if (!default_keyring) {
-               if (gnome_keyring_create_sync ("default", NULL) != GNOME_KEYRING_RESULT_OK) {
-                               if (!msg->noreply)
-                                       e_msgport_reply(&msg->msg);
-                               return;
-               }
+               if (gnome_keyring_create_sync ("default", NULL) != GNOME_KEYRING_RESULT_OK)
+                       goto exit;
                default_keyring = g_strdup ("default");                 
        }
 
@@ -568,8 +562,11 @@ ep_forget_password_keyring (EPassMsg *msg)
        
        g_free (default_keyring);
 
+exit:
        if (!msg->noreply)
                e_msgport_reply(&msg->msg);
+
+       e_uri_free(uri);
 }
 #endif
 
@@ -682,6 +679,7 @@ ep_get_password_keyring (EPassMsg *msg)
                        }
                }
                
+               e_uri_free (uri);
        }
 
        if (!msg->noreply)