Home page logo
/

nmap-dev logo Nmap Development mailing list archives

RE: 80MB+ memory consumption by nmap 3.95
From: "Ganga Bhavani" <GBhavani () everdreamcorp com>
Date: Wed, 1 Feb 2006 10:06:37 -0800

I've fixed memory leak in tcpip.cc in send_ip_packets. It did reduce the memory consumption to 35M. Please find the 
code snippets. Let me know if you see any problem. 

Thanks,
Ganga

--- tcpip.cc.org        2006-02-01 09:44:36.139692100 -0800
+++ tcpip.cc    2006-02-01 09:47:53.064087700 -0800
@@ -933,7 +933,7 @@
   struct ip *ip = (struct ip *) packet;
   struct tcphdr *tcp = NULL;
   udphdr_bsd *udp;
-  u8 *eth_frame;
+  u8 *eth_frame = NULL;
   eth_t *ethsd;
   bool ethsd_opened = false;
   assert(packet);
@@ -957,6 +957,10 @@
     PacketTrace::trace(PacketTrace::SENT, packet, packetlen);
     if (ethsd_opened)
       eth_close(ethsd);
+       if (eth_frame) {
+               free(eth_frame);
+               eth_frame = NULL;
+       }
     return res;
   }
 -----Original Message-----
From:         Ganga Bhavani  
Sent: Friday, January 27, 2006 6:55 PM
To:   'nmap-dev () insecure org'
Subject:      80MB+ memory consumption by nmap 3.95

I've upgraded nmap from 3.75 to 3.95. I'm running nmap on windows 2000 professional with following cmd line params:
nmap -O -F -oN out.nmap 172.20.10.90/20

Till now it has scanned around 3315 nodes and found 557 nodes. It is still executing. The memory it has consumed till 
now is 80MB. Is this behavior normal?  We never found such behavior in the 3.75 version of nmap. Can someone please 
let me know if they have seen similar behavior? Any help in identifying the reason for this memory consumption is 
appreciated.

Thanks,
Ganga



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


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault