Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Nessus-Users
[Top] [All Lists]

Re: Turning on mem leak detection

Subject: Re: Turning on mem leak detection
Date: Tue, 26 Oct 2004 15:03:50 -0700
In nessusd 2.0.12 a leak can be fixed with the following patch. I was beating my head against the wall trying to figure out why cache_add_name() was showing up in my dmalloc logs with two different line numbers. I was staring at libnessus/arglists.c for a long time trying to figure out how two mallocs could possibly be happening. I eventually realized there was probably another function with the same name. Sure enough nessusd/pluginscheduler.c has the same function. Seems like the library and program could benefit here from some code reuse. Maybe modify the functions to take the cache as a parameter so there could still be separate caches, but the functions would remain the same for both caches. Anyway, the following patch fixes the leak.

BTW (Renaud), I'll probably have more of these as I'm trying to stabilize the growth of a kept alive nessusd session. Is there some other way you want me to send these to you?

Thanks,
Lance

==== nessusd/pluginscheduler.c#1 - nessusd/pluginscheduler.c ====
@@ -182,6 +183,8 @@
     nc->prev->next = nc->next;
    else
     cache[h].next = nc->next;
+
+    efree(&nc);
  }
}



_______________________________________________
Nessus mailing list
Nessus@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus

<Prev in Thread] Current Thread [Next in Thread>