Fixed memory leak.

This commit is contained in:
Armin Novak 2016-01-14 15:42:20 +01:00
parent a0d6a1f77f
commit e7c8ea4db9

View File

@ -709,7 +709,10 @@ UINT xf_CreateSurface(RdpgfxClientContext* context, RDPGFX_CREATE_SURFACE_PDU* c
surface->codecs = codecs_new((rdpContext*) xfc);
if (!surface->codecs)
{
free (surface);
return CHANNEL_RC_NO_MEMORY;
}
surface->surfaceId = createSurface->surfaceId;
surface->width = (UINT32) createSurface->width;