X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqstm.c;h=0dd2ebc50cd2532e027ef94762e9ce2f2e4ed8b8;hp=10d57686ae9d5c91fc6db135c00b9c84ef776243;hb=90fc98eef3e8e57c2583bca4685806c3fdf183b9;hpb=3b0f6e8d71bc2a7c4f2649fb81ae305f93f9efc3 diff --git a/src/php_pqstm.c b/src/php_pqstm.c index 10d5768..0dd2ebc 100644 --- a/src/php_pqstm.c +++ b/src/php_pqstm.c @@ -29,7 +29,7 @@ zend_class_entry *php_pqstm_class_entry; static zend_object_handlers php_pqstm_object_handlers; static HashTable php_pqstm_object_prophandlers; -static void php_pqstm_deallocate(php_pqstm_object_t *obj, zend_bool async, zend_bool silent) +static void php_pqstm_deallocate(php_pqstm_object_t *obj, zend_bool async, zend_bool silent TSRMLS_DC) { if (obj->intern->allocated) { char *quoted_name = PQescapeIdentifier(obj->intern->conn->intern->conn, obj->intern->name, strlen(obj->intern->name)); @@ -75,10 +75,11 @@ static void php_pqstm_object_free(void *o TSRMLS_DC) if (obj->intern) { if (obj->intern->conn->intern) { php_pq_callback_dtor(&obj->intern->conn->intern->onevent); - php_pqstm_deallocate(obj, 0, 1); + php_pqstm_deallocate(obj, 0, 1 TSRMLS_CC); 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);