1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00

Fixed a memory leak in setlocale() & localeconv().

This commit is contained in:
Ilia Alshanetsky
2003-01-05 04:29:14 +00:00
parent 43630e2ac0
commit d5a8bb2d0b
+4 -3
View File
@@ -3199,6 +3199,7 @@ PHP_FUNCTION(setlocale)
cat = LC_TIME;
else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid locale category name %s, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME.", category);
efree(args);
RETURN_FALSE;
}
}
@@ -3742,14 +3743,14 @@ PHP_FUNCTION(localeconv)
zval *grouping, *mon_grouping;
int len, i;
MAKE_STD_ZVAL(grouping);
MAKE_STD_ZVAL(mon_grouping);
/* We don't need no stinkin' parameters... */
if (ZEND_NUM_ARGS() > 0) {
WRONG_PARAM_COUNT;
}
MAKE_STD_ZVAL(grouping);
MAKE_STD_ZVAL(mon_grouping);
array_init(return_value);
array_init(grouping);
array_init(mon_grouping);