1
0
mirror of https://github.com/danog/ext-pq.git synced 2024-11-30 04:19:49 +01:00

fix leak; fix test

This commit is contained in:
Michael Wallner 2014-12-17 08:38:31 +01:00
parent a76b00c331
commit 90fc98eef3
2 changed files with 2 additions and 1 deletions

View File

@ -79,6 +79,7 @@ static void php_pqstm_object_free(void *o TSRMLS_DC)
php_pq_object_delref(obj->intern->conn TSRMLS_CC); php_pq_object_delref(obj->intern->conn TSRMLS_CC);
} }
efree(obj->intern->name); efree(obj->intern->name);
efree(obj->intern->query);
zend_hash_destroy(&obj->intern->bound); zend_hash_destroy(&obj->intern->bound);
if (obj->intern->params) { if (obj->intern->params) {
php_pq_params_free(&obj->intern->params); php_pq_params_free(&obj->intern->params);

View File

@ -11,7 +11,7 @@ echo "Test\n";
include "_setup.inc"; include "_setup.inc";
$c = new pq\Connection(PQ_DSN); $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=== ===DONE===