don't trick coverity...

This commit is contained in:
Pierangelo Masarati 2007-08-16 11:32:10 +00:00
parent f7a6c4360c
commit 9029c0902f

View File

@ -185,9 +185,10 @@ comp_tree_free( Attribute *a )
void
attrs_free( Attribute *a )
{
Attribute *b, *tail, *next;
if ( a ) {
Attribute *b = (Attribute *)0xBAD, *tail, *next;
/* save tail */
tail = a;
do {
next = a->a_next;
@ -198,6 +199,8 @@ attrs_free( Attribute *a )
} while ( next );
ldap_pvt_thread_mutex_lock( &attr_mutex );
/* replace NULL with current attr list and let attr list
* start from last attribute returned to list */
tail->a_next = attr_list;
attr_list = b;
ldap_pvt_thread_mutex_unlock( &attr_mutex );