Fixed memory leak.

This commit is contained in:
Armin Novak 2014-11-17 00:37:29 +01:00
parent aa92017d86
commit a9cfb1d07b
1 changed files with 4 additions and 1 deletions

View File

@ -59,7 +59,7 @@ int clear_decompress(CLEAR_CONTEXT* clear, BYTE* pSrcData, UINT32 SrcSize,
UINT32 i; UINT32 i;
BOOL invert; BOOL invert;
UINT32 x, y; UINT32 x, y;
UINT32 count; UINT32 count = 0;
UINT32 color; UINT32 color;
int nXDstRel; int nXDstRel;
int nYDstRel; int nYDstRel;
@ -848,7 +848,10 @@ CLEAR_CONTEXT* clear_context_new(BOOL Compressor)
clear->nsc = nsc_context_new(); clear->nsc = nsc_context_new();
if (!clear->nsc) if (!clear->nsc)
{
free (clear);
return NULL; return NULL;
}
nsc_context_set_pixel_format(clear->nsc, RDP_PIXEL_FORMAT_R8G8B8); nsc_context_set_pixel_format(clear->nsc, RDP_PIXEL_FORMAT_R8G8B8);