]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
output/tx: bail early if no flow
authorVictor Julien <victor@inliniac.net>
Mon, 9 Feb 2015 07:35:30 +0000 (08:35 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 27 Jan 2020 19:20:08 +0000 (20:20 +0100)
src/output-tx.c

index c893893fbc50e92006edc65dea7da2775d3ea07d..edb198ad9754343c78517bb8ac2903bb04d5259f 100644 (file)
@@ -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;