mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-17 16:53:13 +00:00
Fixed leak of a LinkedList by LifeTimeMonitor
Fixed leak of X509 structure by ControlChannelCertificate property of MeshAgent
This commit is contained in:
@@ -1654,7 +1654,9 @@ duk_ret_t ILibDuktape_MeshAgent_ServerInfo(duk_context *ctx)
|
|||||||
#ifndef MICROSTACK_NOTLS
|
#ifndef MICROSTACK_NOTLS
|
||||||
if (agent->controlChannel != NULL)
|
if (agent->controlChannel != NULL)
|
||||||
{
|
{
|
||||||
ILibDuktape_TLS_X509_PUSH(ctx, ILibWebClient_SslGetCert(agent->controlChannel));
|
X509 *cert = ILibWebClient_SslGetCert(agent->controlChannel);
|
||||||
|
ILibDuktape_TLS_X509_PUSH(ctx, cert);
|
||||||
|
X509_free(cert);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7997,6 +7997,7 @@ void ILibLifeTime_Destroy(void *LifeTimeToken)
|
|||||||
struct ILibLifeTime *UPnPLifeTime = (struct ILibLifeTime*)LifeTimeToken;
|
struct ILibLifeTime *UPnPLifeTime = (struct ILibLifeTime*)LifeTimeToken;
|
||||||
ILibLifeTime_Flush(LifeTimeToken);
|
ILibLifeTime_Flush(LifeTimeToken);
|
||||||
ILibLinkedList_Destroy(UPnPLifeTime->ObjectList);
|
ILibLinkedList_Destroy(UPnPLifeTime->ObjectList);
|
||||||
|
ILibLinkedList_Destroy(UPnPLifeTime->DeleteList);
|
||||||
UPnPLifeTime->ObjectCount = 0;
|
UPnPLifeTime->ObjectCount = 0;
|
||||||
UPnPLifeTime->ObjectList = NULL;
|
UPnPLifeTime->ObjectList = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user