Commit 1d324176 authored by Max Kellermann's avatar Max Kellermann

lib/icu/Init: call u_init() and u_cleanup()

Make valgrind happy.
parent 37b31907
......@@ -19,11 +19,23 @@
#include "config.h"
#include "Init.hxx"
#include "Error.hxx"
#include "Collate.hxx"
#include "util/Error.hxx"
#include <unicode/uclean.h>
bool
IcuInit(Error &error)
{
UErrorCode code = U_ZERO_ERROR;
u_init(&code);
if (U_FAILURE(code)) {
error.Format(icu_domain, int(code),
"u_init() failed: %s", u_errorName(code));
return false;
}
return IcuCollateInit(error);
}
......@@ -31,4 +43,6 @@ void
IcuFinish()
{
IcuCollateFinish();
u_cleanup();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment