Fixed memory leaks.
This commit is contained in:
parent
6196eb81b2
commit
b9908af64a
@ -672,7 +672,10 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
context = (DrdynvcClientContext*) calloc(1, sizeof(DrdynvcClientContext));
|
||||
|
||||
if (!context)
|
||||
{
|
||||
free(drdynvc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
context->handle = (void*) drdynvc;
|
||||
context->custom = NULL;
|
||||
|
@ -190,6 +190,7 @@ void wl_begin_paint(rdpContext* context)
|
||||
|
||||
void wl_end_paint(rdpContext* context)
|
||||
{
|
||||
char *data;
|
||||
rdpGdi* gdi;
|
||||
struct display* display;
|
||||
struct window* window;
|
||||
@ -203,7 +204,7 @@ void wl_end_paint(rdpContext* context)
|
||||
display = context_w->display;
|
||||
window = context_w->window;
|
||||
|
||||
data = realloc(window->data, gdi->width * gdi->height * 4));
|
||||
data = realloc(window->data, gdi->width * gdi->height * 4);
|
||||
|
||||
if (!data)
|
||||
{
|
||||
|
@ -366,7 +366,7 @@ LPCH MergeEnvironmentStrings(PCSTR original, PCSTR merge)
|
||||
|
||||
// check if this value is in the mergeStrings
|
||||
foundMerge = 0;
|
||||
|
||||
ULONG old_offset = offset;
|
||||
for (run = 0; run < mergeStringLength; run ++)
|
||||
{
|
||||
if (!mergeStrings[run])
|
||||
@ -401,6 +401,7 @@ LPCH MergeEnvironmentStrings(PCSTR original, PCSTR merge)
|
||||
return NULL;
|
||||
}
|
||||
lpszEnvironmentBlock = tmp;
|
||||
p = &(lpszEnvironmentBlock[old_offset]);
|
||||
}
|
||||
|
||||
foundMerge = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user