From afdefefbe4b39ddcca8b9fedd37cafdc949cc3d5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 9 Apr 2014 20:09:17 +0200 Subject: [PATCH] icu/Collate: fix memory leak in IcuCaseFold() --- src/lib/icu/Collate.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/icu/Collate.cxx b/src/lib/icu/Collate.cxx index 3e8a6f5b5..c863e7e2a 100644 --- a/src/lib/icu/Collate.cxx +++ b/src/lib/icu/Collate.cxx @@ -156,6 +156,7 @@ IcuCaseFold(const char *src) uint8_t *dest = new uint8_t[dest_length]; ucol_getSortKey(collator, u, u_length, dest, dest_length); + delete[] u; std::string result((const char *)dest); delete[] dest; #elif defined(HAVE_GLIB)