projects
/
oweals
/
iwinfo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eeaae3d
)
nl80211: fix possible fd leak in nl80211_hostapd_hup()
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 29 Oct 2015 09:43:49 +0000
(10:43 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 29 Oct 2015 09:43:49 +0000
(10:43 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
iwinfo_nl80211.c
patch
|
blob
|
history
diff --git
a/iwinfo_nl80211.c
b/iwinfo_nl80211.c
index 4add5f49f8873df7aad173b3016b9066dd81732b..a08d5807edf0ae1e347098ba22c0ff179b3d9ca4 100644
(file)
--- a/
iwinfo_nl80211.c
+++ b/
iwinfo_nl80211.c
@@
-951,7
+951,7
@@
static void nl80211_hostapd_hup(const char *ifname)
if (phy)
{
snprintf(buf, sizeof(buf), "/var/run/wifi-%s.pid", phy);
- if ((fd = open(buf, O_RDONLY)) > 0)
+ if ((fd = open(buf, O_RDONLY)) >
=
0)
{
if (read(fd, buf, sizeof(buf)) > 0)
pid = atoi(buf);