]> git.sur5r.net Git - openldap/commitdiff
Fix redundant frees
authorHoward Chu <hyc@openldap.org>
Wed, 7 Feb 2007 15:09:30 +0000 (15:09 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 7 Feb 2007 15:09:30 +0000 (15:09 +0000)
servers/slapd/at.c

index f242491d11d909ac34a5310e633d9699481a0e4a..715477184ded33f5dbb2528577e70d69ec98b285 100644 (file)
@@ -284,8 +284,14 @@ at_clean( AttributeType *a )
                }
        }
 
-       if ( a->sat_oidmacro ) ldap_memfree( a->sat_oidmacro );
-       if ( a->sat_subtypes ) ldap_memfree( a->sat_subtypes );
+       if ( a->sat_oidmacro ) {
+               ldap_memfree( a->sat_oidmacro );
+               a->sat_oidmacro = NULL;
+       }
+       if ( a->sat_subtypes ) {
+               ldap_memfree( a->sat_subtypes );
+               a->sat_subtypes = NULL;
+       }
 }
 
 static void
@@ -339,7 +345,7 @@ at_next( AttributeType **at )
 {
        assert( at != NULL );
 
-#if 1  /* pedantic check */
+#if 0  /* pedantic check: don't use this */
        {
                AttributeType *tmp = NULL;