X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fphp_pqconn.c;h=ed7cbe180195ea67aaa2840e60a1e253efe116d8;hb=a015d26134e7d557fee53eb12a945c45de2ec890;hp=1caf4d831d19cde25a0b193193c1f0c133f614f5;hpb=b2a9a9cf919161a26c419906a2b73500bd533f96;p=m6w6%2Fext-pq 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);