[PATCH libnetfilter_queue] src: check result of malloc when creating queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Victor Julien <victor@xxxxxxxxxxxx>

Signed-off-by: Victor Julien <victor@xxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux