]> git.sur5r.net Git - openldap/commitdiff
Plug MDB memory leak of DB names.
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 31 Mar 2013 21:50:02 +0000 (23:50 +0200)
committerHallvard Furuseth <hallvard@openldap.org>
Sun, 31 Mar 2013 21:50:02 +0000 (23:50 +0200)
libraries/liblmdb/mdb.c

index dff463b46821f1cabd30f316d9a6ee620a2b9325..438838f615eadd83a62e1e8b1f93027d9d6d6870 100644 (file)
@@ -3707,10 +3707,14 @@ void
 mdb_env_close(MDB_env *env)
 {
        MDB_page *dp;
+       int i;
 
        if (env == NULL)
                return;
 
+       for (i = env->me_numdbs; --i > MAIN_DBI; )
+               free(env->me_dbxs[i].md_name.mv_data);
+
        VGMEMP_DESTROY(env);
        while ((dp = env->me_dpages) != NULL) {
                VGMEMP_DEFINED(&dp->mp_next, sizeof(dp->mp_next));