From b278a8967acf1ec2370537a00cd9c90faeb8cd3f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 7 Feb 2007 15:09:30 +0000 Subject: [PATCH] Fix redundant frees --- servers/slapd/at.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/servers/slapd/at.c b/servers/slapd/at.c index f242491d11..715477184d 100644 --- a/servers/slapd/at.c +++ b/servers/slapd/at.c @@ -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; -- 2.39.5