diff options
author | Milan Crha <mcrha@redhat.com> | 2012-07-21 00:13:49 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-07-21 00:14:38 +0800 |
commit | 84025c02ebe79b8477be528e37d48546b5370651 (patch) | |
tree | f6941ed9ee97ec73c4575d874d64c7439c3593c3 /mail/mail-send-recv.c | |
parent | 6edec8cefcffc5d46c63a0e0fa70be1fb4ed2926 (diff) | |
download | gsoc2013-evolution-84025c02ebe79b8477be528e37d48546b5370651.tar.gz gsoc2013-evolution-84025c02ebe79b8477be528e37d48546b5370651.tar.zst gsoc2013-evolution-84025c02ebe79b8477be528e37d48546b5370651.zip |
Fix few more memory leaks
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r-- | mail/mail-send-recv.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index a8bade95a1..0d2cc10d00 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -881,10 +881,21 @@ receive_done (gint still_more, /* remove/free this active download */ d(printf("%s: freeing info %p\n", G_STRFUNC, info)); - if (info->type == SEND_SEND) + if (info->type == SEND_SEND) { + gpointer key = NULL, value = NULL; + if (!g_hash_table_lookup_extended (info->data->active, SEND_URI_KEY, &key, &value)) + key = NULL; + g_hash_table_steal (info->data->active, SEND_URI_KEY); - else + g_free (key); + } else { + gpointer key = NULL, value = NULL; + if (!g_hash_table_lookup_extended (info->data->active, uid, &key, &value)) + key = NULL; + g_hash_table_steal (info->data->active, uid); + g_free (key); + } info->data->infos = g_list_remove (info->data->infos, info); if (g_hash_table_size (info->data->active) == 0) { |