Skip to content

Commit 9ac5b04

Browse files
authored
ext/intl: use RETURN_NEW_STR for intl_get*id_windows_id(). (php#18501)
for non interned return values.
1 parent af87ade commit 9ac5b04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/intl/timezone/timezone_methods.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_windows_id)
646646
error = U_ZERO_ERROR;
647647
winID = intl_convert_utf16_to_utf8(uWinID.getBuffer(), uWinID.length(), &error);
648648
INTL_CHECK_STATUS(error, "could not convert time zone id to UTF-8");
649-
RETURN_STR(winID);
649+
RETURN_NEW_STR(winID);
650650
}
651651
/* }}} */
652652

@@ -684,6 +684,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_id_for_windows_id)
684684
error = U_ZERO_ERROR;
685685
id = intl_convert_utf16_to_utf8(uID.getBuffer(), uID.length(), &error);
686686
INTL_CHECK_STATUS(error, "could not convert time zone id to UTF-8");
687-
RETURN_STR(id);
687+
RETURN_NEW_STR(id);
688688
}
689689
/* }}} */

0 commit comments

Comments
 (0)