mirror of https://github.com/FreeRDP/FreeRDP
Fixed memory leak.
This commit is contained in:
parent
d2952d1776
commit
54224d4155
|
@ -511,7 +511,10 @@ wLog* WLog_New(LPCSTR name, wLog* rootLogger)
|
||||||
log->Name = _strdup(name);
|
log->Name = _strdup(name);
|
||||||
|
|
||||||
if (!log->Name)
|
if (!log->Name)
|
||||||
|
{
|
||||||
|
free (log);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
WLog_ParseName(log, name);
|
WLog_ParseName(log, name);
|
||||||
log->Parent = rootLogger;
|
log->Parent = rootLogger;
|
||||||
|
@ -520,7 +523,11 @@ wLog* WLog_New(LPCSTR name, wLog* rootLogger)
|
||||||
log->Children = (wLog**) calloc(log->ChildrenSize, sizeof(wLog*));
|
log->Children = (wLog**) calloc(log->ChildrenSize, sizeof(wLog*));
|
||||||
|
|
||||||
if (!log->Children)
|
if (!log->Children)
|
||||||
|
{
|
||||||
|
free (log->Name);
|
||||||
|
free (log);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
log->Appender = NULL;
|
log->Appender = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue