mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 14:20:15 +00:00
wmphoto: Fix memory leak on error path in wmp_decoder_create (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Esme Povirk <esme@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e16ccaf05d
commit
adc3492107
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue