diff options
author | Alastair Houghton <alastair@coriolis-systems.com> | 2016-08-23 09:36:53 +0100 |
---|---|---|
committer | Alastair Houghton <alastair@coriolis-systems.com> | 2016-08-23 09:36:53 +0100 |
commit | d1ee1361a0630240d211405dadeab163c2d8c049 (patch) | |
tree | d3484692c036a58e9194d0defb07e29c1b7e9013 | |
parent | 70ebb6e4fe76d60f8103e99540ab71cb282115d7 (diff) | |
download | netifaces-d1ee1361a0630240d211405dadeab163c2d8c049.tar.gz |
Close the socket we created.
-rw-r--r-- | netifaces.c | 2 |
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) |