Fix big leak on mimeinfo freeing
authorColin Leroy <colin@colino.net>
Sat, 6 Oct 2018 10:43:31 +0000 (12:43 +0200)
committerColin Leroy <colin@colino.net>
Sat, 6 Oct 2018 10:43:31 +0000 (12:43 +0200)
src/procmime.c

index f53e530..da81590 100644 (file)
@@ -138,6 +138,8 @@ static gboolean free_func(GNode *node, gpointer data)
        if (mimeinfo->privacy)
                privacy_free_privacydata(mimeinfo->privacy);
 
        if (mimeinfo->privacy)
                privacy_free_privacydata(mimeinfo->privacy);
 
+       g_free(mimeinfo);
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -154,7 +156,6 @@ void procmime_mimeinfo_free_all(MimeInfo **mimeinfo_ptr)
 
        g_node_destroy(node);
 
 
        g_node_destroy(node);
 
-       g_free(mimeinfo);
        *mimeinfo_ptr = NULL;
 }
 
        *mimeinfo_ptr = NULL;
 }