* src/procmsg.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 22 Sep 2002 00:06:59 +0000 (00:06 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 22 Sep 2002 00:06:59 +0000 (00:06 +0000)
* src/pgptext.c
no furry valgrinds have been used to plug these memleaks

ChangeLog.claws
configure.in
src/pgptext.c
src/procheader.c

index 76d57efa68101acb24a8feb21b07b6f65acf297a..b0af50b57dab6cb040ccb3d263a5ea8532be661b 100644 (file)
@@ -1,3 +1,9 @@
+2002-09-22 [alfons]    0.8.2claws65
+
+       * src/procmsg.c
+       * src/pgptext.c
+               no furry valgrinds have been used to plug these memleaks
+
 2002-09-20 [paul]      0.8.2claws64
 
        * sync with 0.8.3cvs4
 2002-09-20 [paul]      0.8.2claws64
 
        * sync with 0.8.3cvs4
index d7b0319b2adeac8f9aa9a2317fc02a4ec8c3208f..1e57ec0ca6f6af33b8df9b1f249e4f8538bd9699 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws64
+EXTRA_VERSION=claws65
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 95c4db3d7f073c8fbe0fdadf8754a7563e01f59c..bbfd76ded7f0a079d409fe529a68a54c738eeb1d 100644 (file)
@@ -199,6 +199,7 @@ int pgptext_is_encrypted (MimeInfo *mimeinfo, MsgInfo *msginfo)
        if (mimeinfo->mime_type != MIME_TEXT) {
                if ((fp = fopen(file, "rb")) == NULL) {
                        FILE_OP_ERROR(file, "fopen");
        if (mimeinfo->mime_type != MIME_TEXT) {
                if ((fp = fopen(file, "rb")) == NULL) {
                        FILE_OP_ERROR(file, "fopen");
+                       g_free(file);
                        return 0;
                }
                /* skip headers */
                        return 0;
                }
                /* skip headers */
@@ -224,6 +225,7 @@ int pgptext_is_encrypted (MimeInfo *mimeinfo, MsgInfo *msginfo)
        } else {
                if ((fp = fopen(file, "rb")) == NULL) {
                        FILE_OP_ERROR(file, "fopen");
        } else {
                if ((fp = fopen(file, "rb")) == NULL) {
                        FILE_OP_ERROR(file, "fopen");
+                       g_free(file);
                        return 0;
                }
                /* skip headers */
                        return 0;
                }
                /* skip headers */
index 63c8ffbb3e50d16114d4549ff79cf4ea0f7599e7..3dab89adb98b5110bfd55ef29eae7d3fecad463d 100644 (file)
@@ -881,12 +881,12 @@ void procheader_date_get_localtime(gchar *dest, gint len, const time_t timer)
                strftime(dest, len, default_format, lt);
 }
 
                strftime(dest, len, default_format, lt);
 }
 
-gint get_header_from_msginfo(MsgInfo *msginfo, gchar *buf, gint len,gchar *header)
+gint get_header_from_msginfo(MsgInfo *msginfo, gchar *buf, gint len, gchar *header)
 {
        gchar *file;
        FILE *fp;
 {
        gchar *file;
        FILE *fp;
-       HeaderEntry hentry[]={{header,NULL,TRUE},
-                              {NULL,NULL,FALSE}};
+       HeaderEntry hentry[]={ { header, NULL, TRUE  },
+                               { NULL,   NULL, FALSE } };
        gint val;
        
        g_return_val_if_fail(msginfo != NULL, -1);
        gint val;
        
        g_return_val_if_fail(msginfo != NULL, -1);
@@ -896,12 +896,15 @@ gint get_header_from_msginfo(MsgInfo *msginfo, gchar *buf, gint len,gchar *heade
                g_free(file);
                return -1;
        }
                g_free(file);
                return -1;
        }
-       val=procheader_get_one_field(buf,len, fp, hentry);
+       val = procheader_get_one_field(buf,len, fp, hentry);
        if (fclose(fp) == EOF) {
                FILE_OP_ERROR(file, "fclose");
                unlink(file);
        if (fclose(fp) == EOF) {
                FILE_OP_ERROR(file, "fclose");
                unlink(file);
+               g_free(file);
                return -1;
        }
                return -1;
        }
+
+       g_free(file);
         if (val == -1)
                return -1;
 
         if (val == -1)
                return -1;