diff options
Diffstat (limited to 'ext/intl/msgformat/msgformat_format.c')
-rw-r--r-- | ext/intl/msgformat/msgformat_format.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c index 959a4fd5a0..73fb5eeff6 100644 --- a/ext/intl/msgformat/msgformat_format.c +++ b/ext/intl/msgformat/msgformat_format.c @@ -50,11 +50,10 @@ static void msgfmt_do_format(MessageFormatter_object *mfo, zval *args, zval *ret zend_hash_destroy(args_copy); efree(args_copy); - if (formatted && U_FAILURE(INTL_DATA_ERROR_CODE(mfo))) { - efree(formatted); - } - if (U_FAILURE(INTL_DATA_ERROR_CODE(mfo))) { + if (formatted) { + efree(formatted); + } RETURN_FALSE; } else { INTL_METHOD_RETVAL_UTF8(mfo, formatted, formatted_len, 1); |