Skip to content

Commit

Permalink
rfx: fix possible segfault in error case
Browse files Browse the repository at this point in the history
  • Loading branch information
bmiklautz authored and akallabeth committed Dec 14, 2016
1 parent 1a149e5 commit 227efd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libfreerdp/codec/rfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,10 @@ BOOL rfx_process_message(RFX_CONTEXT* context, const BYTE* data, UINT32 length,
if (!freerdp_image_copy(dst, dstFormat, dstStride,
nXDst, nYDst, nWidth, nHeight,
tile->data, context->pixel_format, stride, nXSrc, nYSrc, NULL, FREERDP_FLIP_NONE))
{
region16_uninit(&updateRegion);
goto fail;
}

if (invalidRegion)
region16_union_rect(invalidRegion, invalidRegion, &updateRects[j]);
Expand All @@ -1207,7 +1210,6 @@ BOOL rfx_process_message(RFX_CONTEXT* context, const BYTE* data, UINT32 length,
}

fail:
region16_uninit(&updateRegion);
Stream_Free(s, FALSE);
rfx_message_free(context, message);
return FALSE;
Expand Down

0 comments on commit 227efd3

Please sign in to comment.