From: Howard Chu Date: Sat, 30 Dec 2006 12:47:17 +0000 (+0000) Subject: Fix prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~291 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=598ef9e685437dd88779de09179abbd948b06626;p=openldap Fix prev commit --- diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index 3c397c64f2..a3b9737096 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -187,15 +187,17 @@ attrs_free( Attribute *a ) { Attribute *b; - for(b = a ; b != NULL ; b = b->a_next ) { - attr_clean( b ); - if ( !b->a_next ) - break; + if ( a ) { + for(b = a ; ; b = b->a_next ) { + attr_clean( b ); + if ( !b->a_next ) + break; + } + ldap_pvt_thread_mutex_lock( &attr_mutex ); + b->a_next = attr_list; + attr_list = a; + ldap_pvt_thread_mutex_unlock( &attr_mutex ); } - ldap_pvt_thread_mutex_lock( &attr_mutex ); - b->a_next = attr_list; - attr_list = a; - ldap_pvt_thread_mutex_unlock( &attr_mutex ); } static void