]> git.sur5r.net Git - openldap/commitdiff
ITS#5322 don't try to free a NULL locker
authorHoward Chu <hyc@openldap.org>
Fri, 11 Jan 2008 00:44:12 +0000 (00:44 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 11 Jan 2008 00:44:12 +0000 (00:44 +0000)
servers/slapd/back-bdb/init.c

index 253a3d6098942e955443dc5bc9fc884f48ce2161..f87adbeac70f7b44e3507b28c4ada2f99cb815ae 100644 (file)
@@ -600,7 +600,7 @@ bdb_db_close( BackendDB *be, ConfigReply *cr )
        /* close db environment */
        if( bdb->bi_dbenv ) {
                /* Free cache locker if we enabled locking */
-               if ( !( slapMode & SLAP_TOOL_QUICK )) {
+               if ( !( slapMode & SLAP_TOOL_QUICK ) && bdb->bi_cache.c_locker ) {
 #if DB_VERSION_FULL >= 0x04060012
                        XLOCK_ID_FREE(bdb->bi_dbenv, bdb->bi_cache.c_locker->id);
 #else