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:
Родитель
19cbd3d7d5
Коммит
f31158c9f8
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче