commit dc931c8e6e12f23756b04bbfb10e6951864924ec
parent 4f9c021852d069ba9281e60920887cb06083c8ae
Author: Michael Rasmussen <mir@datanom.net>
Date: Thu, 9 Sep 2021 23:36:22 +0200
Fix CID 1491376
Signed-off-by: Michael Rasmussen <mir@datanom.net>
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/procmime.c b/src/procmime.c
@@ -725,7 +725,8 @@ gint procmime_get_part(const gchar *outfile, MimeInfo *mimeinfo)
if (claws_fclose(outfp) == EOF) {
saved_errno = errno;
FILE_OP_ERROR(outfile, "claws_fclose");
- claws_unlink(outfile);
+ if (claws_unlink(outfile) < 0)
+ FILE_OP_ERROR(outfile, "claws_unlink");
return -(saved_errno);
}