cvs: php4 /ext/pgsql pgsql.c
| From: | Ilia Alshanetsky | Date: | Mon, 16 Dec 2002 07:46:36 +0000 |
| Subject: | cvs: php4 /ext/pgsql pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-17232@lists.php.net to get a copy of this message | ||
iliaa Mon Dec 16 02:46:36 2002 EDT
Modified files:
/php4/ext/pgsql pgsql.c
Log:
A better memory leak patch.
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.251 php4/ext/pgsql/pgsql.c:1.252
--- php4/ext/pgsql/pgsql.c:1.251 Sun Dec 15 01:44:30 2002
+++ php4/ext/pgsql/pgsql.c Mon Dec 16 02:46:36 2002
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.251 2002/12/15 06:44:30 iliaa Exp $ */
+/* $Id: pgsql.c,v 1.252 2002/12/16 07:46:36 iliaa Exp $ */
#include <stdlib.h>
@@ -427,7 +427,8 @@
PHP_MSHUTDOWN_FUNCTION(pgsql)
{
UNREGISTER_INI_ENTRIES();
-
+ zend_hash_destroy(&PGG(notices));
+
return SUCCESS;
}
/* }}} */
@@ -447,7 +448,7 @@
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;