projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45a30f7
)
Check if devops is valid before closing the device.
author
Etienne Dechamps
<etienne@edechamps.fr>
Sat, 12 Jul 2014 12:56:01 +0000
(13:56 +0100)
committer
Etienne Dechamps
<etienne@edechamps.fr>
Sat, 12 Jul 2014 12:56:01 +0000
(13:56 +0100)
This fixes a segfault that occurs on exit if tinc fails before the
device is initialized (for example, if it fails to read the private
key).
src/net_setup.c
patch
|
blob
|
history
diff --git
a/src/net_setup.c
b/src/net_setup.c
index 96a7224781bc1772d93e1bb20a46d4c9687b1bc6..d83c57235d1d9b54ea2291780ff3040c36fa7962 100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-1141,7
+1141,8
@@
void close_network_connections(void) {
if (device_fd >= 0)
io_del(&device_io);
- devops.close();
+ if (devops.close)
+ devops.close();
exit_control();