Commit adc34921 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

wmphoto: Fix memory leak on error path in wmp_decoder_create (Coverity).

parent e16ccaf0
......@@ -358,7 +358,10 @@ HRESULT CDECL wmp_decoder_create(struct decoder_info *info, struct decoder **res
if (PKImageDecode_Create_WMP(&decoder)) return E_FAIL;
This = RtlAllocateHeap(GetProcessHeap(), 0, sizeof(*This));
if (!This)
{
decoder->Release(&decoder);
return E_OUTOFMEMORY;
}
This->decoder_iface.vtable = &wmp_decoder_vtable;
This->WMPStream_iface.Close = &wmp_stream_Close;
......
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