Plug MDB memory leak of DB names.

vmware
Hallvard Furuseth 12 years ago
parent ccb7b26916
commit 7d643d3acb
  1. 4
      libraries/liblmdb/mdb.c

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

Loading…
Cancel
Save