diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index f652e9000c40a..6ff0cf5137790 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -646,7 +646,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_windows_id) error = U_ZERO_ERROR; winID = intl_convert_utf16_to_utf8(uWinID.getBuffer(), uWinID.length(), &error); INTL_CHECK_STATUS(error, "could not convert time zone id to UTF-8"); - RETURN_STR(winID); + RETURN_NEW_STR(winID); } /* }}} */ @@ -684,6 +684,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_id_for_windows_id) error = U_ZERO_ERROR; id = intl_convert_utf16_to_utf8(uID.getBuffer(), uID.length(), &error); INTL_CHECK_STATUS(error, "could not convert time zone id to UTF-8"); - RETURN_STR(id); + RETURN_NEW_STR(id); } /* }}} */