Fix a leak, CID #1220437.
authorwwp <wwp@free.fr>
Wed, 11 Apr 2018 07:40:05 +0000 (09:40 +0200)
committerwwp <wwp@free.fr>
Wed, 11 Apr 2018 07:40:05 +0000 (09:40 +0200)
src/plugins/smime/smime.c

index 7e3af5ede7f2ea216f5c542544e1c2f6162ae682..823ba373216bd0d95281f8f6a830ce85311a2020 100644 (file)
@@ -290,8 +290,10 @@ static gint smime_check_signature(MimeInfo *mimeinfo)
                                decinfo = g_node_first_child(newinfo->node) != NULL ?
                                        g_node_first_child(newinfo->node)->data : NULL;
 
-                               if (decinfo == NULL)
+                               if (decinfo == NULL) {
+                                       g_free(textstr);
                                        return -1;
+                               }
 
                                g_node_unlink(decinfo->node);
                                procmime_mimeinfo_free_all(&newinfo);