Submitted (seems like #8342).

Apologies for not doing this before.  I will go through ITS with reports in the 
future.

-Jer


From: Howard Chu<mailto:[email protected]>
Sent: Monday, December 28, 2015 12:12 AM
To: Jeremiah Morrill<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>
Subject: Re: lmdb Handle Leak with VL32 on Windows

Jeremiah Morrill wrote:
> I noticed what I believe may be a handle leak against the latest (commit
> 7b9928c) on github, with the MDB_VL32 on Windows.  After some poking around,
> it seems to be the file mapping handle, env->me_fmh.   I threw it to a
> CloseHandle in the env_close0(…) and it seemed to resolve it.

Please submit this to the ITS.
>
> Here’s a quick diff:
>
> diff --git a/src/lmdb.c b/src/mdb.c
>
> index a564d40..190c860 100644
>
> --- a/src/mdb.c
>
> +++ b/src/mdb.c
>
> @@ -5350,6 +5350,7 @@ mdb_env_close0(MDB_env *env, int excl)
>
>               }
>
> #ifdef MDB_VL32
>
> #ifdef _WIN32
>
> +   if (env->me_fmh) CloseHandle(env->me_fmh);
>
>               if (env->me_rpmutex) CloseHandle(env->me_rpmutex);
>
> #else
>
>               pthread_mutex_destroy(&env->me_rpmutex);
>


--
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Reply via email to