diff options
author | Dan Winship <danw@src.gnome.org> | 2001-04-14 05:36:09 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-04-14 05:36:09 +0800 |
commit | 044fde0583993fae3ec3c511ac0a5058c5745302 (patch) | |
tree | 4d60e4dc752d79d4477c80f9d5897e6e8970baed /camel/camel-uid-cache.c | |
parent | daea2fb545d62492d6b202adda8bdf52f08205eb (diff) | |
download | gsoc2013-evolution-044fde0583993fae3ec3c511ac0a5058c5745302.tar gsoc2013-evolution-044fde0583993fae3ec3c511ac0a5058c5745302.tar.gz gsoc2013-evolution-044fde0583993fae3ec3c511ac0a5058c5745302.tar.bz2 gsoc2013-evolution-044fde0583993fae3ec3c511ac0a5058c5745302.tar.lz gsoc2013-evolution-044fde0583993fae3ec3c511ac0a5058c5745302.tar.xz gsoc2013-evolution-044fde0583993fae3ec3c511ac0a5058c5745302.tar.zst gsoc2013-evolution-044fde0583993fae3ec3c511ac0a5058c5745302.zip |
Plug leaks.
* camel-object.c (camel_object_hook_event):
* camel-uid-cache.c (camel_uid_cache_get_new_uids):
* camel-url.c (camel_url_new_with_base): Plug leaks.
* camel-remote-store.c (camel_remote_store_init): Don't
re-initialize the folders hash table.
* providers/imap/camel-imap-store.c (imap_disconnect): Free
authtypes since they'll be re-read on re-connect.
(get_folder_info): Free folderinfos that we're discarding from the
list.
svn path=/trunk/; revision=9302
Diffstat (limited to 'camel/camel-uid-cache.c')
-rw-r--r-- | camel/camel-uid-cache.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/camel/camel-uid-cache.c b/camel/camel-uid-cache.c index 0997e9a6a7..fcea86f608 100644 --- a/camel/camel-uid-cache.c +++ b/camel/camel-uid-cache.c @@ -153,6 +153,7 @@ GPtrArray * camel_uid_cache_get_new_uids (CamelUIDCache *cache, GPtrArray *uids) { GPtrArray *new_uids; + gpointer old_uid, old_level; char *uid; int i; @@ -161,9 +162,11 @@ camel_uid_cache_get_new_uids (CamelUIDCache *cache, GPtrArray *uids) for (i = 0; i < uids->len; i++) { uid = uids->pdata[i]; - if (g_hash_table_lookup (cache->uids, uid)) + if (g_hash_table_lookup_extended (cache->uids, uid, + &old_uid, &old_level)) { g_hash_table_remove (cache->uids, uid); - else + g_free (old_uid); + } else g_ptr_array_add (new_uids, g_strdup (uid)); g_hash_table_insert (cache->uids, g_strdup (uid), GINT_TO_POINTER (cache->level)); |