]> git.proxmox.com Git - mirror_iproute2.git/commit
Fix tc/m_ipt memory leaks
authorDenys Fedoryshchenko <denys@visp.net.lb>
Wed, 7 Jan 2009 03:41:50 +0000 (19:41 -0800)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Wed, 7 Jan 2009 03:46:11 +0000 (19:46 -0800)
commit6e34e7dc0ae01176f1c2a2fa2e6310b0e04ae204
treecbff730d4011456ae1b391b68908efea89b7251e
parent037d950bceed6d5053758dea601e0d018f5f22d7
Fix tc/m_ipt memory leaks

1)optind according iptables sources have to be set to 0. If it is set to 1, in
batch it will mess up things. Also in iptables sources i notice that ->tflags
and ->used need to be reset.

2)Since target->t = fw_calloc(1, size); allocated memory in function build_st,
it have to be freed at the end, or in batch we will have memory leak. TODO:
Probably it must be freed in all "return -1" cases in parse_ipt after
build_st. About this i am not sure, up to Stephen.

3)new_name was malloc'ed, but not freed
tc/m_ipt.c