Commit 11320a91 authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

ITS#8727 plug ber leaks

parent 04496d5e
...@@ -315,6 +315,7 @@ ldap_send_server_request( ...@@ -315,6 +315,7 @@ ldap_send_server_request(
LDAP_MUTEX_UNLOCK( &ld->ld_options.ldo_mutex ); LDAP_MUTEX_UNLOCK( &ld->ld_options.ldo_mutex );
if ( rc == -1 ) { if ( rc == -1 ) {
ld->ld_errno = LDAP_ENCODING_ERROR; ld->ld_errno = LDAP_ENCODING_ERROR;
ber_free( ber, 1 );
LDAP_CONN_UNLOCK_IF(m_noconn); LDAP_CONN_UNLOCK_IF(m_noconn);
return rc; return rc;
} }
...@@ -334,6 +335,7 @@ ldap_send_server_request( ...@@ -334,6 +335,7 @@ ldap_send_server_request(
rc = -1; rc = -1;
} }
if ( rc ) { if ( rc ) {
ber_free( ber, 1 );
LDAP_CONN_UNLOCK_IF(m_noconn); LDAP_CONN_UNLOCK_IF(m_noconn);
return rc; return rc;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment