ICU-5454 Fix some new memory leaks.
X-SVN-Rev: 21981
This commit is contained in:
parent
f7b943c98e
commit
57f9ad80e7
@ -324,6 +324,9 @@ RuleBasedTimeZone::complete(UErrorCode& status) {
|
||||
}
|
||||
}
|
||||
fUpToDate = TRUE;
|
||||
if (done != NULL) {
|
||||
uprv_free(done);
|
||||
}
|
||||
return;
|
||||
|
||||
cleanup:
|
||||
|
@ -1045,6 +1045,8 @@ SimpleTimeZone::initTransitionRules(UErrorCode& status) {
|
||||
// For now, use ID + "(DST)" as the name
|
||||
dstRule = new AnnualTimeZoneRule(tzid+"(DST)", getRawOffset(), getDSTSavings(),
|
||||
*dtRule, startYear, AnnualTimeZoneRule::MAX_YEAR);
|
||||
delete dtRule;
|
||||
dtRule = NULL;
|
||||
|
||||
// Calculate the first DST start time
|
||||
dstRule->getFirstStart(getRawOffset(), 0, firstDstStart);
|
||||
@ -1069,6 +1071,8 @@ SimpleTimeZone::initTransitionRules(UErrorCode& status) {
|
||||
// For now, use ID + "(STD)" as the name
|
||||
stdRule = new AnnualTimeZoneRule(tzid+"(STD)", getRawOffset(), 0,
|
||||
*dtRule, startYear, AnnualTimeZoneRule::MAX_YEAR);
|
||||
delete dtRule;
|
||||
dtRule = NULL;
|
||||
|
||||
// Calculate the first STD start time
|
||||
stdRule->getFirstStart(getRawOffset(), dstRule->getDSTSavings(), firstStdStart);
|
||||
|
@ -466,7 +466,7 @@ TimeZoneRuleTest::TestRBTZTransition(void) {
|
||||
// Descending/inclusive
|
||||
compareTransitionsDescending(*tz, *rbtz, start + 1, until, TRUE);
|
||||
}
|
||||
delete trsrules;
|
||||
delete [] trsrules;
|
||||
delete rbtz;
|
||||
delete tz;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user