mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
Staging: Fix leak in drivers/staging/at76_usb.c
Fix leak in at76_usb as reported in: http://bugzilla.kernel.org/show_bug.cgi?id=11778 Reported-by: Daniel Marjamäki <danielm77@spray.se> Signed-off-by: Diego Calleja <diegocg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
19cbd3d7d5
commit
f31158c9f8
1 changed files with 3 additions and 1 deletions
|
@ -2319,9 +2319,11 @@ static int at76_iw_handler_get_scan(struct net_device *netdev,
|
|||
if (!iwe)
|
||||
return -ENOMEM;
|
||||
|
||||
if (priv->scan_state != SCAN_COMPLETED)
|
||||
if (priv->scan_state != SCAN_COMPLETED) {
|
||||
/* scan not yet finished */
|
||||
kfree(iwe);
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&priv->bss_list_spinlock, flags);
|
||||
|
||||
|
|
Loading…
Reference in a new issue