projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f99661a
)
Close all filedescriptors in Solaris close_device().
author
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 2 Jan 2011 15:50:24 +0000
(16:50 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 2 Jan 2011 15:50:24 +0000
(16:50 +0100)
src/solaris/device.c
patch
|
blob
|
history
diff --git
a/src/solaris/device.c
b/src/solaris/device.c
index
9018c31
..
d14975b
100644
(file)
--- 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);