diff options
author | Alastair Houghton <alastair@alastairs-place.net> | 2016-08-23 09:36:53 +0100 |
---|---|---|
committer | Alastair Houghton <alastair@alastairs-place.net> | 2016-08-23 09:36:53 +0100 |
commit | 22c20948f3be1c239ccd67ff76bd631680c959c4 (patch) | |
tree | d3484692c036a58e9194d0defb07e29c1b7e9013 /netifaces.c | |
parent | aae70f3c3d7e67fabf88a9617be1cbf0c21c42c1 (diff) | |
download | netifaces-git-22c20948f3be1c239ccd67ff76bd631680c959c4.tar.gz |
Close the socket we created.
Diffstat (limited to 'netifaces.c')
-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) |