Nmap Development mailing list archives

Re: Nsock does not pcap_close()


From: "Luis MartinGarcia." <luis.mgarc () gmail com>
Date: Thu, 26 Aug 2010 22:44:29 +0200

On 08/26/2010 10:23 PM, David Fifield wrote:

I tested this with Nping and NSE. I see the leaked descriptor in Nping,
but not NSE. nsi_delete, called by nsp_delete, already calls pcap_close.
I think the issue is that Nping doesn't call nsp_delete. Valgrind
reports that it leaks sockets even in --tcp-connect mode (one for every
probe sent; i.e., -c 5 leaks 5 and -c 10 leaks 10).

The only place I found where nsp_delete can be called is in
ProbeMode::cleanup, and that doesn't appear to be called.

  

Hi David,

Thanks for looking into this. I haven't checked Nping's code but you are
probably right, my mistake. I've added a TODO item for this in Nping's
todo list, and I'll take care of it as soon as I can.

Regards,

Luis MartinGarcia.

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: