diff options
-rw-r--r-- | netlink-notify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/netlink-notify.c b/netlink-notify.c index bc41954..f1de621 100644 --- a/netlink-notify.c +++ b/netlink-notify.c @@ -124,8 +124,9 @@ void get_ssid(const char *interface, char *essid) { if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) return; - if (ioctl(sockfd, SIOCGIWESSID, &wreq) == -1) - return; + ioctl(sockfd, SIOCGIWESSID, &wreq); + + close(sockfd); } /*** newstr_link ***/ |