From 2a51b45a437584143859614b98b4884550cd7d3f Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 26 Jan 2017 10:37:25 +0100 Subject: [PATCH] test: fix memory leaks in unit tests --- test/unit/hwclock.c | 2 ++ test/unit/ntp_core.c | 1 + test/unit/ntp_sources.c | 1 + test/unit/sources.c | 1 + 4 files changed, 5 insertions(+) diff --git a/test/unit/hwclock.c b/test/unit/hwclock.c index 51e41ec..5b2406a 100644 --- a/test/unit/hwclock.c +++ b/test/unit/hwclock.c @@ -68,5 +68,7 @@ test_unit(void) } } + HCL_DestroyInstance(clock); + LCL_Finalise(); } diff --git a/test/unit/ntp_core.c b/test/unit/ntp_core.c index 89ecd4a..40ca03b 100644 --- a/test/unit/ntp_core.c +++ b/test/unit/ntp_core.c @@ -295,4 +295,5 @@ test_unit(void) SCH_Finalise(); LCL_Finalise(); CNF_Finalise(); + HSH_Finalise(); } diff --git a/test/unit/ntp_sources.c b/test/unit/ntp_sources.c index 40df9d3..f55612d 100644 --- a/test/unit/ntp_sources.c +++ b/test/unit/ntp_sources.c @@ -96,4 +96,5 @@ test_unit(void) SCH_Finalise(); LCL_Finalise(); CNF_Finalise(); + HSH_Finalise(); } diff --git a/test/unit/sources.c b/test/unit/sources.c index f166dfd..08ee20c 100644 --- a/test/unit/sources.c +++ b/test/unit/sources.c @@ -134,4 +134,5 @@ test_unit(void) SCH_Finalise(); LCL_Finalise(); CNF_Finalise(); + HSH_Finalise(); }