Commit e46c66a1 authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

fusion: Avoid memory leaks on memory allocation failure in parse_display_name.

parent 3ed34dc3
......@@ -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))
......
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