Fixed memory leak.

This commit is contained in:
Armin Novak 2016-01-14 15:36:34 +01:00
parent 4292631ff9
commit a0d6a1f77f

View File

@ -717,7 +717,10 @@ UINT gdi_CreateSurface(RdpgfxClientContext* context, RDPGFX_CREATE_SURFACE_PDU*
surface->codecs = codecs_new(gdi->context);
if (!surface->codecs)
{
free (surface);
return CHANNEL_RC_NO_MEMORY;
}
surface->surfaceId = createSurface->surfaceId;
surface->width = (UINT32) createSurface->width;