Nmap Development mailing list archives
Re: Possible memory leaks in libnetutil
From: Fyodor <fyodor () insecure org>
Date: Tue, 10 Aug 2010 23:23:45 -0700
On Tue, Aug 10, 2010 at 01:01:15AM +0200, Luis MartinGarcia. wrote:
The thing is that getinterfaces() caches the list of interfaces so subsequent calls don't have to use dnet or do ioctl() calls again. I guess getsysroutes() does something similar. However, it may be nice to provide some helpers or modify the functions in some way so we can free() any allocated memory and avoid the warnings.
Hi Luis. As Brandon noted, Nmap has the --release-memory option for freeing memory before it exists (this generally only helps when debugging, because the memory would be freed after the exit anyway). Maybe something similar could be done with nping? Or maybe it could be freed in all cases. Anyway, you're certainly welcome to propose a patch as I agree that providing a way to free the memory would be helpful. As you note, the patch might involve changes to libnetutil if they don't yet provide a way to free the memory. Cheers, -F _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Possible memory leaks in libnetutil Luis MartinGarcia. (Aug 09)
- Re: Possible memory leaks in libnetutil Brandon Enright (Aug 09)
- Re: Possible memory leaks in libnetutil Luis MartinGarcia. (Aug 09)
- Re: Possible memory leaks in libnetutil Fyodor (Aug 10)
- Re: Possible memory leaks in libnetutil Brandon Enright (Aug 09)