From: Guus Sliepen Date: Sun, 2 Jan 2011 15:50:24 +0000 (+0100) Subject: Close all filedescriptors in Solaris close_device(). X-Git-Tag: release-1.0.14~21 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3ce5e292da8bab3a1316faf1ca18625f05074467;p=oweals%2Ftinc.git Close all filedescriptors in Solaris close_device(). --- diff --git a/src/solaris/device.c b/src/solaris/device.c index 9018c31..d14975b 100644 --- a/src/solaris/device.c +++ b/src/solaris/device.c @@ -34,6 +34,7 @@ #define DEFAULT_DEVICE "/dev/tun" int device_fd = -1; +int ip_fd = -1, if_fd = -1; char *device = NULL; char *iface = NULL; static char *device_info = NULL; @@ -42,7 +43,6 @@ static uint64_t device_total_in = 0; static uint64_t device_total_out = 0; bool setup_device(void) { - int ip_fd = -1, if_fd = -1; int ppa; char *ptr; @@ -105,6 +105,8 @@ bool setup_device(void) { } void close_device(void) { + close(if_fd); + close(ip_fd); close(device_fd); free(device);