diff options
author | Not Zed <NotZed@Ximian.com> | 2002-10-25 14:19:07 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-10-25 14:19:07 +0800 |
commit | 56c3d9cb4ccc9fde4afc5b764a4a3ceb4acd8d85 (patch) | |
tree | 000e6e6ca61956277817d7c5ea35fcb914c77412 /mail | |
parent | cd0daad88d1624b136a5654068e7d782f756dd3c (diff) | |
download | gsoc2013-evolution-56c3d9cb4ccc9fde4afc5b764a4a3ceb4acd8d85.tar.gz gsoc2013-evolution-56c3d9cb4ccc9fde4afc5b764a4a3ceb4acd8d85.tar.zst gsoc2013-evolution-56c3d9cb4ccc9fde4afc5b764a4a3ceb4acd8d85.zip |
Always strdup the new key in the threaded/preview hash/always free the
2002-10-25 Not Zed <NotZed@Ximian.com>
* mail-config.c (mail_config_uri_renamed): Always strdup the new
key in the threaded/preview hash/always free the working copy.
For #32799.
svn path=/trunk/; revision=18431
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/mail-config.c | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 4e8ed653f8..d35c7c4e3d 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2002-10-25 Not Zed <NotZed@Ximian.com> + + * mail-config.c (mail_config_uri_renamed): Always strdup the new + key in the threaded/preview hash/always free the working copy. + For #32799. + 2002-10-24 Jeffrey Stedfast <fejj@ximian.com> * mail-display.c (write_data_to_file): Use the mode 0666 when diff --git a/mail/mail-config.c b/mail/mail-config.c index 58a7a111e3..fda1d257eb 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -2188,7 +2188,7 @@ mail_config_uri_renamed(GCompareFunc uri_cmp, const char *old, const char *new) if (g_hash_table_lookup_extended (config->threaded_hash, oldkey, &hashkey, &val)) { /*printf ("changing key in threaded_hash\n");*/ g_hash_table_remove (config->threaded_hash, hashkey); - g_hash_table_insert (config->threaded_hash, newkey, val); + g_hash_table_insert (config->threaded_hash, g_strdup(newkey), val); work = 2; } @@ -2197,13 +2197,12 @@ mail_config_uri_renamed(GCompareFunc uri_cmp, const char *old, const char *new) if (g_hash_table_lookup_extended (config->preview_hash, oldkey, &hashkey, &val)) { /*printf ("changing key in preview_hash\n");*/ g_hash_table_remove (config->preview_hash, hashkey); - g_hash_table_insert (config->preview_hash, newkey, val); + g_hash_table_insert (config->preview_hash, g_strdup(newkey), val); work = 2; } g_free (oldkey); - if (work != 2) - g_free (newkey); + g_free (newkey); /* ignore return values or if the files exist or * not, doesn't matter */ |