From cd0b0fbedf826ad51fed5e23d01c3f58654618a8 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 22 Jul 2011 14:50:26 +0000 Subject: [PATCH] luci-0.10: merge r7334 --- contrib/package/iwinfo/src/iwinfo_nl80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/package/iwinfo/src/iwinfo_nl80211.c b/contrib/package/iwinfo/src/iwinfo_nl80211.c index 5828ee98d..468ad9d70 100644 --- a/contrib/package/iwinfo/src/iwinfo_nl80211.c +++ b/contrib/package/iwinfo/src/iwinfo_nl80211.c @@ -1438,7 +1438,7 @@ int nl80211_get_freqlist(const char *ifname, char *buf, int *len) if( req ) { res = nl80211_send(req); - if( res ) + if( res && res->attr[NL80211_ATTR_WIPHY_BANDS] ) { nla_for_each_nested(band, res->attr[NL80211_ATTR_WIPHY_BANDS], bands_remain) @@ -1537,7 +1537,7 @@ int nl80211_get_hwmodelist(const char *ifname, int *buf) if( req ) { res = nl80211_send(req); - if( res ) + if( res && res->attr[NL80211_ATTR_WIPHY_BANDS] ) { nla_for_each_nested(band, res->attr[NL80211_ATTR_WIPHY_BANDS], bands_remain) -- 2.25.1