[quagga-dev 10488] ripd/rip_interface.c memleak from inappropriate strdup() calls
ricky.charlet at hp.com
Wed May 1 01:09:09 BST 2013
I'm new around these parts and just jumping into quagga code.
During review, I believe I've spotted a few memory leaks in ripd/rip_interface.c. In several places, there are calls to stdlib.h's strdup() function. Memory returned from strdup() never seems to be free'd. For example:
/* Add interface to rip_enable_if. */
rip_enable_if_add (struct rip *rip, const char *ifname)
ret = rip_enable_if_lookup (rip, ifname);
if (ret >= 0)
vector_set (rip->rip_enable_interface, strdup (ifname));
rip_enable_apply_all (rip); /* TODOVJ */
I'm just tossing this out as an FYI cause I've been wrong before (especially when I'm in a new code base). So will someone else put some eyeballs on that and see if you think those are true memleaks? And if they are not, I would love to be educated.
Software Dev / Routing Dude: Aries team, Roseville CA
ricky.charlet at hp.com<mailto:ricky.charlet at hp.com>
More information about the Quagga-dev