mirror of https://github.com/FreeRDP/FreeRDP
cache and core: set pointer to NULL after free
This commit is contained in:
parent
1c2506f937
commit
554268674c
|
@ -500,6 +500,7 @@ void glyph_cache_free(rdpGlyphCache* glyph_cache)
|
|||
Glyph_Free(glyph_cache->context, glyph);
|
||||
free(glyph->aj);
|
||||
free(glyph);
|
||||
glyph_cache->glyphCache[i].entries[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(glyph_cache->glyphCache[i].entries);
|
||||
|
@ -509,6 +510,7 @@ void glyph_cache_free(rdpGlyphCache* glyph_cache)
|
|||
{
|
||||
fragment = glyph_cache->fragCache.entries[i].fragment;
|
||||
free(fragment);
|
||||
glyph_cache->fragCache.entries[i].fragment = NULL;
|
||||
}
|
||||
|
||||
free(glyph_cache->fragCache.entries);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "message.h"
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/stream.h>
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/error.h>
|
||||
|
@ -372,9 +373,13 @@ void freerdp_context_free(freerdp* instance)
|
|||
IFCALL(instance->ContextFree, instance, instance->context);
|
||||
|
||||
rdp_free(instance->context->rdp);
|
||||
instance->context->rdp = NULL;
|
||||
|
||||
graphics_free(instance->context->graphics);
|
||||
instance->context->graphics = NULL;
|
||||
|
||||
free(instance->context->client);
|
||||
instance->context->client = NULL;
|
||||
|
||||
free(instance->context);
|
||||
instance->context = NULL;
|
||||
|
|
|
@ -117,10 +117,16 @@ void Pointer_Free(rdpContext* context, rdpPointer* pointer)
|
|||
pointer->Free(context, pointer);
|
||||
|
||||
if (pointer->xorMaskData)
|
||||
{
|
||||
free(pointer->xorMaskData);
|
||||
pointer->xorMaskData = NULL;
|
||||
}
|
||||
|
||||
if (pointer->andMaskData)
|
||||
{
|
||||
free(pointer->andMaskData);
|
||||
pointer->andMaskData = NULL;
|
||||
}
|
||||
|
||||
free(pointer);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue