Module: wine Branch: master Commit: a5a99047e4b6493fa1ac465d80fd4450f53a3c3d URL: http://source.winehq.org/git/wine.git/?a=commit;h=a5a99047e4b6493fa1ac465d80...
Author: André Hentschel nerv@dawncrow.de Date: Thu Oct 25 21:29:13 2012 +0200
cabinet: Reorder code to make sure str is freed (coverity).
---
dlls/cabinet/cabinet_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/cabinet/cabinet_main.c b/dlls/cabinet/cabinet_main.c index 1f0daf8..ef6698d 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 {