summaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2011-10-31 10:53:11 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2011-11-07 11:34:48 (GMT)
commit08f53bb1589d50e5c23a77adf9c6ea464a01e452 (patch)
treee02e497c1c8b9a4fef8d3388897d5e1ef0c7289a /src/inet.c
parentf8f47e8bbcdf564a024241c1b24cc0a723bcf1d9 (diff)
downloadconnman-08f53bb1589d50e5c23a77adf9c6ea464a01e452.zip
connman-08f53bb1589d50e5c23a77adf9c6ea464a01e452.tar.gz
connman-08f53bb1589d50e5c23a77adf9c6ea464a01e452.tar.bz2
inet: Fix file descriptor leak when comparing subnets
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/inet.c b/src/inet.c
index 595f52d..c941718 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -1244,6 +1244,9 @@ connman_bool_t connman_inet_compare_subnet(int index, const char *host)
close(sk);
return FALSE;
}
+
+ close(sk);
+
addr = (struct sockaddr_in *)&ifr.ifr_addr;
if_addr = addr->sin_addr.s_addr;