This doesn't look right. You shouldn't be touching this in MINIT/MSHUTDOWN as they are not per-thread.

Andi

At 07:46 AM 12/16/2002 +0000, Ilia Alshanetsky wrote:
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;



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to