[libnetfilter_log] Fix minor memory leak in nflog_close().
Eric Leblond
netfilter-cvslog-bounces at lists.netfilter.org
Mon Dec 15 17:13:30 CET 2008
Gitweb: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=libnetfilter_log.git;a=commit;h=9184936c4af8575c29b000da6e0e5be23164f8d1
commit 9184936c4af8575c29b000da6e0e5be23164f8d1
Author: Eric Leblond <eric at inl.fr>
AuthorDate: Sun Nov 30 15:31:47 2008 +0100
Commit: Eric Leblond <eric at inl.fr>
CommitDate: Mon Dec 15 17:11:34 2008 +0100
Fix minor memory leak in nflog_close().
The nflog_handle is allocated in nflog_open(). This patch adds the missing
free in nflog_close().
via 9184936c4af8575c29b000da6e0e5be23164f8d1 (commit)
from ebe111687485eb52d04799a20f08c807d180a4c5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9184936c4af8575c29b000da6e0e5be23164f8d1
Author: Eric Leblond <eric at inl.fr>
Date: Sun Nov 30 15:31:47 2008 +0100
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 files changed, 3 insertions(+), 1 deletions(-)
The nflog_handle is allocated in nflog_open(). This patch adds the missing
free in nflog_close().
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 */
More information about the netfilter-cvslog
mailing list