ITS#8727 plug ber leaks

This commit is contained in:
Howard Chu 2017-01-17 11:35:54 +00:00
parent 75999a18c3
commit 01a5eeac1d

View File

@ -315,6 +315,7 @@ ldap_send_server_request(
LDAP_MUTEX_UNLOCK( &ld->ld_options.ldo_mutex );
if ( rc == -1 ) {
ld->ld_errno = LDAP_ENCODING_ERROR;
ber_free( ber, 1 );
LDAP_CONN_UNLOCK_IF(m_noconn);
return rc;
}
@ -334,6 +335,7 @@ ldap_send_server_request(
rc = -1;
}
if ( rc ) {
ber_free( ber, 1 );
LDAP_CONN_UNLOCK_IF(m_noconn);
return rc;
}