]> git.sur5r.net Git - openldap/commitdiff
Fix - don't free constant database names
authorHoward Chu <hyc@openldap.org>
Thu, 20 Dec 2001 08:47:32 +0000 (08:47 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 20 Dec 2001 08:47:32 +0000 (08:47 +0000)
servers/slapd/back-bdb/init.c

index 53e4373c1d293caa9178602fcdcf89eaa1ac4f7f..0574375c08b606ad77630cfa98311dd6389eff40 100644 (file)
@@ -324,7 +324,8 @@ bdb_db_close( BackendDB *be )
        while( bdb->bi_ndatabases-- ) {
                db = bdb->bi_databases[bdb->bi_ndatabases];
                rc = db->bdi_db->close( db->bdi_db, 0 );
-               if( db->bdi_name )
+               /* Lower numbered names are not strdup'd */
+               if( bdb->bi_ndatabases >= BDB_NDB )
                        free( db->bdi_name );
                free( db );
        }