Commit c50503d0 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

scrrun: Fix use-after-free of version info (Valgrind).

parent a596cbb8
...@@ -3657,11 +3657,15 @@ static HRESULT WINAPI filesys_GetFileVersion(IFileSystem3 *iface, BSTR name, BST ...@@ -3657,11 +3657,15 @@ static HRESULT WINAPI filesys_GetFileVersion(IFileSystem3 *iface, BSTR name, BST
} }
ret = VerQueryValueW(ptr, rootW, (void**)&info, &len); ret = VerQueryValueW(ptr, rootW, (void**)&info, &len);
heap_free(ptr);
if (!ret) if (!ret)
{
heap_free(ptr);
return HRESULT_FROM_WIN32(GetLastError()); return HRESULT_FROM_WIN32(GetLastError());
}
get_versionstring(info, ver); get_versionstring(info, ver);
heap_free(ptr);
*version = SysAllocString(ver); *version = SysAllocString(ver);
TRACE("version=%s\n", debugstr_w(ver)); TRACE("version=%s\n", debugstr_w(ver));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment