Skip to content

Commit 5b83b3a

Browse files
committed
Fix memory leak in LMDB driver
1 parent 3b7babf commit 5b83b3a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2022, PHP 8.0.23
44

5+
- DBA:
6+
. Fixed LMDB driver memory leak on DB creation failure (Girgias)
7+
58
- Standard:
69
. Fixed bug GH-9017 (php_stream_sock_open_from_socket could return NULL).
710
(Heiko Weber)

ext/dba/dba_lmdb.c

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ DBA_OPEN_FUNC(lmdb)
7272

7373
rc = mdb_env_open(env, info->path, flags, mode);
7474
if (rc) {
75+
mdb_env_close(env);
7576
*error = mdb_strerror(rc);
7677
return FAILURE;
7778
}

0 commit comments

Comments
 (0)