[iptables PATCH 16/23] arptables: Fix memleak in do_commandarp()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The function did not free the memory allocated in
parse_hostnetworkmask().

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 iptables/xtables-arp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c
index d73856f5c66b1..fa0119bfd496b 100644
--- a/iptables/xtables-arp.c
+++ b/iptables/xtables-arp.c
@@ -1491,6 +1491,11 @@ int do_commandarp(struct nft_handle *h, int argc, char *argv[], char **table)
 		exit_tryhelp(2);
 	}
 
+	if (nsaddrs)
+		free(saddrs);
+	if (ndaddrs)
+		free(daddrs);
+
 /*	if (verbose > 1)
 		dump_entries(*handle);*/
 
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux