ICU-13765 double free in icu/source/common/serv.cpp
X-SVN-Rev: 41406
This commit is contained in:
parent
9006190a53
commit
d39d4c7401
@ -547,16 +547,15 @@ outerEnd:
|
|||||||
if (putInCache && cacheResult) {
|
if (putInCache && cacheResult) {
|
||||||
serviceCache->put(result->actualDescriptor, result, status);
|
serviceCache->put(result->actualDescriptor, result, status);
|
||||||
if (U_FAILURE(status)) {
|
if (U_FAILURE(status)) {
|
||||||
delete result;
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cacheDescriptorList._obj != NULL) {
|
if (cacheDescriptorList._obj != NULL) {
|
||||||
for (int32_t i = cacheDescriptorList._obj->size(); --i >= 0;) {
|
for (int32_t i = cacheDescriptorList._obj->size(); --i >= 0;) {
|
||||||
UnicodeString* desc = (UnicodeString*)cacheDescriptorList._obj->elementAt(i);
|
UnicodeString* desc = (UnicodeString*)cacheDescriptorList._obj->elementAt(i);
|
||||||
|
|
||||||
serviceCache->put(*desc, result, status);
|
serviceCache->put(*desc, result, status);
|
||||||
if (U_FAILURE(status)) {
|
if (U_FAILURE(status)) {
|
||||||
delete result;
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user