diff options
author | Diego Calleja <diegocg@gmail.com> | 2008-10-18 16:53:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-22 09:56:29 -0700 |
commit | f31158c9f86bf5619ab2e1c54f82f04ad2f47435 (patch) | |
tree | 637c94344f7badb202f8663e9bbe4fe93ca875da /drivers/staging | |
parent | 19cbd3d7d564513be97a0651173f5572eae3d52b (diff) | |
download | linux-f31158c9f86bf5619ab2e1c54f82f04ad2f47435.tar.gz linux-f31158c9f86bf5619ab2e1c54f82f04ad2f47435.tar.bz2 linux-f31158c9f86bf5619ab2e1c54f82f04ad2f47435.zip |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/at76_usb/at76_usb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/at76_usb/at76_usb.c b/drivers/staging/at76_usb/at76_usb.c index 52df0c665183..174e2bec9223 100644 --- a/drivers/staging/at76_usb/at76_usb.c +++ b/drivers/staging/at76_usb/at76_usb.c @@ -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); |