From: Eric Leblond Date: Fri, 24 Apr 2015 11:25:41 +0000 (+0200) Subject: app-layer-stmp: simplify code X-Git-Tag: suricata-3.0RC1~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e43eb76abd043c5eb14240d808b66a6d07d4f1d2;p=thirdparty%2Fsuricata.git app-layer-stmp: simplify code Delete a only used once goto to a point where we only do a return. --- 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); }