projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47d0073
)
Fix a bug in wifi_essid().
author
Aaron Marcher
<me@drkhsh.at>
Sat, 6 Jan 2018 22:37:09 +0000
(23:37 +0100)
committer
Aaron Marcher
<me@drkhsh.at>
Sat, 6 Jan 2018 22:37:09 +0000
(23:37 +0100)
When an invalid interface name is passed to wifi_essid() it does not
close opened sockets.
components/wifi.c
patch
|
blob
|
history
diff --git
a/components/wifi.c
b/components/wifi.c
index 9ecb8e15f3310217a1e3e13152a5eb82613754e7..3767b21759211ed48cfa1fb057d67b2d45228bd6 100644
(file)
--- 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;
}