From 3cfb22876bea94bc5c6848e7a8f4eaef22a007ca Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 14 Oct 2015 12:01:33 +0200 Subject: [PATCH] memory leak: free params after test --- src/kernel/config.test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kernel/config.test.c b/src/kernel/config.test.c index de1d0173e..fab30fc6e 100644 --- a/src/kernel/config.test.c +++ b/src/kernel/config.test.c @@ -132,6 +132,7 @@ static void test_get_set_param(CuTest * tc) CuAssertStrEquals(tc, "foo", get_param(par, "bar")); set_param(&par, "bar", NULL); CuAssertPtrEquals(tc, NULL, (void *)get_param(par, "bar")); + free_params(&par); test_cleanup(); } @@ -144,6 +145,7 @@ static void test_param_int(CuTest * tc) set_param(&par, "bar", "42"); CuAssertIntEquals(tc, 23, get_param_int(par, "foo", 0)); CuAssertIntEquals(tc, 42, get_param_int(par, "bar", 0)); + free_params(&par); test_cleanup(); } @@ -156,6 +158,7 @@ static void test_param_flt(CuTest * tc) set_param(&par, "bar", "42.0"); CuAssertDblEquals(tc, 23.0, get_param_flt(par, "foo", 0.0), 0.01); CuAssertDblEquals(tc, 42.0, get_param_flt(par, "bar", 0.0), 0.01); + free_params(&par); test_cleanup(); }