[PATCH] win32u: Fix memory leak on error path in PATH_WidenPath (cppcheck)

Huw Davies huw at codeweavers.com
Mon Dec 20 01:44:37 CST 2021


On Sun, Dec 19, 2021 at 09:56:56PM -0700, Alex Henrie wrote:
> Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
> ---
>  dlls/win32u/path.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/dlls/win32u/path.c b/dlls/win32u/path.c
> index 05123a2f2e4..ada76bb4a7a 100644
> --- a/dlls/win32u/path.c
> +++ b/dlls/win32u/path.c
> @@ -1616,7 +1616,7 @@ BOOL WINAPI NtGdiFlattenPath( HDC hdc )
>  static struct gdi_path *PATH_WidenPath(DC *dc)
>  {
>      INT i, j, numStrokes, penWidth, penWidthIn, penWidthOut, size, penStyle;
> -    struct gdi_path *flat_path, *pNewPath, **pStrokes = NULL, *pUpPath, *pDownPath;
> +    struct gdi_path *flat_path, *pNewPath, **pStrokes = NULL, **pNewStrokes, *pUpPath, *pDownPath;

I've sent in v2 with a less annoying variable name.

Huw.



More information about the wine-devel mailing list