Libnet
Memory leak in Libnet Apr 06 2004 01:08AM
hekaddr-reg yahoo com (1 replies)
Hi Mike,

It seems the following "strdup" is a memory leak

libnet-1.1.2:

[libnet_if_addr.c]
238
239 if ((al->device = strdup(device)) == NULL)
240 {
241 snprintf(errbuf, LIBNET_ERRBUF_SIZE,
242 "%s(): strdup not enough memory\n", __func__);
243 return(-1);
244 }

Should we do a "free" before each strdup() except when al->device
is NULL ?

Thanks

Kevin

[ reply ]
Re: Memory leak in Libnet Apr 06 2004 08:05AM
Frédéric Raynal (pappy-ml security-labs org) (1 replies)
Re: Memory leak in Libnet Apr 06 2004 06:27PM
hekaddr-reg yahoo com (1 replies)
Re: Memory leak in Libnet Apr 06 2004 07:04PM
Frédéric Raynal (pappy-ml security-labs org)


 

Privacy Statement
Copyright 2010, SecurityFocus