diff options
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) { |