quartz/vmr9: Avoid leaking the surface array on connection failure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c4f92087af
commit
4eb58312d6
|
@ -428,11 +428,14 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
|
|||
case 32: info.Format = D3DFMT_X8R8G8B8; break;
|
||||
default:
|
||||
FIXME("Unhandled bit depth %u.\n", filter->bmiheader.biBitCount);
|
||||
free(filter->surfaces);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
info.dwFlags = VMR9AllocFlag_TextureSurface;
|
||||
return initialize_device(filter, &info, count);
|
||||
if (FAILED(hr = initialize_device(filter, &info, count)))
|
||||
free(filter->surfaces);
|
||||
return hr;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(formats); ++i)
|
||||
|
@ -457,6 +460,7 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
|
|||
}
|
||||
}
|
||||
|
||||
free(filter->surfaces);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue