Possible patch for memory leak in rlm_wimax
aland at deployingradius.com
Wed Nov 10 15:12:59 CET 2010
James Ballantine wrote:
> We are seeing what I think may be a memory leak inside the rlm_wimax
> module: Several HMAC_CTX structures are initialised with
> HMAC_CTX_init(), but only the last one seems to be cleaned up with
That looks right. The extra calls to HMAC_CTX_init() aren't necessary.
> I've attached a patch which removes the memory leak according to my
> tests. However, I don't know if my change is correct - whether a single
> HMAC_CTX should be re-used (as I've done in this patch), or whether a
> new one should be created and cleaned up for each use. I would
> appreciate it if someone with more familiarity than me could review this
The same context can be used for every HMAC.
I'll apply a patch.
More information about the Freeradius-Devel