icu/Collate: fix memory leak in IcuCaseFold()

This commit is contained in:
Max Kellermann 2014-04-09 20:09:17 +02:00
parent 5360c0c588
commit afdefefbe4

View File

@ -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)