mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 05:57:27 +00:00
scrrun: Avoid memory leak in error case.
This commit is contained in:
parent
1f4c48a000
commit
ccc001ee43
|
@ -3453,7 +3453,11 @@ static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *result)
|
|||
return E_OUTOFMEMORY;
|
||||
|
||||
if(!RtlGenRandom(&random, sizeof(random)))
|
||||
{
|
||||
SysFreeString(*result);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
swprintf(*result, 13, L"rad%05X.tmp", random & 0xfffff);
|
||||
return S_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue