2004-11-23 [colin] 0.9.12cvs158.9
authorColin Leroy <colin@colino.net>
Tue, 23 Nov 2004 11:02:29 +0000 (11:02 +0000)
committerColin Leroy <colin@colino.net>
Tue, 23 Nov 2004 11:02:29 +0000 (11:02 +0000)
* src/compose.c
Fix double-free when forwarding
* src/msgcache.c
Fix leak on error path

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/compose.c
src/msgcache.c

index de7b204..93c2b75 100644 (file)
@@ -1,3 +1,11 @@
+2004-11-23 [colin]     0.9.12cvs158.9
+
+       * src/compose.c
+               Fix double-free when forwarding
+       * src/msgcache.c
+               Fix leak on error path
+               
+
 2004-11-23 [colin]     0.9.12cvs158.8
 
        * src/compose.c
index 0b412b4..ac89bd3 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.70 -r 1.382.2.71 src/compose.c; ) > 0.9.12cvs158.6.patchset
 ( cvs diff -u -r 1.382.2.71 -r 1.382.2.72 src/compose.c; ) > 0.9.12cvs158.7.patchset
 ( cvs diff -u -r 1.382.2.72 -r 1.382.2.73 src/compose.c; ) > 0.9.12cvs158.8.patchset
+( cvs diff -u -r 1.382.2.73 -r 1.382.2.74 src/compose.c; cvs diff -u -r 1.16.2.9 -r 1.16.2.10 src/msgcache.c; ) > 0.9.12cvs158.9.patchset
index f96dc31..152d4f4 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=158
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.8
+EXTRA_GTK2_VERSION=.9
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 7e9fe88..c00aef4 100644 (file)
@@ -2220,7 +2220,7 @@ static void compose_attach_append(Compose *compose, const gchar *file,
 
                        msginfo = procheader_parse_file(file, flags, FALSE, FALSE);
                        if (msginfo && msginfo->subject)
-                               name = msginfo->subject;
+                               name = g_strdup(msginfo->subject);
                        else
                                name = g_path_get_basename(filename ? filename : file);
 
index 89b0c67..b4d8ef4 100644 (file)
@@ -487,17 +487,17 @@ MsgCache *msgcache_read_cache(FolderItem *item, const gchar *cache_file)
        fclose(fp);
        g_hash_table_thaw(cache->msgnum_table);
 
-       if(error) {
-               msgcache_destroy(cache);
-               return NULL;
-       }
-
        if (conv != NULL) {
                if (conv->free != NULL)
                        conv->free(conv);
                g_free(conv);
        }
 
+       if(error) {
+               msgcache_destroy(cache);
+               return NULL;
+       }
+
        cache->last_access = time(NULL);
 
        debug_print("done. (%d items read)\n", g_hash_table_size(cache->msgnum_table));