]> granicus.if.org Git - php/commitdiff
A better memory leak patch.
authorIlia Alshanetsky <iliaa@php.net>
Mon, 16 Dec 2002 07:46:36 +0000 (07:46 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 16 Dec 2002 07:46:36 +0000 (07:46 +0000)
ext/pgsql/pgsql.c

index f399271b1f240e9526462606592ce85988524b78..f72e121a6b06cf5fc1a2a6d56c40b3f74fea140d 100644 (file)
@@ -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;