summaryrefslogtreecommitdiff
path: root/src/bridge.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-11-13 14:11:18 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-11-13 14:37:17 +0200
commit3170b704fe7cc56a5e89439f632f1b7ba35e7602 (patch)
treee5522e1867d54377286c85a2faff7eb3fe5ef261 /src/bridge.c
parentbe52978c5fb34e8570ba0c58d819fdf0bf7f3d49 (diff)
downloadconnman-3170b704fe7cc56a5e89439f632f1b7ba35e7602.tar.gz
connman-3170b704fe7cc56a5e89439f632f1b7ba35e7602.tar.bz2
connman-3170b704fe7cc56a5e89439f632f1b7ba35e7602.zip
bridge: Close socket on error
Diffstat (limited to 'src/bridge.c')
-rw-r--r--src/bridge.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bridge.c b/src/bridge.c
index 2849ef79..e46cdda6 100644
--- a/src/bridge.c
+++ b/src/bridge.c
@@ -75,8 +75,10 @@ int __connman_bridge_create(const char *name)
if (ioctl(sk, SIOCBRADDBR, name) == -1) {
err = -errno;
- if (err != -EEXIST)
+ if (err != -EEXIST) {
+ close(sk);
return -EOPNOTSUPP;
+ }
}
err = set_forward_delay(name, 0);