Alex Henrie : urlmon: Fix null pointer dereference in process_hook_section (Coverity).

Alexandre Julliard julliard at winehq.org
Mon Aug 10 16:16:29 CDT 2020


Module: wine
Branch: master
Commit: 0385811219a6dc7ab9726255f760ebea37e8286d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0385811219a6dc7ab9726255f760ebea37e8286d

Author: Alex Henrie <alexhenrie24 at 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 at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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 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);




More information about the wine-cvs mailing list