From ecb17fc30e2b22f3d698905783975ebba309fb38 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 5 May 2003 17:35:59 +0000 Subject: [PATCH] ITS#2486: plug leak --- libraries/libldap/tls.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index d7d62885e0..6ce60d3bd7 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -1711,9 +1711,6 @@ ldap_start_tls_s ( LDAP *ld, rc = ldap_extended_operation_s( ld, LDAP_EXOP_START_TLS, NULL, serverctrls, clientctrls, &rspoid, &rspdata ); - if ( rc != LDAP_SUCCESS ) { - return rc; - } if ( rspoid != NULL ) { LDAP_FREE(rspoid); @@ -1723,7 +1720,10 @@ ldap_start_tls_s ( LDAP *ld, ber_bvfree( rspdata ); } - rc = ldap_int_tls_start( ld, ld->ld_defconn, NULL ); + if ( rc != LDAP_SUCCESS ) { + rc = ldap_int_tls_start( ld, ld->ld_defconn, NULL ); + } + #else rc = LDAP_NOT_SUPPORTED; #endif -- 2.39.5