trial fix to null pointer free

Xinliang David Li davidxl@google.com
Thu Apr 28 01:20:00 GMT 2011


Ok -- false alarm ...

David

On Wed, Apr 27, 2011 at 5:30 PM, Nathan Froyd <froydnj@codesourcery.com> wrote:
> On Wed, Apr 27, 2011 at 04:23:42PM -0700, Xinliang David Li wrote:
>> This can happen when the module does not have function bodies.
>>
>> -   VEC_free (cgraph_node_ptr, heap, cgraph_node_map);
>> -   cgraph_node_map = NULL;
>> +  if (cgraph_node_map)
>> +    VEC_free (cgraph_node_ptr, heap, cgraph_node_map);
>> +  cgraph_node_map = NULL;
>
> Why are you doing this?  This is exactly what VEC_free already does.
>
> -Nathan
>



More information about the Gcc-patches mailing list