]> granicus.if.org Git - icu/commitdiff
ICU-20168 Fix memory leak in error path, add a free statement. (#175)
authorgnrunge <41129501+gnrunge@users.noreply.github.com>
Wed, 26 Sep 2018 23:04:29 +0000 (16:04 -0700)
committerShane Carr <shane@unicode.org>
Thu, 27 Sep 2018 21:27:42 +0000 (14:27 -0700)
icu4c/source/common/uloc_tag.cpp

index c718de712ccd017060dd046a8c8a26641aa12811..17af4f7cbf43c4ad396fb083a55f937661d00be3 100644 (file)
@@ -1507,6 +1507,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
             attrBufIdx += (len + 1);
         } else {
             *status = U_ILLEGAL_ARGUMENT_ERROR;
+            uprv_free(attr);
             goto cleanup;
         }