Commit: c8865e3b84c9a3d08811b3b8f954defcd8fb621d Author: Felipe Pena <[email protected]> Mon, 23 Apr 2012 15:18:12 -0300 Parents: da1b5346017899d1f09c908eee2d166249160293 Branches: PHP-5.3 PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c8865e3b84c9a3d08811b3b8f954defcd8fb621d Log: - Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice) Bugs: https://bugs.php.net/61829 Changed paths: M ext/intl/msgformat/msgformat.c Diff: diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c index b31db9d..84f14de 100755 --- a/ext/intl/msgformat/msgformat.c +++ b/ext/intl/msgformat/msgformat.c @@ -68,6 +68,10 @@ static void msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) INTL_CTOR_CHECK_STATUS(mfo, "msgfmt_create: error converting pattern to quote-friendly format"); } + if ((mfo)->mf_data.orig_format) { + msgformat_data_free(&mfo->mf_data TSRMLS_CC); + } + (mfo)->mf_data.orig_format = estrndup(pattern, pattern_len); (mfo)->mf_data.orig_format_len = pattern_len; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
