From: Reg Clemens Date: Thu, 2 Mar 2006 20:03:35 +0000 (-0500) Subject: Clean up on exit. X-Git-Tag: NTP_4_2_1P10_RC~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37f35402c7ed22b38503e7c272059b4ccf5d5959;p=thirdparty%2Fntp.git Clean up on exit. bk: 44074f97yUGnLgWfgKeBqxPvdWJbjQ --- diff --git a/ntpd/refclock_oncore.c b/ntpd/refclock_oncore.c index f68113847..fe64d98ec 100644 --- a/ntpd/refclock_oncore.c +++ b/ntpd/refclock_oncore.c @@ -756,11 +756,16 @@ oncore_shutdown( io_closeclock(&pp->io); + time_pps_destroy (instance->pps_h); + close(instance->ttyfd); - if (instance->ppsfd != -1) + + if ((instance->ppsfd != -1) && (instance->ppsfd != instance->ttyfd)) close(instance->ppsfd); + if (instance->shmemfd) close(instance->shmemfd); + free(instance); }