* [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* Re: [libnetfilter_log patch] Fix minor memory leak.
2008-11-30 14:34 [libnetfilter_log patch] Fix minor memory leak Eric Leblond
@ 2008-12-15 16:15 ` Eric Leblond
0 siblings, 0 replies; 2+ messages in thread
From: Eric Leblond @ 2008-12-15 16:15 UTC (permalink / raw)
To: netfilter-devel; +Cc: pablo
[-- Attachment #1: Type: text/plain, Size: 963 bytes --]
Hi,
This patch has been applied to libnetfilter_log git tree.
Le dimanche 30 novembre 2008 à 15:34 +0100, Eric Leblond a écrit :
> The nflog_handle is allocated in nflog_open(). This patch adds the missing
> free in nflog_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 */
BR,
--
Éric Leblond <eric@inl.fr>
INL, http://www.inl.fr/
NuFW, http://www.nufw.org
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [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).