Skip to content

Commit bea66c0

Browse files
committed
Fix memory leak for TokyoCabinet driver
Also fix corresponding test
1 parent 476ecc6 commit bea66c0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ext/dba/dba_tcadb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ DBA_CLOSE_FUNC(tcadb)
7777
dba_tcadb_data *dba = info->dbf;
7878

7979
tcadbclose(dba->tcadb);
80+
tcadbdel(dba->tcadb);
8081
pefree(dba, info->flags & DBA_PERSISTENT);
8182
}
8283

ext/dba/tests/dba_tcadb.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dba
99
?>
1010
--FILE--
1111
<?php
12+
$handler = 'tcadb';
1213
$lock_flag = 'l';
1314
$db_filename = $db_file = __DIR__ .'/test0.tch';
1415
@unlink($db_filename);

0 commit comments

Comments
 (0)