From 6e619eba1a6c8d0048738352d289b75536ca5080 Mon Sep 17 00:00:00 2001 From: bol-van Date: Mon, 9 Dec 2024 12:06:49 +0300 Subject: [PATCH] nfqws: fix crash --- nfq/nfqws.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nfq/nfqws.c b/nfq/nfqws.c index c59b334..d22a318 100644 --- a/nfq/nfqws.c +++ b/nfq/nfqws.c @@ -192,7 +192,7 @@ static bool nfq_init(struct nfq_handle **h,struct nfq_q_handle **qh) DLOG_CONDUP("binding this socket to queue '%u'\n", params.qnum); *qh = nfq_create_queue(*h, params.qnum, &nfq_cb, ¶ms); - if (!qh) { + if (!*qh) { DLOG_PERROR("nfq_create_queue()"); goto exiterr; } @@ -249,7 +249,8 @@ static int nfq_main(void) pre_desync(); - nfq_init(&h,&qh); + if (!nfq_init(&h,&qh)) + goto exiterr; fd = nfq_fd(h); do