Module: wine Branch: stable Commit: 2a8257ece7cbd567f5b2edd27e8f276362457274 URL: https://source.winehq.org/git/wine.git/?a=commit;h=2a8257ece7cbd567f5b2edd27...
Author: Alex Henrie alexhenrie24@gmail.com Date: Sat Aug 8 09:36:41 2020 -0600
urlmon: Fix null pointer dereference in process_hook_section (Coverity).
Signed-off-by: Alex Henrie alexhenrie24@gmail.com Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 0385811219a6dc7ab9726255f760ebea37e8286d) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
dlls/urlmon/axinstall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/urlmon/axinstall.c b/dlls/urlmon/axinstall.c index 9d6f9a0f15d..3f10902ddd2 100644 --- a/dlls/urlmon/axinstall.c +++ b/dlls/urlmon/axinstall.c @@ -202,7 +202,7 @@ static HRESULT process_hook_section(install_ctx_t *ctx, const WCHAR *sect_name)
cmd = heap_alloc(size*sizeof(WCHAR)); if(!cmd) - heap_free(cmd); + return E_OUTOFMEMORY;
expand_command(ctx, val, cmd, &size); hres = RunSetupCommandW(ctx->hwnd, cmd, NULL, ctx->tmp_dir, NULL, NULL, 0, NULL);