[PATCH]Memory leak in classid.c

Thomas Graf tgraf at infradead.org
Thu Apr 19 12:51:44 EDT 2012


On Fri, Apr 13, 2012 at 01:51:44PM +0200, Nicolas CARRIER wrote:
> Hello,
> I'm using libnl in a program which I give to valgrind in order to track memory errors / leaks.
> When my program exits, it complains about non-freed memory, allocated in 3 places in classid.c, at lines 280, 284 and 289.
> 
> It seems related to the module's constructor classid_init which allocates resources, with no destructor to free it.
> 
> The attached patch tries to fix this issue by registering a destructor which performs the tree liberation at exit.

Applied, thanks Nicolas



More information about the libnl mailing list