Fix prev commit

This commit is contained in:
Howard Chu 2006-12-30 12:47:17 +00:00
parent e844a6956d
commit 598ef9e685

View File

@ -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