fix various memory leaks

This commit is contained in:
Mark Adamson 2001-11-05 23:14:42 +00:00
parent b9269f30e8
commit e0ff8d6782
4 changed files with 10 additions and 0 deletions

View File

@ -113,6 +113,7 @@ ldap_pvt_thread_create( ldap_pvt_thread_t * thread,
(void) pthread_detach( *thread );
}
#endif
pthread_attr_destroy(&attr);
#else
rtn = pthread_create( thread, LDAP_INT_THREAD_ATTR_DEFAULT,

View File

@ -120,6 +120,7 @@ root_dse_info(
val.bv_len = strlen( val.bv_val );
attr_merge( e, ad_supportedSASLMechanisms, vals );
}
charray_free( supportedSASLMechanisms );
}
if ( default_referral != NULL ) {

View File

@ -713,6 +713,10 @@ int slap_sasl_bind(
NULL, errstr, NULL, NULL );
}
if( response.bv_len ) {
ch_free( response.bv_val );
}
#ifdef NEW_LOGGING
LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
"slap_sasl_bind: rc=%d\n", rc ));

View File

@ -1550,6 +1550,10 @@ int caseExactIgnoreSubstringsFilter(
}
if( nkeys == 0 ) {
ch_free( sa->sa_final );
ber_bvecfree( sa->sa_any );
ch_free( sa->sa_initial );
ch_free( sa );
*keysp = NULL;
return LDAP_SUCCESS;
}