From: Howard Chu Date: Tue, 17 Jan 2017 11:35:54 +0000 (+0000) Subject: ITS#8727 plug ber leaks X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=01a5eeac1d6aacbdeef9bcf5660967be55634f84;p=openldap ITS#8727 plug ber leaks --- diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 7ec5a83622..a6a4744d2e 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -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; }