diff options
author | Felipe Pena <felipensp@gmail.com> | 2012-04-23 15:19:35 -0300 |
---|---|---|
committer | Felipe Pena <felipensp@gmail.com> | 2012-04-23 15:19:35 -0300 |
commit | 93d42fb444cbcd3850afd3db028319b8d4c30f10 (patch) | |
tree | 44af1a5edb1c491098aa7e2316247b7c8c4ec5a0 /ext/intl | |
parent | 51aacf409f6338a29aec00f528cc231eeb971272 (diff) | |
parent | 883d40667d1e71b923aa05b7a4fffc8d98ab9b5e (diff) | |
download | php-git-93d42fb444cbcd3850afd3db028319b8d4c30f10.tar.gz |
Merge branch 'PHP-5.4'
* PHP-5.4:
- Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice)
Diffstat (limited to 'ext/intl')
-rwxr-xr-x | ext/intl/msgformat/msgformat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c index b31db9d6ff..84f14de1bd 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; |