|
@@ -2319,9 +2319,11 @@ static int at76_iw_handler_get_scan(struct net_device *netdev,
|
|
if (!iwe)
|
|
if (!iwe)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
- if (priv->scan_state != SCAN_COMPLETED)
|
|
|
|
|
|
+ if (priv->scan_state != SCAN_COMPLETED) {
|
|
/* scan not yet finished */
|
|
/* scan not yet finished */
|
|
|
|
+ kfree(iwe);
|
|
return -EAGAIN;
|
|
return -EAGAIN;
|
|
|
|
+ }
|
|
|
|
|
|
spin_lock_irqsave(&priv->bss_list_spinlock, flags);
|
|
spin_lock_irqsave(&priv->bss_list_spinlock, flags);
|
|
|
|
|