diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/airo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index a3e324e0ca83..f5e2dca083cb 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -7148,11 +7148,15 @@ static int airo_get_aplist(struct net_device *dev, | |||
7148 | { | 7148 | { |
7149 | struct airo_info *local = dev->ml_priv; | 7149 | struct airo_info *local = dev->ml_priv; |
7150 | struct sockaddr *address = (struct sockaddr *) extra; | 7150 | struct sockaddr *address = (struct sockaddr *) extra; |
7151 | struct iw_quality qual[IW_MAX_AP]; | 7151 | struct iw_quality *qual; |
7152 | BSSListRid BSSList; | 7152 | BSSListRid BSSList; |
7153 | int i; | 7153 | int i; |
7154 | int loseSync = capable(CAP_NET_ADMIN) ? 1: -1; | 7154 | int loseSync = capable(CAP_NET_ADMIN) ? 1: -1; |
7155 | 7155 | ||
7156 | qual = kmalloc(IW_MAX_AP * sizeof(*qual), GFP_KERNEL); | ||
7157 | if (!qual) | ||
7158 | return -ENOMEM; | ||
7159 | |||
7156 | for (i = 0; i < IW_MAX_AP; i++) { | 7160 | for (i = 0; i < IW_MAX_AP; i++) { |
7157 | u16 dBm; | 7161 | u16 dBm; |
7158 | if (readBSSListRid(local, loseSync, &BSSList)) | 7162 | if (readBSSListRid(local, loseSync, &BSSList)) |
@@ -7207,6 +7211,7 @@ static int airo_get_aplist(struct net_device *dev, | |||
7207 | } | 7211 | } |
7208 | dwrq->length = i; | 7212 | dwrq->length = i; |
7209 | 7213 | ||
7214 | kfree(qual); | ||
7210 | return 0; | 7215 | return 0; |
7211 | } | 7216 | } |
7212 | 7217 | ||