From f620fdbed3d90313b7eb8a5f546ded6f50f976c6 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 16 Dec 2002 07:46:36 +0000 Subject: [PATCH] A better memory leak patch. --- ext/pgsql/pgsql.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index f399271b1f..f72e121a6b 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -427,7 +427,8 @@ PHP_MINIT_FUNCTION(pgsql) PHP_MSHUTDOWN_FUNCTION(pgsql) { UNREGISTER_INI_ENTRIES(); - + zend_hash_destroy(&PGG(notices)); + return SUCCESS; } /* }}} */ @@ -447,7 +448,7 @@ PHP_RINIT_FUNCTION(pgsql) PHP_RSHUTDOWN_FUNCTION(pgsql) { /* clean up notice messages */ - zend_hash_destroy(&PGG(notices)); + zend_hash_clean(&PGG(notices)); /* clean up persistent connection */ zend_hash_apply(&EG(persistent_list), (apply_func_t) _rollback_transactions TSRMLS_CC); return SUCCESS; -- 2.40.0