]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Clean up on exit.
authorReg Clemens <clemens@ntp.org>
Thu, 2 Mar 2006 20:03:35 +0000 (15:03 -0500)
committerReg Clemens <clemens@ntp.org>
Thu, 2 Mar 2006 20:03:35 +0000 (15:03 -0500)
bk: 44074f97yUGnLgWfgKeBqxPvdWJbjQ

ntpd/refclock_oncore.c

index f68113847d6b2d8ead9ff910ead440b557476cf1..fe64d98ec326d54069d9e4d9ec3276b4bdfb2341 100644 (file)
@@ -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);
 }