X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=src%2Fplugins%2Fspamassassin%2Fspamassassin.c;h=9ac5dcf1d675de169afe3688aef6865921769d05;hp=94cce18fb4b38339eff4561992bcc100efff8b41;hb=b62ee0089f7236b42bb5a5a27cbdcc4e43bd8091;hpb=e64f72cf0705d5501a8f5586ff85419f27b3dec3 diff --git a/src/plugins/spamassassin/spamassassin.c b/src/plugins/spamassassin/spamassassin.c index 94cce18fb..9ac5dcf1d 100644 --- a/src/plugins/spamassassin/spamassassin.c +++ b/src/plugins/spamassassin/spamassassin.c @@ -346,13 +346,9 @@ int spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam) execute_command_line(tmpcmd, FALSE); g_free(tmpcmd); } - if (tmpfile != NULL) { - g_free(tmpfile); - } - } - if (spamc_wrapper != NULL) { - g_free(spamc_wrapper); + g_free(tmpfile); } + g_free(spamc_wrapper); return 0; } else { cmd = g_strdup_printf("sa-learn -u %s %s %s", @@ -372,9 +368,7 @@ int spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam) g_free(cmd); cmd = tmpcmd; } - if (tmpfile != NULL) { - g_free(tmpfile); - } + g_free(tmpfile); } } } @@ -385,9 +379,8 @@ int spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam) /* only run sync calls to sa-learn/spamc to prevent system lockdown */ execute_command_line(cmd, FALSE); g_free(cmd); - if (spamc_wrapper != NULL) { - g_free(spamc_wrapper); - } + g_free(spamc_wrapper); + return 0; }