Nikolay Sivov : scrrun: Fix use-after-free of version info (Valgrind).
Alexandre Julliard
julliard at winehq.org
Mon May 5 15:03:26 CDT 2014
Module: wine
Branch: master
Commit: c50503d049bd28a05c7a17e16c996c3ac497a138
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c50503d049bd28a05c7a17e16c996c3ac497a138
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon May 5 13:58:03 2014 +0400
scrrun: Fix use-after-free of version info (Valgrind).
---
dlls/scrrun/filesystem.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index b04637c..b2a1a35 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3657,11 +3657,15 @@ static HRESULT WINAPI filesys_GetFileVersion(IFileSystem3 *iface, BSTR name, BST
}
ret = VerQueryValueW(ptr, rootW, (void**)&info, &len);
- heap_free(ptr);
if (!ret)
+ {
+ heap_free(ptr);
return HRESULT_FROM_WIN32(GetLastError());
+ }
get_versionstring(info, ver);
+ heap_free(ptr);
+
*version = SysAllocString(ver);
TRACE("version=%s\n", debugstr_w(ver));
More information about the wine-cvs
mailing list