cvs: php-src /ext/mysql php_mysql.c
| From: | Antony Dovgal | Date: | Thu, 08 Nov 2007 13:28:39 +0000 |
| Subject: | cvs: php-src /ext/mysql php_mysql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-47064@lists.php.net to get a copy of this message | ||
tony2001 Thu Nov 8 13:28:39 2007 UTC
Modified files:
/php-src/ext/mysql php_mysql.c
Log:
plug memory leak on invalid result type
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.246&r2=1.247&diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.246 php-src/ext/mysql/php_mysql.c:1.247
--- php-src/ext/mysql/php_mysql.c:1.246 Tue Oct 16 20:58:35 2007
+++ php-src/ext/mysql/php_mysql.c Thu Nov 8 13:28:38 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.246 2007/10/16 20:58:35 andrey Exp $ */
+/* $Id: php_mysql.c,v 1.247 2007/11/08 13:28:38 tony2001 Exp $ */
/* TODO:
*
@@ -2056,6 +2056,7 @@
if ((result_type & MYSQL_BOTH) == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type should be either MYSQL_NUM,
MYSQL_ASSOC or MYSQL_BOTH");
+ result_type = MYSQL_BOTH;
}
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);