* src/procmime.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 9 Nov 2003 12:43:12 +0000 (12:43 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 9 Nov 2003 12:43:12 +0000 (12:43 +0000)
plug leak

ChangeLog.claws
configure.ac
src/procmime.c

index 88efab4..3445cdb 100644 (file)
@@ -1,4 +1,10 @@
+2003-11-09 [alfons]    0.9.6claws70
+
+       * src/procmime.c
+               plug leak
+
 2003-11-08 [luke]      0.9.6claws69
 2003-11-08 [luke]      0.9.6claws69
+
        * src/summaryview.c
                 fix some typos
 
        * src/summaryview.c
                 fix some typos
 
@@ -10,6 +16,7 @@
                 "save all" now only saves attachments with names/filenames
 
 2003-11-04 [match]     0.9.6claws68
                 "save all" now only saves attachments with names/filenames
 
 2003-11-04 [match]     0.9.6claws68
+
        * src/ldapctrl.[ch]
                fix broken LDAP support.
 
        * src/ldapctrl.[ch]
                fix broken LDAP support.
 
@@ -17,6 +24,7 @@
                remove printf's.
 
 2003-11-04 [luke]      0.9.6claws67
                remove printf's.
 
 2003-11-04 [luke]      0.9.6claws67
+
         * src/mimeview.c
                 o  fixed bug 4 "focus lost on messages with attachments"
                 o  fixed 'Save all' attachments for new mime changes
         * src/mimeview.c
                 o  fixed bug 4 "focus lost on messages with attachments"
                 o  fixed 'Save all' attachments for new mime changes
@@ -38,6 +46,7 @@
                 to cause problems if you tried to redefine the shortcuts)
 
 2003-11-04 [luke]      0.9.6claws66
                 to cause problems if you tried to redefine the shortcuts)
 
 2003-11-04 [luke]      0.9.6claws66
+
         * src/plugins/image_viewer/viewer.c
        * src/plugins/image_viewer/viewerprefs.c
        * src/plugins/image_viewer/viewerprefs.glade
         * src/plugins/image_viewer/viewer.c
        * src/plugins/image_viewer/viewerprefs.c
        * src/plugins/image_viewer/viewerprefs.glade
index 9d1553e..bb25fa2 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=69
+EXTRA_VERSION=70
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 0172a87..42b580f 100644 (file)
@@ -998,13 +998,13 @@ void procmime_parse_multipart(MimeInfo *mimeinfo)
        FILE *fp;
 
        boundary = g_hash_table_lookup(mimeinfo->parameters, "boundary");
        FILE *fp;
 
        boundary = g_hash_table_lookup(mimeinfo->parameters, "boundary");
-       if(!boundary)
+       if (!boundary)
                return;
        boundary_len = strlen(boundary);
 
                return;
        boundary_len = strlen(boundary);
 
-       if(mimeinfo->encoding_type != ENC_BINARY && 
-          mimeinfo->encoding_type != ENC_7BIT && 
-          mimeinfo->encoding_type != ENC_8BIT)
+       if (mimeinfo->encoding_type != ENC_BINARY && 
+           mimeinfo->encoding_type != ENC_7BIT && 
+           mimeinfo->encoding_type != ENC_8BIT)
                procmime_decode_content(mimeinfo);
 
        fp = fopen(mimeinfo->filename, "rb");
                procmime_decode_content(mimeinfo);
 
        fp = fopen(mimeinfo->filename, "rb");
@@ -1014,7 +1014,7 @@ void procmime_parse_multipart(MimeInfo *mimeinfo)
                        break;
 
                if (IS_BOUNDARY(buf, boundary, boundary_len)) {
                        break;
 
                if (IS_BOUNDARY(buf, boundary, boundary_len)) {
-                       if(lastoffset != -1) {
+                       if (lastoffset != -1) {
                                procmime_parse_mimepart(mimeinfo,
                                                        hentry[0].body, hentry[1].body,
                                                        hentry[2].body, hentry[3].body, 
                                procmime_parse_mimepart(mimeinfo,
                                                        hentry[0].body, hentry[1].body,
                                                        hentry[2].body, hentry[3].body, 
@@ -1034,6 +1034,10 @@ void procmime_parse_multipart(MimeInfo *mimeinfo)
                        lastoffset = ftell(fp);
                }
        }
                        lastoffset = ftell(fp);
                }
        }
+       for (i = 0; i < 4; i++) {
+               g_free(hentry[i].body);
+               hentry[i].body = NULL;
+       }
        fclose(fp);
 }
 
        fclose(fp);
 }