tony2001 Tue Oct 16 13:20:29 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/mysqli mysqli.c mysqli_api.c
Log:
avoid double free and use zval_dtor() where neccessary
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.16.2.18&r2=1.72.2.16.2.19&diff_format=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.72.2.16.2.18
php-src/ext/mysqli/mysqli.c:1.72.2.16.2.19
--- php-src/ext/mysqli/mysqli.c:1.72.2.16.2.18 Tue Oct 9 16:56:38 2007
+++ php-src/ext/mysqli/mysqli.c Tue Oct 16 13:20:29 2007
@@ -15,7 +15,7 @@
| Author: Georg Richter <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: mysqli.c,v 1.72.2.16.2.18 2007/10/09 16:56:38 scottmac Exp $
+ $Id: mysqli.c,v 1.72.2.16.2.19 2007/10/16 13:20:29 tony2001 Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -125,8 +125,7 @@
/* {{{ php_clear_mysql */
void php_clear_mysql(MY_MYSQL *mysql) {
if (mysql->li_read) {
- efree(Z_STRVAL_P(mysql->li_read));
- FREE_ZVAL(mysql->li_read);
+ zval_dtor(mysql->li_read);
mysql->li_read = NULL;
}
}
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.22.2.16&r2=1.118.2.22.2.17&diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16
php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.17
--- php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16 Thu Sep 6 10:07:42 2007
+++ php-src/ext/mysqli/mysqli_api.c Tue Oct 16 13:20:29 2007
@@ -15,7 +15,7 @@
| Author: Georg Richter <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: mysqli_api.c,v 1.118.2.22.2.16 2007/09/06 10:07:42 andrey Exp $
+ $Id: mysqli_api.c,v 1.118.2.22.2.17 2007/10/16 13:20:29 tony2001 Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -1170,7 +1170,6 @@
MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link",
MYSQLI_STATUS_VALID);
if (mysql->li_read) {
- efree(Z_STRVAL_P(mysql->li_read));
zval_dtor(mysql->li_read);
mysql->li_read = NULL;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php