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

Alexandre Julliard julliard at winehq.org
Wed Oct 28 20:53:22 CDT 2015


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.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list