From 9184936c4af8575c29b000da6e0e5be23164f8d1 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sun, 30 Nov 2008 15:31:47 +0100 Subject: Fix minor memory leak in nflog_close(). The nflog_handle is allocated in nflog_open(). This patch adds the missing free in nflog_close(). --- src/libnetfilter_log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libnetfilter_log.c b/src/libnetfilter_log.c index 6c0936e..216cdb8 100644 --- a/src/libnetfilter_log.c +++ b/src/libnetfilter_log.c @@ -237,7 +237,9 @@ int nflog_handle_packet(struct nflog_handle *h, char *buf, int len) int nflog_close(struct nflog_handle *h) { - return nfnl_close(h->nfnlh); + int ret = nfnl_close(h->nfnlh); + free(h); + return ret; } /* bind nf_queue from a specific protocol family */ -- cgit v1.2.3