From 684c01ed1f23ca1c7ead6867b2524973a2af4a0e Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
Date: Tue, 20 Dec 2005 00:48:15 +0000
Subject: [PATCH] ITS#4259 revert prev commit, fixed in alock.c instead.

---
 servers/slapd/back-bdb/init.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c
index c1a0bfcc62..989b467e37 100644
--- a/servers/slapd/back-bdb/init.c
+++ b/servers/slapd/back-bdb/init.c
@@ -594,13 +594,11 @@ bdb_db_close( BackendDB *be )
 		}
 	}
 
-	if ( bdb->bi_alock_info.al_slot > 0 ) {
-		rc = alock_close( &bdb->bi_alock_info );
-		if( rc != 0 ) {
-			Debug( LDAP_DEBUG_ANY,
-				"bdb_db_close: alock_close failed\n", 0, 0, 0 );
-			return -1;
-		}
+	rc = alock_close( &bdb->bi_alock_info );
+	if( rc != 0 ) {
+		Debug( LDAP_DEBUG_ANY,
+			"bdb_db_close: alock_close failed\n", 0, 0, 0 );
+		return -1;
 	}
 
 	return 0;
-- 
GitLab