[PATCH 1/2] libX11: Fix potential memory leaks during font set loading.

Kim Woelders kim at woelders.dk
Mon Nov 23 09:43:19 PST 2009

On Mon, 23 Nov 2009 03:03:01 +0100, Alan Coopersmith  
<Alan.Coopersmith at sun.com> wrote:

> Kim Woelders wrote:
>> -    char *pattern = NULL, *ptr = NULL;
>> +    char *pattern, *ptr;
> Why remove the initialization to NULL?
They are useless assignments. There are other useless initializations  
(pixel_size, field_num, len) but they are not related to the fix, which is  
about properly freeing the pattern buffer, so it didn't feel right to  
change those.

Anyway, removing the initializations or not makes no difference in the end.


More information about the xorg-devel mailing list