Bug #616318 - Don't use an unitialized key in folder_changed_remove_uid
authorClaudio Saavedra <csaavedra@igalia.com>
Tue, 27 Apr 2010 11:04:03 +0000 (13:04 +0200)
committerMilan Crha <mcrha@redhat.com>
Tue, 27 Apr 2010 11:04:03 +0000 (13:04 +0200)
If g_hash_table_lookup_extended() returns FALSE, then the oldkey
is unset, so don't use it to insert a new item in the hash table.

camel/camel-vee-folder.c

index 76ce2c1..533e4f5 100644 (file)
@@ -210,7 +210,7 @@ folder_changed_remove_uid (CamelFolder *sub, const gchar *uid, const gchar hash[
                                }
                        } else {
                                if (vee_folder_add_uid_test (folder_unmatched, sub, uid, hash))
-                                       camel_folder_change_info_add_uid (folder_unmatched->changes, oldkey);
+                                       camel_folder_change_info_add_uid (folder_unmatched->changes, vuid);
                        }
                } else {
                        if (g_hash_table_lookup_extended (unmatched_uids, vuid, (gpointer *)&oldkey, &oldval)) {