[patch] fix another module loader memory leak

Peter Hutterer mailinglists at who-t.net
Mon Feb 18 17:56:49 PST 2008


Bill Crawford wrote:
> On Monday 18 February 2008 08:13:03 Peter Hutterer wrote:
>> Arjan van de Ven wrote:
>>> LoadModule() returns the only reference to a fresh piece of memory (a
>>> ModuleDescPtr). Sadly, xf86LoadModules() dropped the return value on the
>>> floor, leaking memory for each module it loaded.
> ...
>> thanks.  pushed as 3abce3ea2b1f43bd111664d4a57e5ccd282acab0.
>> (this patch required some minor modifications to work with current git
>> master)
> 
> The free of the desc->name at least needs to be guarded to avoid dereferencing 
> a null pointer if the load failed ... attached.

thanks, fixed and pushed.



More information about the xorg mailing list