tony2001 Thu Dec 21 01:03:55 2006 UTC
Modified files: (Branch: PHP_4_4)
/php-src/ext/posix posix.c
Log:
MFH fix leaks on errors
http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.51.2.4.2.1&r2=1.51.2.4.2.2&diff_format=u
Index: php-src/ext/posix/posix.c
diff -u php-src/ext/posix/posix.c:1.51.2.4.2.1
php-src/ext/posix/posix.c:1.51.2.4.2.2
--- php-src/ext/posix/posix.c:1.51.2.4.2.1 Sun Jan 1 13:46:56 2006
+++ php-src/ext/posix/posix.c Thu Dec 21 01:03:54 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: posix.c,v 1.51.2.4.2.1 2006/01/01 13:46:56 sniper Exp $ */
+/* $Id: posix.c,v 1.51.2.4.2.2 2006/12/21 01:03:54 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -134,7 +134,7 @@
static PHP_MINFO_FUNCTION(posix)
{
php_info_print_table_start();
- php_info_print_table_row(2, "Revision", "$Revision: 1.51.2.4.2.1 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.51.2.4.2.2 $");
php_info_print_table_end();
}
/* }}} */
@@ -822,6 +822,7 @@
}
if (!php_posix_group_to_array(g, return_value)) {
+ zval_dtor(return_value);
php_error(E_WARNING, "%s() unable to convert posix group to
array",
get_active_function_name(TSRMLS_C));
RETURN_FALSE;
@@ -853,6 +854,7 @@
}
if (!php_posix_group_to_array(g, return_value)) {
+ zval_dtor(return_value);
php_error(E_WARNING, "%s() unable to convert posix group struct
to array",
get_active_function_name(TSRMLS_C));
RETURN_FALSE;
@@ -898,6 +900,7 @@
}
if (!php_posix_passwd_to_array(pw, return_value)) {
+ zval_dtor(return_value);
php_error(E_WARNING, "%s() unable to convert posix passwd
struct to array",
get_active_function_name(TSRMLS_C));
RETURN_FALSE;
@@ -927,6 +930,7 @@
}
if (!php_posix_passwd_to_array(pw, return_value)) {
+ zval_dtor(return_value);
php_error(E_WARNING, "%s() unable to convert posix passwd
struct to array",
get_active_function_name(TSRMLS_C));
RETURN_FALSE;
@@ -1046,8 +1050,10 @@
}
for (l=limits; l->name; l++) {
- if (posix_addlimit(l->limit, l->name, return_value TSRMLS_CC)
== FAILURE)
+ if (posix_addlimit(l->limit, l->name, return_value TSRMLS_CC)
== FAILURE) {
+ zval_dtor(return_value);
RETURN_FALSE;
+ }
}
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php