slstatus

My fork of https://tools.suckless.org/slstatus/
git clone https://git.inz.fi/slstatus
Log | Files | Refs | README | LICENSE

commit fa62e8199e32497d48b2f6ef9ecaa798bd53466a
parent 47d0073bfd9edfe479700281232db925a5323857
Author: Aaron Marcher <me@drkhsh.at>
Date:   Sat,  6 Jan 2018 23:37:09 +0100

Fix a bug in wifi_essid().

When an invalid interface name is passed to wifi_essid() it does not
close opened sockets.

Diffstat:
Mcomponents/wifi.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/components/wifi.c b/components/wifi.c @@ -77,6 +77,7 @@ wifi_essid(const char *iface) wreq.u.essid.pointer = id; if (ioctl(sockfd,SIOCGIWESSID, &wreq) == -1) { warn("Failed to get ESSID for interface %s", iface); + close(sockfd); return NULL; }