From e43eb76abd043c5eb14240d808b66a6d07d4f1d2 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Fri, 24 Apr 2015 13:25:41 +0200 Subject: [PATCH] app-layer-stmp: simplify code Delete a only used once goto to a point where we only do a return. --- src/app-layer-smtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app-layer-smtp.c b/src/app-layer-smtp.c index db2dd651ca..ed034d4ed6 100644 --- a/src/app-layer-smtp.c +++ b/src/app-layer-smtp.c @@ -369,7 +369,7 @@ int SMTPProcessDataChunk(const uint8_t *chunk, uint32_t len, if (smtp_state->files_ts == NULL) { ret = MIME_DEC_ERR_MEM; SCLogError(SC_ERR_MEM_ALLOC, "Could not create file container"); - goto end; + SCReturnInt(ret); } } files = smtp_state->files_ts; @@ -451,7 +451,7 @@ int SMTPProcessDataChunk(const uint8_t *chunk, uint32_t len, if (files != NULL) { FilePrune(files); } -end: + SCReturnInt(ret); }