ICU-11791 Fix leak in FilteredBreakIteratorBuilder::createInstance for "zh", "fi", ... (i.e. failure case)
X-SVN-Rev: 37928
This commit is contained in:
parent
9c2626faa9
commit
b5fe5f98c4
@ -652,14 +652,14 @@ FilteredBreakIteratorBuilder *
|
||||
FilteredBreakIteratorBuilder::createInstance(const Locale& where, UErrorCode& status) {
|
||||
if(U_FAILURE(status)) return NULL;
|
||||
LocalPointer<FilteredBreakIteratorBuilder> ret(new SimpleFilteredBreakIteratorBuilder(where, status), status);
|
||||
return ret.orphan();
|
||||
return (U_SUCCESS(status))? ret.orphan(): NULL;
|
||||
}
|
||||
|
||||
FilteredBreakIteratorBuilder *
|
||||
FilteredBreakIteratorBuilder::createInstance(UErrorCode& status) {
|
||||
if(U_FAILURE(status)) return NULL;
|
||||
LocalPointer<FilteredBreakIteratorBuilder> ret(new SimpleFilteredBreakIteratorBuilder(status), status);
|
||||
return ret.orphan();
|
||||
return (U_SUCCESS(status))? ret.orphan(): NULL;
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
Loading…
Reference in New Issue
Block a user