From: Victor Julien Date: Mon, 9 Feb 2015 07:35:30 +0000 (+0100) Subject: output/tx: bail early if no flow X-Git-Tag: suricata-6.0.0-beta1~835 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=284c3cf68a2734400120954a7c60ff28cd3a3172;p=thirdparty%2Fsuricata.git output/tx: bail early if no flow --- diff --git a/src/output-tx.c b/src/output-tx.c index c893893fbc..edb198ad97 100644 --- a/src/output-tx.c +++ b/src/output-tx.c @@ -135,14 +135,15 @@ int OutputRegisterTxLogger(LoggerId id, const char *name, AppProto alproto, static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data) { DEBUG_VALIDATE_BUG_ON(thread_data == NULL); + if (p->flow == NULL) + return TM_ECODE_OK; + if (list == NULL) { /* No child loggers registered. */ return TM_ECODE_OK; } OutputLoggerThreadData *op_thread_data = (OutputLoggerThreadData *)thread_data; - if (p->flow == NULL) - return TM_ECODE_OK; Flow * const f = p->flow; const uint8_t ipproto = f->proto;