diff --git a/libfreerdp/codec/progressive.c b/libfreerdp/codec/progressive.c index 38b1c5803..68f3aaea1 100644 --- a/libfreerdp/codec/progressive.c +++ b/libfreerdp/codec/progressive.c @@ -269,7 +269,10 @@ PROGRESSIVE_SURFACE_CONTEXT* progressive_surface_context_new(UINT16 surfaceId, U surface->tiles = (RFX_PROGRESSIVE_TILE*) calloc(surface->gridSize, sizeof(RFX_PROGRESSIVE_TILE)); if (!surface->tiles) + { + free (surface); return NULL; + } return surface; }