Signed-off-by: Ziqing Hui zhui@codeweavers.com --- dlls/d2d1/effect.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index f931c494a07..a32c4a21be1 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -35,6 +35,12 @@ static inline struct d2d_effect_context *impl_from_ID2D1EffectContext(ID2D1Effec return CONTAINING_RECORD(iface, struct d2d_effect_context, ID2D1EffectContext_iface); }
+static void d2d_effect_context_cleanup(struct d2d_effect_context *effect_context) +{ + ID2D1Factory_Release(effect_context->factory); + ID2D1DeviceContext_Release(effect_context->device_context); +} + static HRESULT STDMETHODCALLTYPE d2d_effect_context_QueryInterface(ID2D1EffectContext *iface, REFIID iid, void **out) { TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); @@ -72,8 +78,7 @@ static ULONG STDMETHODCALLTYPE d2d_effect_context_Release(ID2D1EffectContext *if
if (!refcount) { - ID2D1Factory_Release(effect_context->factory); - ID2D1DeviceContext_Release(effect_context->device_context); + d2d_effect_context_cleanup(effect_context); heap_free(effect_context); }