projects
/
project
/
iwinfo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nl80211: fix possible fd leak in nl80211_hostapd_hup()
[project/iwinfo.git]
/
iwinfo_nl80211.c
diff --git
a/iwinfo_nl80211.c
b/iwinfo_nl80211.c
index
4add5f4
..
a08d580
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);