helly Mon Oct 31 02:47:44 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src/ext/pdo pdo_stmt.c
Log:
- Fix remaining memleaks
# all tests pass for me now for the first time in:
# pgsql, mysql, sqlite, sqlite2
http://cvs.php.net/diff.php/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.14&r2=1.118.2.15&ty=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.14
php-src/ext/pdo/pdo_stmt.c:1.118.2.15
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.14 Sun Oct 30 22:23:38 2005
+++ php-src/ext/pdo/pdo_stmt.c Mon Oct 31 02:47:40 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_stmt.c,v 1.118.2.14 2005/10/31 03:23:38 wez Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.15 2005/10/31 07:47:40 helly Exp $ */
/* The PDO Statement Handle Class */
@@ -1055,6 +1055,7 @@
} else {
*return_value = *retval;
zval_copy_ctor(return_value);
+ INIT_PZVAL(return_value);
zval_ptr_dtor(&retval);
}
}
@@ -1401,7 +1402,9 @@
if (error != 2) {
RETURN_FALSE;
} else { /* on no results, return an empty array */
- array_init(return_value);
+ if (Z_TYPE_P(return_value) != IS_ARRAY) {
+ array_init(return_value);
+ }
return;
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php