SimpleDateFormat::adoptCalendar leak calendarToAdopt upon error

Description

The return in "if (U_FAILURE(status))" of SimpleDateFormat::adoptCalendar leak calendarToAdopt

this is discovered by ASAN when we try to fix a chrome bug in https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8904022980095859248/+/steps/Check/0/logs/regress-997401/0

We should call delete calendarToAdopt before the return.

Assignee

Frank Yung-Fong Tang

Reporter

Frank Yung-Fong Tang

Components

Labels

None

Reviewer

None

Priority

medium

Time Needed

Hours

Fix versions

Configure