mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-17 09:12:25 +00:00
Fix memory leak when outbound socket is closed by server
ESL-88 --resolve Signed-off-by: Travis Cross <tc@traviscross.com>
This commit is contained in:
parent
04de0f77d3
commit
fa17059787
@ -50,10 +50,9 @@ ESLconnection::ESLconnection(int socket)
|
|||||||
|
|
||||||
ESLconnection::~ESLconnection()
|
ESLconnection::~ESLconnection()
|
||||||
{
|
{
|
||||||
if (handle.connected) {
|
if (!handle.destroyed) {
|
||||||
esl_disconnect(&handle);
|
esl_disconnect(&handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ESLconnection::socketDescriptor()
|
int ESLconnection::socketDescriptor()
|
||||||
@ -68,7 +67,7 @@ int ESLconnection::socketDescriptor()
|
|||||||
|
|
||||||
int ESLconnection::disconnect()
|
int ESLconnection::disconnect()
|
||||||
{
|
{
|
||||||
if (handle.connected) {
|
if (!handle.destroyed) {
|
||||||
return esl_disconnect(&handle);
|
return esl_disconnect(&handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user