[PATCH] urlmon: Fix null pointer dereference in process_hook_section (Coverity)

Alex Henrie alexhenrie24 at gmail.com
Sat Aug 8 10:36:41 CDT 2020


Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 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 9d6f9a0f15..3f10902ddd 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);
-- 
2.27.0




More information about the wine-devel mailing list