[patch] fix another module loader memory leak

Bill Crawford billcrawford1970 at gmail.com
Mon Feb 18 15:35:51 PST 2008


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: loader-fix-fix.patch
Type: text/x-diff
Size: 471 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080218/142300c2/attachment-0001.patch>


More information about the xorg mailing list