From bb7013817b86d63b8fca3f36dcfcbca84c16b2ba Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 25 Apr 2018 13:33:22 -0500 Subject: [PATCH] FS-11138: [freeswitch-core] Leak in ESL client #resolve --- libs/esl/src/esl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/esl/src/esl.c b/libs/esl/src/esl.c index ab89b4c822..3f00a209f9 100644 --- a/libs/esl/src/esl.c +++ b/libs/esl/src/esl.c @@ -1018,6 +1018,8 @@ ESL_DECLARE(esl_status_t) esl_connect_timeout(esl_handle_t *handle, const char * goto fail; } + handle->destroyed = 0; + if (timeout) { #ifdef WIN32 u_long arg = 1; @@ -1115,7 +1117,7 @@ ESL_DECLARE(esl_status_t) esl_connect_timeout(esl_handle_t *handle, const char * fail: - handle->connected = 0; + esl_disconnect(handle); return ESL_FAIL; }