[3/4] gdiplus: Use helper function for HeapReAlloc calls.

Sebastian Lackner sebastian at fds-team.de
Wed Oct 28 20:56:26 CDT 2015


On 29.10.2015 02:53, Alexandre Julliard wrote:
> Sebastian Lackner <sebastian at fds-team.de> writes:
> 
>> @@ -420,12 +420,10 @@ BOOL lengthen_path(GpPath *path, INT len)
>>          while(path->datalen - path->pathdata.Count < len)
>>              path->datalen *= 2;
>>  
>> -        path->pathdata.Points = HeapReAlloc(GetProcessHeap(), 0,
>> -            path->pathdata.Points, path->datalen * sizeof(PointF));
>> +        path->pathdata.Points = heap_realloc(path->pathdata.Points, path->datalen * sizeof(PointF));
>>          if(!path->pathdata.Points)  return FALSE;
>>  
>> -        path->pathdata.Types = HeapReAlloc(GetProcessHeap(), 0,
>> -            path->pathdata.Types, path->datalen);
>> +        path->pathdata.Types = heap_realloc(path->pathdata.Types, path->datalen);
>>          if(!path->pathdata.Types)   return FALSE;
>>      }
> 
> It's not directly related to your change, but as a follow-up patch, it
> would be nice to fix this to correctly handle allocation failures.
> 

I was planning to send more gdiplus cleanup patches after this series anyway,
so no problem. ;)




More information about the wine-devel mailing list