mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
Fix *=+=* bug.
Plug leak of ber.
This commit is contained in:
parent
fb973c2dae
commit
c9de09b1d0
3 changed files with 11 additions and 4 deletions
1
CHANGES
1
CHANGES
|
|
@ -8,6 +8,7 @@ Changes included in OpenLDAP 1.2 Release Engineering
|
|||
Fixed slapd memory leaks (ITS#249 ITS#250)
|
||||
Fixed test005-modrdn to properly report failure in delete rdn case
|
||||
Fixed ldapsearch (%s) bug (ITS#274)
|
||||
Fixed slapd (cn=*=+=*) regex bug (ITS#272)
|
||||
Build environment
|
||||
Disable config.cache to ensure consistent detection
|
||||
Documentation
|
||||
|
|
|
|||
|
|
@ -288,7 +288,6 @@ strcpy_special( char *d, char *s )
|
|||
case '[':
|
||||
case ']':
|
||||
case '*':
|
||||
case '+':
|
||||
case '^':
|
||||
case '$':
|
||||
*d++ = '\\';
|
||||
|
|
@ -386,7 +385,7 @@ test_substring_filter(
|
|||
/* compile the regex */
|
||||
Debug( LDAP_DEBUG_FILTER, "test_substring_filter: regcomp pat: %s\n",
|
||||
pat, 0, 0 );
|
||||
if ((rc = regcomp(&re, pat, 0))) {
|
||||
if ((rc = regcomp(&re, pat, REG_NOSUB))) {
|
||||
char error[512];
|
||||
|
||||
regerror(rc, &re, error, sizeof(error));
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ send_ldap_result2(
|
|||
|
||||
if ( rc == -1 ) {
|
||||
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
|
||||
ber_free( ber, 1 );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +90,7 @@ send_ldap_result2(
|
|||
bytes = ber->ber_ptr - ber->ber_buf;
|
||||
ldap_pvt_thread_mutex_lock( &new_conn_mutex );
|
||||
while ( conn->c_connid == op->o_connid && ber_flush( &conn->c_sb, ber,
|
||||
1 ) != 0 ) {
|
||||
0 ) != 0 ) {
|
||||
ldap_pvt_thread_mutex_unlock( &new_conn_mutex );
|
||||
/*
|
||||
* we got an error. if it's ewouldblock, we need to
|
||||
|
|
@ -105,6 +106,7 @@ send_ldap_result2(
|
|||
close_connection( conn, op->o_connid, op->o_opid );
|
||||
|
||||
ldap_pvt_thread_mutex_unlock( &conn->c_pdumutex );
|
||||
ber_free( ber, 1 );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -128,6 +130,8 @@ send_ldap_result2(
|
|||
ldap_pvt_thread_mutex_unlock( &new_conn_mutex );
|
||||
ldap_pvt_thread_mutex_unlock( &conn->c_pdumutex );
|
||||
|
||||
ber_free( ber, 1 );
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &num_sent_mutex );
|
||||
num_bytes_sent += bytes;
|
||||
ldap_pvt_thread_mutex_unlock( &num_sent_mutex );
|
||||
|
|
@ -327,7 +331,7 @@ send_search_entry(
|
|||
bytes = ber->ber_ptr - ber->ber_buf;
|
||||
ldap_pvt_thread_mutex_lock( &new_conn_mutex );
|
||||
while ( conn->c_connid == op->o_connid && ber_flush( &conn->c_sb, ber,
|
||||
1 ) != 0 ) {
|
||||
0 ) != 0 ) {
|
||||
ldap_pvt_thread_mutex_unlock( &new_conn_mutex );
|
||||
/*
|
||||
* we got an error. if it's ewouldblock, we need to
|
||||
|
|
@ -343,6 +347,7 @@ send_search_entry(
|
|||
close_connection( conn, op->o_connid, op->o_opid );
|
||||
|
||||
ldap_pvt_thread_mutex_unlock( &conn->c_pdumutex );
|
||||
ber_free( ber, 1 );
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
|
|
@ -364,6 +369,8 @@ send_search_entry(
|
|||
ldap_pvt_thread_mutex_unlock( &new_conn_mutex );
|
||||
ldap_pvt_thread_mutex_unlock( &conn->c_pdumutex );
|
||||
|
||||
ber_free( ber, 1 );
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &num_sent_mutex );
|
||||
num_bytes_sent += bytes;
|
||||
num_entries_sent++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue