iliaa Sat Jan 4 23:29:14 2003 EDT Modified files: /php4/ext/standard string.c Log: Fixed a memory leak in setlocale() & localeconv(). Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.341 php4/ext/standard/string.c:1.342 --- php4/ext/standard/string.c:1.341 Wed Jan 1 06:04:44 2003 +++ php4/ext/standard/string.c Sat Jan 4 23:29:14 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.341 2003/01/01 11:04:44 wez Exp $ */ +/* $Id: string.c,v 1.342 2003/01/05 04:29:14 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3199,6 +3199,7 @@ 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,13 +3743,13 @@ 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);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php