]> git.sur5r.net Git - openldap/commitdiff
fix various memory leaks
authorMark Adamson <adamson@openldap.org>
Mon, 5 Nov 2001 23:14:42 +0000 (23:14 +0000)
committerMark Adamson <adamson@openldap.org>
Mon, 5 Nov 2001 23:14:42 +0000 (23:14 +0000)
libraries/libldap_r/thr_posix.c
servers/slapd/root_dse.c
servers/slapd/sasl.c
servers/slapd/schema_init.c

index 07e1e8f6ea392c893a8c80ba524e8e5cfafebd95..4c322cf4b313a0cc0a4bd1600c32c758bdb06d78 100644 (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,
index 19c6291015b20a8209cbe24e53da6168dc7d5d09..68166471f8a8fc26d2893eae0dd673708b9b575b 100644 (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 ) {
index e41c28d2bf33da106443d37c76e141f8d188518c..f2907b47dba732148b447c182ab4cc2d8a413d70 100644 (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 ));
index e88a9fe368898c6bce17e9ed29afc5c623347250..cfb9494b077b1322569c39c21e336651be65c970 100644 (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;
        }