From e4c3fb2432647aaf762c6c30ea4985a811ba59b4 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Mon, 20 Aug 2012 09:05:42 +0200 Subject: [PATCH] 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 --- clock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clock.c b/clock.c index 5cccc2e..a3cdd71 100644 --- a/clock.c +++ b/clock.c @@ -84,6 +84,8 @@ static void clock_destroy(struct clock *c) if (c->clkid != CLOCK_REALTIME) { phc_close(c->clkid); } + servo_destroy(c->servo); + mave_destroy(c->avg_delay); memset(c, 0, sizeof(*c)); }