mirror of
https://github.com/reactos/wine.git
synced 2025-01-24 21:10:50 +00:00
fusion: Avoid memory leaks on memory allocation failure in parse_display_name.
This commit is contained in:
parent
3ed34dc325
commit
e46c66a1f5
@ -562,7 +562,10 @@ static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyNam
|
||||
str = strdupW(szAssemblyName);
|
||||
save = str;
|
||||
if (!str)
|
||||
return E_OUTOFMEMORY;
|
||||
{
|
||||
hr = E_OUTOFMEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
ptr = strchrW(str, ',');
|
||||
if (ptr) *ptr = '\0';
|
||||
@ -576,7 +579,10 @@ static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyNam
|
||||
|
||||
name->name = strdupW(str);
|
||||
if (!name->name)
|
||||
return E_OUTOFMEMORY;
|
||||
{
|
||||
hr = E_OUTOFMEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!ptr)
|
||||
goto done;
|
||||
@ -622,7 +628,8 @@ static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyNam
|
||||
else if (!lstrcmpW(str, procarch))
|
||||
{
|
||||
name->procarch = strdupW(ptr);
|
||||
hr = S_OK;
|
||||
if (!name->procarch)
|
||||
hr = E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
|
Loading…
x
Reference in New Issue
Block a user