]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11138: [freeswitch-core] Leak in ESL client #resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 25 Apr 2018 18:33:22 +0000 (13:33 -0500)
committerMuteesa Fred <muteesafred@hotmail.com>
Tue, 24 Jul 2018 07:21:51 +0000 (07:21 +0000)
libs/esl/src/esl.c

index ab89b4c822d9fdc8b1f6ff153e1e0808fda82661..3f00a209f945583efac04f03b7ae508d976c8b8c 100644 (file)
@@ -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;
 }