Message ID | 1262795743-15009-1-git-send-email-jslaby@suse.cz (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 12dfa62..9c50c85 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -694,8 +694,10 @@ int cfg80211_wext_siwscan(struct net_device *dev, /* translate "Scan for SSID" request */ if (wreq) { if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { - if (wreq->essid_len > IEEE80211_MAX_SSID_LEN) - return -EINVAL; + if (wreq->essid_len > IEEE80211_MAX_SSID_LEN) { + err = -EINVAL; + goto out; + } memcpy(creq->ssids[0].ssid, wreq->essid, wreq->essid_len); creq->ssids[0].ssid_len = wreq->essid_len; }