Fix minor memory leak.
PATCH 1/1 Fix minor memory leak.
The nflog_handle is allocated in nflog_open(). This patch adds the missing free in nlog_close().
Signed-off-by Eric Leblond <[email protected]>
--- src/libnetfilter_log.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
src/libnetfilter_log.c +3 -1
@@ -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 */
Signature · 1 line
1.5.6.3
Hi,
This patch has been applied to libnetfilter_log git tree.
Quoted 13 lines · Eric Leblond
The
nflog_handleis allocated innflog_open(). This patch adds the missing free innflog_close().Signed-off-by Eric Leblond <[email protected]>--- src/libnetfilter_log.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)src/libnetfilter_log.c +0
-0
src/libnetfilter_log.c int nflog_handle_packet(struct nflog_handle *h, char *buf, int len) · line 245
Quoted 10 lines
src/libnetfilter_log.c +3
-1@@ -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 */
BR,
Signature · 3 lines
Éric Leblond <[email protected]> INL, http://www.inl.fr/ NuFW, http://www.nufw.org