From e275eb54a06e46f76929e34e1c83bcc41d46c0fb Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 26 Oct 2019 20:02:33 +0100 Subject: [Minor] Fix error propagation --- src/libmime/mime_parser.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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); -- cgit v1.2.3