Fixed two memory leaks around procheader_get_one_field().
[claws.git] / src / procheader.c
index 327774009370f6d0200eb76cde399b4049eb7fc5..6d5132d5a731c43642c4e8a9a3b4a2d9c8b27ee2 100644 (file)
@@ -574,8 +574,11 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
                        if ((!strncmp(buf, "X-Claws-End-Special-Headers: 1",
                                strlen("X-Claws-End-Special-Headers:"))) ||
                            (!strncmp(buf, "X-Sylpheed-End-Special-Headers: 1",
-                               strlen("X-Sylpheed-End-Special-Headers:"))))
+                               strlen("X-Sylpheed-End-Special-Headers:")))) {
+                               g_free(buf);
+                               buf = NULL;
                                break;
+                       }
                        /* from other mailers */
                        if (!strncmp(buf, "Date: ", 6)
                        ||  !strncmp(buf, "To: ", 4)