Free the clock's servo and moving average on destroy.
The destroy method is supposed to undo everything that the create does. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
08bee20be2
commit
e4c3fb2432
2
clock.c
2
clock.c
|
@ -84,6 +84,8 @@ static void clock_destroy(struct clock *c)
|
||||||
if (c->clkid != CLOCK_REALTIME) {
|
if (c->clkid != CLOCK_REALTIME) {
|
||||||
phc_close(c->clkid);
|
phc_close(c->clkid);
|
||||||
}
|
}
|
||||||
|
servo_destroy(c->servo);
|
||||||
|
mave_destroy(c->avg_delay);
|
||||||
memset(c, 0, sizeof(*c));
|
memset(c, 0, sizeof(*c));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue