From 90fc98eef3e8e57c2583bca4685806c3fdf183b9 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 17 Dec 2014 08:38:31 +0100 Subject: [PATCH] fix leak; fix test --- src/php_pqstm.c | 1 + tests/crash_txn_reverse_dep.phpt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/php_pqstm.c b/src/php_pqstm.c index f6da067..0dd2ebc 100644 --- a/src/php_pqstm.c +++ b/src/php_pqstm.c @@ -79,6 +79,7 @@ static void php_pqstm_object_free(void *o TSRMLS_DC) php_pq_object_delref(obj->intern->conn TSRMLS_CC); } efree(obj->intern->name); + efree(obj->intern->query); zend_hash_destroy(&obj->intern->bound); if (obj->intern->params) { php_pq_params_free(&obj->intern->params); diff --git a/tests/crash_txn_reverse_dep.phpt b/tests/crash_txn_reverse_dep.phpt index 7c9e8fc..d1a5cf1 100644 --- a/tests/crash_txn_reverse_dep.phpt +++ b/tests/crash_txn_reverse_dep.phpt @@ -11,7 +11,7 @@ echo "Test\n"; include "_setup.inc"; $c = new pq\Connection(PQ_DSN); -$c->c = $c->declare("test", "SELECT 1"); +$c->c = $c->declare("test", pq\Cursor::WITH_HOLD, "SELECT 1"); ?> ===DONE=== -- 2.30.2