scrrun: Fix use-after-free of version info (Valgrind).
This commit is contained in:
parent
a596cbb847
commit
c50503d049
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue