netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [libnetfilter_log patch] Fix minor memory leak.
@ 2008-11-30 14:34 Eric Leblond
  2008-12-15 16:15 ` Eric Leblond
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Leblond @ 2008-11-30 14:34 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Eric Leblond

The nflog_handle is allocated in nflog_open(). This patch adds the missing
free in nlog_close().

Signed-off-by: Eric Leblond <eric@inl.fr>
---
 src/libnetfilter_log.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

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 */
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-15 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-30 14:34 [libnetfilter_log patch] Fix minor memory leak Eric Leblond
2008-12-15 16:15 ` Eric Leblond

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).