gdiplus: Fix a memory leak on error path (Valgrind).

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 85630593b8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Sven Baars 2019-01-24 11:59:47 +01:00 committed by Michael Stefaniuc
parent 2b0d945252
commit 66529e3f22
1 changed files with 5 additions and 1 deletions

View File

@ -3570,7 +3570,11 @@ static GpStatus initialize_decoder_wic(IStream *stream, REFGUID container, IWICB
if (FAILED(hr)) return hresult_to_status(hr);
hr = IWICBitmapDecoder_Initialize(*decoder, stream, WICDecodeMetadataCacheOnLoad);
if (FAILED(hr)) return hresult_to_status(hr);
if (FAILED(hr))
{
IWICBitmapDecoder_Release(*decoder);
return hresult_to_status(hr);
}
return Ok;
}