d2d1: Release bitmap on d2d_device_context_SetTarget() error path.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2022-03-11 14:31:41 +08:00 committed by Alexandre Julliard
parent 32799848e3
commit d0902b7c8e
1 changed files with 1 additions and 0 deletions

View File

@ -2051,6 +2051,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTarget(ID2D1DeviceContext *i
if (!(bitmap_impl->options & D2D1_BITMAP_OPTIONS_TARGET))
{
ID2D1Bitmap_Release(bitmap);
d2d_device_context_set_error(context, D2DERR_INVALID_TARGET);
return;
}