Commit ccc001ee authored by Robert Wilhelm's avatar Robert Wilhelm Committed by Alexandre Julliard

scrrun: Avoid memory leak in error case.

parent 1f4c48a0
......@@ -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;
}
......
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