]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
logging: just return if no tx loggers
authorJason Ish <ish@unx.ca>
Tue, 7 Jun 2016 20:55:18 +0000 (14:55 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 19 Sep 2016 11:47:52 +0000 (13:47 +0200)
src/output-tx.c

index f68b1aa85e4336831c670819d153de8484211aeb..b39967c89917bf2b6c4a7508d5a89c659fae0533 100644 (file)
@@ -130,7 +130,10 @@ int OutputRegisterTxLogger(LoggerId id, const char *name, AppProto alproto,
 static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data, PacketQueue *pq, PacketQueue *postpq)
 {
     BUG_ON(thread_data == NULL);
-    BUG_ON(list == NULL);
+    if (list == NULL) {
+        /* No child loggers registered. */
+        return TM_ECODE_OK;
+    }
 
     OutputLoggerThreadData *op_thread_data = (OutputLoggerThreadData *)thread_data;
     OutputTxLogger *logger = list;