Commit 3cd491e
committed
Fix IntlGregorianCalendar double-free of an adopted TimeZone
GregorianCalendar(TimeZone*, ...) adopts the zone in the constructor.
On U_FAILURE the calendar destructor already deletes that zone, so the
extra delete tz is a double free. 8.5 and master carry the same delete,
ahead of the unique_ptr destroying the calendar rather than after it.1 parent d09e5e2 commit 3cd491e
2 files changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | 171 | | |
173 | 172 | | |
174 | 173 | | |
| |||
0 commit comments