From 04f2afa81b591b6b5c8dfdcf6892d35660125bc1 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Mon, 7 Mar 2011 12:07:36 +0100 Subject: [PATCH] nfq: fix exit function Exit function was trying to close the nfq handler even if it was null. This was causing a crash. --- src/source-nfq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/source-nfq.c b/src/source-nfq.c index 691cd99834..faa52d85fb 100644 --- a/src/source-nfq.c +++ b/src/source-nfq.c @@ -492,7 +492,9 @@ TmEcode VerdictNFQThreadDeinit(ThreadVars *tv, void *data) { NFQQueueVars *nq = NFQGetQueue(ntv->nfq_index); SCLogDebug("starting... will close queuenum %" PRIu32 "", nq->queue_num); - nfq_destroy_queue(nq->qh); + if (nq->qh) { + nfq_destroy_queue(nq->qh); + } return TM_ECODE_OK; }