Commit f31158c9 authored by Diego Calleja's avatar Diego Calleja Committed by Greg Kroah-Hartman

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=11778Reported-by: default avatarDaniel Marjamäki <danielm77@spray.se>
Signed-off-by: default avatarDiego Calleja <diegocg@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 19cbd3d7
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment