diff options
author | Felipe Pena <felipe@php.net> | 2011-08-04 00:59:43 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2011-08-04 00:59:43 +0000 |
commit | 463de70efd83274ba8df51a4b75a21c8e6382baa (patch) | |
tree | a0cacf789b53b51ba4e0411973dc39244660025e /ext/intl/msgformat/msgformat_attr.c | |
parent | 38cb153c427220558147b55a4715860aec4ada04 (diff) | |
download | php-git-463de70efd83274ba8df51a4b75a21c8e6382baa.tar.gz |
- Fixed possible efree(NULL) (bug #55296)
Diffstat (limited to 'ext/intl/msgformat/msgformat_attr.c')
-rwxr-xr-x | ext/intl/msgformat/msgformat_attr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/intl/msgformat/msgformat_attr.c b/ext/intl/msgformat/msgformat_attr.c index 47350b2b45..cf34665142 100755 --- a/ext/intl/msgformat/msgformat_attr.c +++ b/ext/intl/msgformat/msgformat_attr.c @@ -90,7 +90,9 @@ PHP_FUNCTION( msgfmt_set_pattern ) /* TODO: add parse error information */ umsg_applyPattern(MSG_FORMAT_OBJECT(mfo), spattern, spattern_len, NULL, &INTL_DATA_ERROR_CODE(mfo)); - efree(spattern); + if (spattern) { + efree(spattern); + } INTL_METHOD_CHECK_STATUS(mfo, "Error setting symbol value"); if(mfo->mf_data.orig_format) { |