Suspected memory leak in PCU

Andreas Eversberg andreas at eversberg.eu
Wed Jan 16 12:54:47 UTC 2013


Harald Welte wrote:
> If you find the time (it's not urgent) it might be worth to audit the
> code to make sure that all allocations are part of the talloc context
> hierarchy.  Given that the report only showed two allocations in the
> version I used yesterday, I think the ms-class bit-vector might not be
> the only data structure that is not properly referenced to the context.
> I would have expected to see at least some persistent structures like
> all the currently active TBFs.
hi harald,

the committed fix shows all bit-vector allocations in the report, not 
only ms-class' bit vector. additionally i checked that all allocated bit 
vectors are freed. (this is how i found the bug.) there is currently no 
other talloc (at run time) that does not use the global PCU's context, 
so a USR1 signal (or terminating the process) would show all leaking 
allocations. i just added the use of PCU's talloc context when creating 
libosmogb's NS instance.

regards,

andreas





More information about the osmocom-net-gprs mailing list