From d39d4c7401475113b69ed0d25a1d7a71f95e64b5 Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Thu, 17 May 2018 23:06:54 +0000 Subject: [PATCH] ICU-13765 double free in icu/source/common/serv.cpp X-SVN-Rev: 41406 --- icu4c/source/common/serv.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/icu4c/source/common/serv.cpp b/icu4c/source/common/serv.cpp index de29c64140..959ab604c6 100644 --- a/icu4c/source/common/serv.cpp +++ b/icu4c/source/common/serv.cpp @@ -547,16 +547,15 @@ outerEnd: if (putInCache && cacheResult) { serviceCache->put(result->actualDescriptor, result, status); if (U_FAILURE(status)) { - delete result; return NULL; } if (cacheDescriptorList._obj != NULL) { for (int32_t i = cacheDescriptorList._obj->size(); --i >= 0;) { UnicodeString* desc = (UnicodeString*)cacheDescriptorList._obj->elementAt(i); + serviceCache->put(*desc, result, status); if (U_FAILURE(status)) { - delete result; return NULL; }