iliaa Wed Jun 27 02:02:18 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/pdo pdo_dbh.c
Log:
Fixed a crash inside PDO when there is more then one instance of a
persistent connection inside a script and PDO object is extended by class
with a destructor
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.82.2.31.2.11&r2=1.82.2.31.2.12&diff_format=u
Index: php-src/ext/pdo/pdo_dbh.c
diff -u php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.11
php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.12
--- php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.11 Wed May 16 19:33:57 2007
+++ php-src/ext/pdo/pdo_dbh.c Wed Jun 27 02:02:18 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_dbh.c,v 1.82.2.31.2.11 2007/05/16 19:33:57 iliaa Exp $ */
+/* $Id: pdo_dbh.c,v 1.82.2.31.2.12 2007/06/27 02:02:18 iliaa Exp $ */
/* The PDO Database Handle Class */
@@ -1423,6 +1423,12 @@
}
}
+ if (dbh->properties) {
+ zend_hash_destroy(dbh->properties);
+ efree(dbh->properties);
+ dbh->properties = NULL;
+ }
+
pefree(dbh, dbh->is_persistent);
}
@@ -1443,12 +1449,6 @@
dbh->in_txn = 0;
}
- if (dbh->properties) {
- zend_hash_destroy(dbh->properties);
- efree(dbh->properties);
- dbh->properties = NULL;
- }
-
if (!dbh->is_persistent) {
dbh_free(dbh TSRMLS_CC);
} else if (dbh->methods && dbh->methods->persistent_shutdown) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php