From: Vsevolod Stakhov Date: Sat, 26 Oct 2019 19:02:33 +0000 (+0100) Subject: [Minor] Fix error propagation X-Git-Tag: 2.1~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e275eb54a06e46f76929e34e1c83bcc41d46c0fb;p=rspamd.git [Minor] Fix error propagation --- diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 21374e249..0b682879d 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -1382,6 +1382,10 @@ rspamd_mime_parse_message (struct rspamd_task *task, ret = rspamd_mime_parse_normal_part (task, npart, nst, err); } + if (ret != RSPAMD_MIME_PARSE_OK) { + return ret; + } + if (part && st->stack->len > 0) { /* Remove message part from the parent stack */ g_ptr_array_remove_index_fast (st->stack, st->stack->len - 1);