ICU-1030
Cleaning up of allocated string array in Check*CanonicalMatch X-SVN-Rev: 5618
This commit is contained in:
parent
ed236e08a0
commit
e48995b111
@ -163,8 +163,10 @@ StringSearch::StringSearch(const StringSearch &that) :
|
||||
|
||||
StringSearch::~StringSearch()
|
||||
{
|
||||
usearch_close(m_strsrch_);
|
||||
m_search_ = NULL;
|
||||
if (m_strsrch_ != NULL) {
|
||||
usearch_close(m_strsrch_);
|
||||
m_search_ = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// operator overloading ---------------------------------------------
|
||||
|
@ -1557,6 +1557,7 @@ UBool checkNextCanonicalMatch(UStringSearch *strsrch,
|
||||
|
||||
if (strsrch->textIter != coleiter) {
|
||||
ucol_closeElements(coleiter);
|
||||
uprv_free(str);
|
||||
}
|
||||
strsrch->search->matchedIndex = start;
|
||||
strsrch->search->matchedLength = *textoffset - start;
|
||||
@ -2103,6 +2104,7 @@ UBool checkPreviousCanonicalMatch(UStringSearch *strsrch,
|
||||
|
||||
if (strsrch->textIter != coleiter) {
|
||||
ucol_closeElements(coleiter);
|
||||
uprv_free(str);
|
||||
}
|
||||
strsrch->search->matchedIndex = *textoffset;
|
||||
strsrch->search->matchedLength = end - *textoffset;
|
||||
|
Loading…
Reference in New Issue
Block a user