summaryrefslogtreecommitdiff
path: root/src/tethering.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-10-23 14:16:29 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-10-25 13:36:28 +0200
commit3866231ce4dd27533e086490b84b5363d788721d (patch)
treeea8ae35ba4df1ec23e408d3a9fc9e10ebc690433 /src/tethering.c
parent244b3b17aa713d6daf70709e105c0e0a1faff78e (diff)
downloadconnman-3866231ce4dd27533e086490b84b5363d788721d.tar.gz
connman-3866231ce4dd27533e086490b84b5363d788721d.tar.bz2
connman-3866231ce4dd27533e086490b84b5363d788721d.zip
core: Add SOCK_CLOEXEC to socket()
Make sure all file descriptor are closed.
Diffstat (limited to 'src/tethering.c')
-rw-r--r--src/tethering.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tethering.c b/src/tethering.c
index 0357530d..c362b8d6 100644
--- a/src/tethering.c
+++ b/src/tethering.c
@@ -206,7 +206,7 @@ static int create_bridge(const char *name)
DBG("name %s", name);
- sk = socket(AF_INET, SOCK_STREAM, 0);
+ sk = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
if (sk < 0)
return -EOPNOTSUPP;
@@ -231,7 +231,7 @@ static int remove_bridge(const char *name)
DBG("name %s", name);
- sk = socket(AF_INET, SOCK_STREAM, 0);
+ sk = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
if (sk < 0)
return -EOPNOTSUPP;