diff options
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r-- | net/wireless/scan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 67714d7ed5b4..0ccf3a07dc02 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -141,7 +141,7 @@ static int cmp_ies(u8 num, u8 *ies1, size_t len1, u8 *ies2, size_t len2) | |||
141 | 141 | ||
142 | if (!ie1 && !ie2) | 142 | if (!ie1 && !ie2) |
143 | return 0; | 143 | return 0; |
144 | if (!ie1) | 144 | if (!ie1 || !ie2) |
145 | return -1; | 145 | return -1; |
146 | 146 | ||
147 | r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1])); | 147 | r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1])); |
@@ -194,6 +194,8 @@ static bool is_mesh(struct cfg80211_bss *a, | |||
194 | ie = find_ie(WLAN_EID_MESH_CONFIG, | 194 | ie = find_ie(WLAN_EID_MESH_CONFIG, |
195 | a->information_elements, | 195 | a->information_elements, |
196 | a->len_information_elements); | 196 | a->len_information_elements); |
197 | if (!ie) | ||
198 | return false; | ||
197 | if (ie[1] != IEEE80211_MESH_CONFIG_LEN) | 199 | if (ie[1] != IEEE80211_MESH_CONFIG_LEN) |
198 | return false; | 200 | return false; |
199 | 201 | ||