Evan,

You are right. It's g_free(). The fact is that g_free() on an 
uninitialized  pointer  cause  a  crash  on  SPARC, not NULL  pointer.
Sorry for not accurate description!

Thanks
jim
> Jim,
>
> I'm confused. In your patch, it's g_free(), not free().
>
> And in free()'s man page, it says  "If ptr is a null pointer, no action
> occurs."
> I wrote a simple test program, free(0) doesn't crash on my box.
>
> -Evan
>
> Jim Li wrote:
>   
>> Evan ,
>>   
>>     
>>> g_free() on a NULL pointer should be ok with no crash.
>>> If it crash at g_free (desc), it looks more like a memory corruption to
>>> me, i.e. desc pointed to some illegal memory.
>>>   
>>>     
>>>       
>> It's free() not g_free(). :-)
>>
>> free() on a NULL pointer works on X86, but not on SPARC.
>>
>> Jim
>>   
>>     
>>> -Evan
>>>
>>> Jim Li wrote:
>>>   
>>>     
>>>       
>>>> All,
>>>>
>>>> This patch just remove free() for a null pointer which cause the crash.
>>>>
>>>> Thanks
>>>> Jim
>>>>   
>>>>     
>>>>       
>>>>         
>>   
>>     


Reply via email to