[PATCH 11/11] xfree86: fix memory leak in xf86LoadModules

Tiago Vignatti tiago.vignatti at nokia.com
Mon Mar 28 05:08:16 PDT 2011


On 03/26/2011 01:02 AM, ext Nicolas PENINGUY wrote:
> On Fri, 2011-03-25 at 20:41 +0200, Tiago Vignatti wrote:
>> diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
>> index e664ce4..d81303e 100644
>> --- a/hw/xfree86/common/xf86Init.c
>> +++ b/hw/xfree86/common/xf86Init.c
>> @@ -1433,6 +1433,7 @@ xf86LoadModules(char **list, pointer *optlist)
>>   	}
>>   	free(name);
>>       }
>> +    free(name);
>>       return !failed;
>>   }
>
> This one seems wrong to me, the only leak I can see is when
> *name == '\0'.

but it stills a leak.

            Tiago


More information about the xorg-devel mailing list