From 56976159ab792563e1e3ce237dce39d0ea68d0b8 Mon Sep 17 00:00:00 2001 From: Haidong Yu Date: Wed, 9 Jun 2021 20:53:59 +0800 Subject: [PATCH] shell32: Fix a memory leak. Signed-off-by: Haidong Yu Signed-off-by: Alexandre Julliard --- dlls/shell32/shlexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index ce0b8f6d2be..ee1e832df33 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -1763,7 +1763,8 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) buf = heap_alloc(size * sizeof(WCHAR)); if (!buf || FAILED(PathCreateFromUrlW(sei_tmp.lpFile, buf, &size, 0))) { heap_free(buf); - return SE_ERR_OOM; + retval = SE_ERR_OOM; + goto end; } heap_free(wszApplicationName);