From: gnrunge <41129501+gnrunge@users.noreply.github.com> Date: Wed, 26 Sep 2018 23:04:29 +0000 (-0700) Subject: ICU-20168 Fix memory leak in error path, add a free statement. (#175) X-Git-Tag: release-63-rc~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39b98c8a6bc660c4f76a26a595cfb86282dad85f;p=icu ICU-20168 Fix memory leak in error path, add a free statement. (#175) --- diff --git a/icu4c/source/common/uloc_tag.cpp b/icu4c/source/common/uloc_tag.cpp index c718de712cc..17af4f7cbf4 100644 --- a/icu4c/source/common/uloc_tag.cpp +++ b/icu4c/source/common/uloc_tag.cpp @@ -1507,6 +1507,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT attrBufIdx += (len + 1); } else { *status = U_ILLEGAL_ARGUMENT_ERROR; + uprv_free(attr); goto cleanup; }