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 <richardcochran@gmail.com>
master
Richard Cochran 2013-12-26 10:48:25 +01:00
parent e2586af94a
commit 3aedebe74b
1 changed files with 2 additions and 0 deletions

View File

@ -125,6 +125,8 @@ void clock_destroy(struct clock *c)
stats_destroy(c->stats.offset); stats_destroy(c->stats.offset);
stats_destroy(c->stats.freq); stats_destroy(c->stats.freq);
stats_destroy(c->stats.delay); stats_destroy(c->stats.delay);
if (c->sanity_check)
clockcheck_destroy(c->sanity_check);
memset(c, 0, sizeof(*c)); memset(c, 0, sizeof(*c));
msg_cleanup(); msg_cleanup();
} }