winemenubuilder: Avoid double free (Coverity).

Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Marcus Meissner 2016-08-21 20:38:18 +02:00 committed by Alexandre Julliard
parent e7a568259c
commit 2e32c0c657
1 changed files with 2 additions and 7 deletions

View File

@ -1005,13 +1005,8 @@ static HRESULT write_native_icon(IStream *iconStream, ICONDIRENTRY *pIconDirEntr
position.QuadPart = 0;
hr = IStream_Seek(iconStream, position, STREAM_SEEK_SET, NULL);
if (FAILED(hr))
goto end;
hr = convert_to_native_icon(iconStream, &nIndex, 1, &CLSID_WICPngEncoder, icon_name, szFileName);
end:
HeapFree(GetProcessHeap(), 0, pIconDirEntry);
return hr;
if (FAILED(hr)) return hr;
return convert_to_native_icon(iconStream, &nIndex, 1, &CLSID_WICPngEncoder, icon_name, szFileName);
}
static WCHAR* assoc_query(ASSOCSTR assocStr, LPCWSTR name, LPCWSTR extra)