From 3aedebe74bd3d5c74139e15d184c3c58285b7ee8 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Thu, 26 Dec 2013 10:48:25 +0100 Subject: [PATCH] clock: add missing call to clockcheck_destroy. This patch lets the clock release allocated memory when shutting down. The main benefit is just to exhibit good form and to make valgrind happier. Signed-off-by: Richard Cochran --- clock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clock.c b/clock.c index b685bb6..cd8774c 100644 --- a/clock.c +++ b/clock.c @@ -125,6 +125,8 @@ void clock_destroy(struct clock *c) stats_destroy(c->stats.offset); stats_destroy(c->stats.freq); stats_destroy(c->stats.delay); + if (c->sanity_check) + clockcheck_destroy(c->sanity_check); memset(c, 0, sizeof(*c)); msg_cleanup(); }