From 230d83b3194459eb910639b86033eff102ba8e2e Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Thu, 28 May 2020 08:32:17 +0200 Subject: [PATCH] gdi: Fix missing unlock This fixes the following defect reported by covscan tool: libfreerdp/gdi/gfx.c:144: missing_unlock: Returning without unlocking "update->mux". --- libfreerdp/gdi/gfx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libfreerdp/gdi/gfx.c b/libfreerdp/gdi/gfx.c index b76cdd79c..e3a6e66e0 100644 --- a/libfreerdp/gdi/gfx.c +++ b/libfreerdp/gdi/gfx.c @@ -141,7 +141,10 @@ static UINT gdi_OutputUpdate(rdpGdi* gdi, gdiGfxSurface* surface) if (!freerdp_image_scale(gdi->primary_buffer, gdi->dstFormat, gdi->stride, nXDst, nYDst, dwidth, dheight, surface->data, surface->format, surface->scanline, nXSrc, nYSrc, swidth, sheight)) - return CHANNEL_RC_NULL_DATA; + { + rc = CHANNEL_RC_NULL_DATA; + goto fail; + } gdi_InvalidateRegion(gdi->primary->hdc, (INT32)nXDst, (INT32)nYDst, (INT32)dwidth, (INT32)dheight);