From: Michael Wallner Date: Fri, 12 Feb 2016 16:34:20 +0000 (+0100) Subject: fix leak X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=84ede02ee3a07d099b921fe965898282cc68902a;p=m6w6%2Fext-psi fix leak --- diff --git a/tests/sqlite/sqlite.psi b/tests/sqlite/sqlite.psi index 4fea4c6..594332e 100644 --- a/tests/sqlite/sqlite.psi +++ b/tests/sqlite/sqlite.psi @@ -67,4 +67,5 @@ function sqlite3\exec(object $db, string $sql, callable $cb, mixed $cd, string & let errmsg = &NULL; return to_int(sqlite3_exec); set $error = to_string(*errmsg); + free sqlite3_free(*errmsg); } diff --git a/tests/sqlite/sqlite001.phpt b/tests/sqlite/sqlite001.phpt index 41b25e7..a5e1316 100644 --- a/tests/sqlite/sqlite001.phpt +++ b/tests/sqlite/sqlite001.phpt @@ -52,11 +52,6 @@ if ($rc) { sqlite3\close($db); -$rc = sqlite3\exec($db, "SELECT * FROM test", "callback", new stdClass, $error); -if ($rc) { - printf("%s: '%s'\n", sqlite3\errstr($rc), $error); -} - ?> ===DONE=== --EXPECTF-- @@ -78,7 +73,6 @@ string(%d) "3.%d.%s" 2: data = three SQL logic error or missing database: 'no tables specified' -library routine called out of sequence: '' ===DONE=== --CLEAN--