path: root/src/helpers/tftp.c
diff options
authorKevin Cernekee <>2017-01-26 16:44:24 -0800
committerPablo Neira Ayuso <>2017-02-01 18:05:04 +0100
commit1ba5e76a368aeb9fe17d3b691df4faa0dadc4523 (patch)
treefabfb1c99ce1943957ab34334c7b194816ca3193 /src/helpers/tftp.c
parent8b837716369724287f768531b813501c4ba80f38 (diff)
conntrackd: cthelper: Don't leak nat_tuple
nfexp_set_attr() copies |nat_tuple| rather than taking ownership, so it should be freed at the end of the loop. Some of the other helpers (like rpc.c) do this, but it is missing here. Reported-by: Eric Caruso <> Signed-off-by: Kevin Cernekee <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/helpers/tftp.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/helpers/tftp.c b/src/helpers/tftp.c
index 45591c6..70dd28a 100644
--- a/src/helpers/tftp.c
+++ b/src/helpers/tftp.c
@@ -65,6 +65,7 @@ static unsigned int nat_tftp(struct pkt_buff *pkt, uint32_t ctinfo,
nfexp_set_attr_u32(exp, ATTR_EXP_NAT_DIR, MYCT_DIR_REPL);
nfexp_set_attr(exp, ATTR_EXP_FN, "nat-follow-master");
nfexp_set_attr(exp, ATTR_EXP_NAT_TUPLE, nat_tuple);
+ nfct_destroy(nat_tuple);
return NF_ACCEPT;