* [PATCH libnetfilter_queue] src: check result of malloc when creating queue
@ 2016-07-03 7:38 lists
2016-07-03 7:55 ` Florian Westphal
0 siblings, 1 reply; 2+ messages in thread
From: lists @ 2016-07-03 7:38 UTC (permalink / raw)
To: netfilter-devel; +Cc: Victor Julien
From: Victor Julien <victor@inliniac.net>
Signed-off-by: Victor Julien <victor@inliniac.net>
---
src/libnetfilter_queue.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c
index 5fbde5b..211a8ba 100644
--- a/src/libnetfilter_queue.c
+++ b/src/libnetfilter_queue.c
@@ -536,6 +536,8 @@ struct nfq_q_handle *nfq_create_queue(struct nfq_handle *h,
return NULL;
qh = malloc(sizeof(*qh));
+ if (!qh)
+ return NULL;
memset(qh, 0, sizeof(*qh));
qh->h = h;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-03 7:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-03 7:38 [PATCH libnetfilter_queue] src: check result of malloc when creating queue lists
2016-07-03 7:55 ` Florian Westphal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).