diff --git a/src/kernel/order.test.c b/src/kernel/order.test.c index d0ba58619..b53fd9d05 100644 --- a/src/kernel/order.test.c +++ b/src/kernel/order.test.c @@ -154,8 +154,10 @@ static void test_skip_token(CuTest *tc) { static void test_replace_order(CuTest *tc) { order *orders = 0, *orig, *repl; - struct locale * lang = get_or_create_locale("en"); + struct locale * lang; + test_cleanup(); + lang = get_or_create_locale("en"); orig = create_order(K_MAKE, lang, 0); repl = create_order(K_ALLY, lang, 0); replace_order(&orders, orig, repl); @@ -165,6 +167,7 @@ static void test_replace_order(CuTest *tc) { CuAssertPtrNotNull(tc, orders); CuAssertPtrEquals(tc, 0, orders->next); CuAssertIntEquals(tc, getkeyword(repl), getkeyword(orders)); + test_cleanup(); } CuSuite *get_order_suite(void)