windowscodecs: Fix a memory leak (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>
This commit is contained in:
parent
8aefa871ad
commit
1f132865ec
|
@ -620,7 +620,6 @@ static HRESULT WINAPI PngDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p
|
|||
if (setjmp(jmpbuf))
|
||||
{
|
||||
ppng_destroy_read_struct(&This->png_ptr, &This->info_ptr, &This->end_info);
|
||||
HeapFree(GetProcessHeap(), 0, row_pointers);
|
||||
This->png_ptr = NULL;
|
||||
hr = WINCODEC_ERR_UNKNOWNIMAGEFORMAT;
|
||||
goto end;
|
||||
|
@ -816,6 +815,9 @@ static HRESULT WINAPI PngDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p
|
|||
end:
|
||||
LeaveCriticalSection(&This->lock);
|
||||
|
||||
if (row_pointers)
|
||||
HeapFree(GetProcessHeap(), 0, row_pointers);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue