From a5a99047e4b6493fa1ac465d80fd4450f53a3c3d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Hentschel?= Date: Thu, 25 Oct 2012 21:29:13 +0200 Subject: [PATCH] cabinet: Reorder code to make sure str is freed (coverity). --- dlls/cabinet/cabinet_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/cabinet/cabinet_main.c b/dlls/cabinet/cabinet_main.c index 1f0daf8b46f..ef6698d691c 100644 --- a/dlls/cabinet/cabinet_main.c +++ b/dlls/cabinet/cabinet_main.c @@ -365,6 +365,7 @@ HRESULT WINAPI Extract(SESSION *dest, LPCSTR szCabName) if ((end = strrchr(str, '\\'))) { + path = str; end++; name = HeapAlloc( GetProcessHeap(), 0, strlen(end) + 1 ); if (!name) @@ -374,7 +375,6 @@ HRESULT WINAPI Extract(SESSION *dest, LPCSTR szCabName) } strcpy( name, end ); *end = 0; - path = str; } else { -- 2.11.4.GIT