diff options
author | Dan Winship <danw@src.gnome.org> | 2001-04-14 05:42:26 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-04-14 05:42:26 +0800 |
commit | 546128c8d99b1edd859ba5d8b57549550b910a1d (patch) | |
tree | a9301a7dcae33f7c79d9a19f734e5ecc02c67966 /mail/session.c | |
parent | 044fde0583993fae3ec3c511ac0a5058c5745302 (diff) | |
download | gsoc2013-evolution-546128c8d99b1edd859ba5d8b57549550b910a1d.tar.gz gsoc2013-evolution-546128c8d99b1edd859ba5d8b57549550b910a1d.tar.zst gsoc2013-evolution-546128c8d99b1edd859ba5d8b57549550b910a1d.zip |
Remove some redundant LIBS variables... purify complained that the command
* Makefile.am (evolution_mail_LDADD): Remove some redundant LIBS
variables... purify complained that the command line was too
long. :-}
* mail-account-gui.c: Plug leaks.
* mail-display.c (on_url_requested): close the html stream on
error too.
* mail-ops.c (fetch_mail_fetch): Move a line around that probably
doesn't affect anything, but it's correct.
* session.c (auth_callback): Plug leak.
* mail-send-recv.c (receive_status): Initialize "now".
svn path=/trunk/; revision=9303
Diffstat (limited to 'mail/session.c')
-rw-r--r-- | mail/session.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/mail/session.c b/mail/session.c index 28694f39a1..42125c7b04 100644 --- a/mail/session.c +++ b/mail/session.c @@ -124,6 +124,7 @@ auth_callback (CamelAuthCallbackMode mode, char *data, gboolean secret, { char *key, *ans, *url; gboolean accept; + gpointer old_key, old_data; if (service) { url = camel_url_to_string (service->url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS); @@ -134,20 +135,18 @@ auth_callback (CamelAuthCallbackMode mode, char *data, gboolean secret, switch (mode) { case CAMEL_AUTHENTICATOR_TELL: + if (g_hash_table_lookup_extended (passwords, key, + &old_key, &old_data)) { + g_free (old_data); + g_free (key); + key = old_key; + } + if (!data) { g_hash_table_remove (passwords, key); g_free (key); } else { - gpointer old_key, old_data; - - if (g_hash_table_lookup_extended (passwords, key, - &old_key, - &old_data)) { - g_hash_table_insert (passwords, old_key, data); - g_free (old_data); - g_free (key); - } else - g_hash_table_insert (passwords, key, data); + g_hash_table_insert (passwords, key, data); } return NULL; |