]> git.sur5r.net Git - openldap/commitdiff
Put *free(NULL) asserts behind LDAP_MEMORY_DEBUG
authorKurt Zeilenga <kurt@openldap.org>
Fri, 11 Feb 2000 21:11:44 +0000 (21:11 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 11 Feb 2000 21:11:44 +0000 (21:11 +0000)
libraries/libldap/controls.c

index cab753e8810a00b3d20ccf2de46a485d66b16e5b..3632b8fc0f44513b614556cf61baa091581c9ca9 100644 (file)
@@ -226,7 +226,9 @@ int ldap_int_get_controls(
 void
 ldap_control_free( LDAPControl *c )
 {
+#ifdef LDAP_MEMORY_DEBUG
        assert( c != NULL );
+#endif
 
        if ( c != NULL ) {
                if( c->ldctl_oid != NULL) {
@@ -247,7 +249,9 @@ ldap_control_free( LDAPControl *c )
 void
 ldap_controls_free( LDAPControl **controls )
 {
+#ifdef LDAP_MEMORY_DEBUG
        assert( controls != NULL );
+#endif
 
        if ( controls != NULL ) {
                int i;