X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqconn.c;fp=src%2Fphp_pqconn.c;h=d6cccb533655f091a9ad1cb7717ca047e5bee91e;hp=976e336a4bd9cf233ade70c77705fc51bf64e055;hb=b600ed678d51ae5b48b9d12e17e491d3d92d7a7a;hpb=b9f66d2b7378c40f85111ef57e9b0922789f77df diff --git a/src/php_pqconn.c b/src/php_pqconn.c index 976e336..d6cccb5 100644 --- a/src/php_pqconn.c +++ b/src/php_pqconn.c @@ -86,6 +86,7 @@ static void php_pqconn_object_free(zend_object *o) php_resource_factory_handle_dtor(&obj->intern->factory, obj->intern->conn); 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); @@ -668,6 +669,7 @@ static PHP_METHOD(pqconn, __construct) { obj->intern->default_auto_convert = PHP_PQRES_CONV_ALL; zend_hash_init(&obj->intern->listeners, 0, NULL, ZVAL_PTR_DTOR, 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, ZVAL_PTR_DTOR, 0);