* 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 76d57ef..b0af50b 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
index d7b0319..1e57ec0 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 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
index 95c4db3..bbfd76d 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");
+                       g_free(file);
                        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");
+                       g_free(file);
                        return 0;
                }
                /* skip headers */
index 63c8ffb..3dab89a 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);
 }
 
-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;
-       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);
@@ -896,12 +896,15 @@ gint get_header_from_msginfo(MsgInfo *msginfo, gchar *buf, gint len,gchar *heade
                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);
+               g_free(file);
                return -1;
        }
+
+       g_free(file);
         if (val == -1)
                return -1;