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>
This commit is contained in:
Alex Henrie 2020-08-08 09:36:41 -06:00 committed by Alexandre Julliard
parent 06e455c247
commit 0385811219

View file

@ -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);