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
parent
e2586af94a
commit
3aedebe74b
2
clock.c
2
clock.c
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue