Skip to content

Commit cd64077

Browse files
committed
[skip ci] Add comment about LMDB env_close function call
1 parent 11c424c commit cd64077

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/dba/dba_lmdb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ DBA_OPEN_FUNC(lmdb)
6262

6363
rc = mdb_env_open(env, info->path, flags, mode);
6464
if (rc) {
65+
/* If this function [mdb_env_open()] fails, mdb_env_close() must be called to discard the MDB_env handle.
66+
* http://www.lmdb.tech/doc/group__mdb.html#ga32a193c6bf4d7d5c5d579e71f22e9340 */
6567
mdb_env_close(env);
6668
*error = mdb_strerror(rc);
6769
return FAILURE;

0 commit comments

Comments
 (0)