How to check my eap method for memory leak

khali singh khali3620
Wed Jul 30 03:25:10 PDT 2014

Thanks. I noticed that the reset function is not called when I exit
hostapd. So I can;t seem to free all the memory.

On Tue, Jul 29, 2014 at 11:39 PM, Jouni Malinen <j at> wrote:

> On Tue, Jul 29, 2014 at 08:39:41AM +0300, khali singh wrote:
> > I have now a working new EAP method that satifies my needs. But giving my
> > coding skills, I want to know if there are memory leaks. IS there some
> easy
> > to use tool for this. I have some experience with valgrind. But my
> hostapd
> > should never stop running. Only at the end of an eap run, successful or
> > unsuccessful, all the memory should be released. Is there some easy way
> out?
> hostapd does not use per-EAP session memory allocation mechanism, so it
> would be difficult to do that without stopping the process. I would just
> run an authentication run (or few) and stop the process to check for
> memory leaks. If you are using the os_*alloc functions, you can use
> internal memory allocation validation code (CONFIG_WPA_TRACE=y) to get
> list of memory leaks when the process exists. valgring is also a pretty
> convenient way of doing this.
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Hostap mailing list