blob: 3fd51a3b26c117e005887283e50f6b94da75ee46 [file] [log] [blame]
diff --git a/source/i18n/smpdtfmt.cpp b/source/i18n/smpdtfmt.cpp
index 98f36b3e..4fd1675e 100644
--- a/source/i18n/smpdtfmt.cpp
+++ b/source/i18n/smpdtfmt.cpp
@@ -3998,6 +3998,7 @@ void SimpleDateFormat::adoptCalendar(Calendar* calendarToAdopt)
DateFormatSymbols *newSymbols =
DateFormatSymbols::createForLocale(calLocale, status);
if (U_FAILURE(status)) {
+ delete calendarToAdopt;
return;
}
DateFormat::adoptCalendar(calendarToAdopt);