From 3ce5e292da8bab3a1316faf1ca18625f05074467 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 2 Jan 2011 16:50:24 +0100 Subject: [PATCH] Close all filedescriptors in Solaris close_device(). --- src/solaris/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/solaris/device.c b/src/solaris/device.c index 9018c31a..d14975b3 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); -- 2.39.5