summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Houghton <alastair@coriolis-systems.com>2016-08-23 09:36:53 +0100
committerAlastair Houghton <alastair@coriolis-systems.com>2016-08-23 09:36:53 +0100
commitd1ee1361a0630240d211405dadeab163c2d8c049 (patch)
treed3484692c036a58e9194d0defb07e29c1b7e9013
parent70ebb6e4fe76d60f8103e99540ab71cb282115d7 (diff)
downloadnetifaces-d1ee1361a0630240d211405dadeab163c2d8c049.tar.gz
Close the socket we created.
-rw-r--r--netifaces.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/netifaces.c b/netifaces.c
index 18b013f..f935599 100644
--- a/netifaces.c
+++ b/netifaces.c
@@ -858,6 +858,8 @@ ifaddrs (PyObject *self, PyObject *args)
if (ioctl (sock6, SIOCGIFAFLAG_IN6, &ifr6) >= 0) {
flags = PyLong_FromUnsignedLong (ifr6.ifr_ifru.ifru_flags6);
}
+
+ close (sock6);
}
if (string_from_sockaddr (addr->ifa_addr, buffer, sizeof (buffer)) == 0)