Fix another leak in smime plugin (CID #1220437).
authorwwp <wwp@free.fr>
Fri, 13 Apr 2018 10:15:24 +0000 (12:15 +0200)
committerwwp <wwp@free.fr>
Fri, 13 Apr 2018 10:15:24 +0000 (12:15 +0200)
src/plugins/smime/smime.c

index 823ba373216bd0d95281f8f6a830ce85311a2020..93268a3ea7ef9aedc2f3caa97efc8f29d8caa930 100644 (file)
@@ -313,9 +313,11 @@ static gint smime_check_signature(MimeInfo *mimeinfo)
                                        }
                                }
                                g_node_prepend(parentinfo->node, decinfo->node);
+                               g_free(textstr);
                                return 0;
                        } else {
-                               g_free(textstr);
+                               if (textstr)
+                                       g_free(textstr);
                                return -1;
                        }
                }