X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqconn.c;h=ed7cbe180195ea67aaa2840e60a1e253efe116d8;hp=1caf4d831d19cde25a0b193193c1f0c133f614f5;hb=df586b558795570822225a3a458bd91a1f7ab433;hpb=1b5358df410e66224c7e8251d286134b0f3f59d3 diff --git a/src/php_pqconn.c b/src/php_pqconn.c index 1caf4d8..ed7cbe1 100644 --- a/src/php_pqconn.c +++ b/src/php_pqconn.c @@ -78,6 +78,7 @@ static void php_pqconn_object_free(void *o TSRMLS_DC) php_resource_factory_handle_dtor(&obj->intern->factory, obj->intern->conn TSRMLS_CC); php_resource_factory_dtor(&obj->intern->factory); zend_hash_destroy(&obj->intern->listeners); + zend_hash_destroy(&obj->intern->statements); zend_hash_destroy(&obj->intern->converters); zend_hash_destroy(&obj->intern->eventhandlers); efree(obj->intern); @@ -679,6 +680,7 @@ static PHP_METHOD(pqconn, __construct) { obj->intern->default_auto_convert = PHP_PQRES_CONV_ALL; zend_hash_init(&obj->intern->listeners, 0, NULL, (dtor_func_t) zend_hash_destroy, 0); + zend_hash_init(&obj->intern->statements, 0, NULL, NULL, 0); zend_hash_init(&obj->intern->converters, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_init(&obj->intern->eventhandlers, 0, NULL, (dtor_func_t) zend_hash_destroy, 0);