netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2 conntrack-tools] conntrackd: cthelper: Free pktb after use
@ 2017-01-27 20:38 Kevin Cernekee
  2017-01-27 20:38 ` [PATCH 2/2 conntrack-tools] conntrackd: config: Free strdup()ed tokens Kevin Cernekee
  2017-02-01 17:04 ` [PATCH 1/2 conntrack-tools] conntrackd: cthelper: Free pktb after use Pablo Neira Ayuso
  0 siblings, 2 replies; 4+ messages in thread
From: Kevin Cernekee @ 2017-01-27 20:38 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

According to valgrind, this currently leaks ~512B to 2kB for each
packet sent to the userspace helper.

Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
---
 src/cthelper.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/cthelper.c b/src/cthelper.c
index 54eb830..f01c509 100644
--- a/src/cthelper.c
+++ b/src/cthelper.c
@@ -325,6 +325,7 @@ static int nfq_queue_cb(const struct nlmsghdr *nlh, void *data)
 	if (pkt_verdict_issue(helper, myct, queue_num, id, verdict, pktb) < 0)
 		goto err4;
 
+	pktb_free(pktb);
 	nfct_destroy(ct);
 	if (myct->exp != NULL)
 		nfexp_destroy(myct->exp);
-- 
2.7.4


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

end of thread, other threads:[~2017-02-01 17:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 20:38 [PATCH 1/2 conntrack-tools] conntrackd: cthelper: Free pktb after use Kevin Cernekee
2017-01-27 20:38 ` [PATCH 2/2 conntrack-tools] conntrackd: config: Free strdup()ed tokens Kevin Cernekee
2017-02-01 17:03   ` Pablo Neira Ayuso
2017-02-01 17:04 ` [PATCH 1/2 conntrack-tools] conntrackd: cthelper: Free pktb after use Pablo Neira Ayuso

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