summaryrefslogtreecommitdiff
path: root/ext/intl/msgformat/msgformat_attr.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2011-08-04 00:59:43 +0000
committerFelipe Pena <felipe@php.net>2011-08-04 00:59:43 +0000
commit463de70efd83274ba8df51a4b75a21c8e6382baa (patch)
treea0cacf789b53b51ba4e0411973dc39244660025e /ext/intl/msgformat/msgformat_attr.c
parent38cb153c427220558147b55a4715860aec4ada04 (diff)
downloadphp-git-463de70efd83274ba8df51a4b75a21c8e6382baa.tar.gz
- Fixed possible efree(NULL) (bug #55296)
Diffstat (limited to 'ext/intl/msgformat/msgformat_attr.c')
-rwxr-xr-xext/intl/msgformat/msgformat_attr.c4
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) {