From: Hallvard Furuseth Date: Sun, 31 Mar 2013 21:50:02 +0000 (+0200) Subject: Plug MDB memory leak of DB names. X-Git-Tag: OPENLDAP_REL_ENG_2_4_36~89^2~9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7d643d3acb94a6d7306330b550fce0e5755444a9;p=openldap Plug MDB memory leak of DB names. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index dff463b468..438838f615 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -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));