mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-5708 Fix a memory leak
X-SVN-Rev: 22305
This commit is contained in:
parent
f3ffdb5afc
commit
9991e6a097
1 changed files with 5 additions and 8 deletions
|
@ -921,10 +921,10 @@ SimpleDateFormat::zoneIDCanonicalize(UnicodeString &zid) const
|
|||
|
||||
UResourceBundle* tryThisZone = ures_getByKey(zoneFormatting,zidkey,NULL,&status);
|
||||
if (U_SUCCESS(status)) {
|
||||
ures_close(tryThisZone);
|
||||
ures_close(zoneFormatting);
|
||||
ures_close(supplementalDataBundle);
|
||||
return;
|
||||
ures_close(tryThisZone);
|
||||
ures_close(zoneFormatting);
|
||||
ures_close(supplementalDataBundle);
|
||||
return;
|
||||
}
|
||||
|
||||
// Didn't find it, so go searching for an alias
|
||||
|
@ -932,8 +932,7 @@ SimpleDateFormat::zoneIDCanonicalize(UnicodeString &zid) const
|
|||
while ( ures_hasNext(zoneFormatting)) {
|
||||
UResourceBundle *currentZone = ures_getNextResource(zoneFormatting,NULL,&status);
|
||||
if (U_FAILURE(status)) {
|
||||
ures_close(supplementalDataBundle);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
const char *currentZoneString= ures_getKey(currentZone);
|
||||
|
@ -962,8 +961,6 @@ SimpleDateFormat::zoneIDCanonicalize(UnicodeString &zid) const
|
|||
}
|
||||
ures_close(zoneFormatting);
|
||||
ures_close(supplementalDataBundle);
|
||||
|
||||
return;
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue