Commit 1f132865 authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

windowscodecs: Fix a memory leak (Valgrind).

parent 8aefa871
......@@ -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;
}
......
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