tony2001 Wed Aug 23 19:15:46 2006 UTC
Modified files:
/php-src/ext/pdo pdo_stmt.c
Log:
fix possible crash in free_statement()
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.165&r2=1.166&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.165 php-src/ext/pdo/pdo_stmt.c:1.166
--- php-src/ext/pdo/pdo_stmt.c:1.165 Wed Aug 9 14:46:35 2006
+++ php-src/ext/pdo/pdo_stmt.c Wed Aug 23 19:15:46 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_stmt.c,v 1.165 2006/08/09 14:46:35 iliaa Exp $ */
+/* $Id: pdo_stmt.c,v 1.166 2006/08/23 19:15:46 tony2001 Exp $ */
/* The PDO Statement Handle Class */
@@ -2168,7 +2168,9 @@
do_fetch_opt_finish(stmt, 1 TSRMLS_CC);
zend_objects_store_del_ref(&stmt->database_object_handle TSRMLS_CC);
- php_pdo_dbh_delref(stmt->dbh TSRMLS_CC);
+ if (stmt->dbh) {
+ php_pdo_dbh_delref(stmt->dbh TSRMLS_CC);
+ }
efree(stmt);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php