diff --git a/ext/standard/string.c b/ext/standard/string.c index 722812c56e9..ba361ff5097 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -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);