Messages in this thread Patch in this message | | | From | Greg Kroah-Hartman <> | Subject | [PATCH 05/42] Staging: Fix leak in drivers/staging/at76_usb.c | Date | Wed, 22 Oct 2008 10:28:46 -0700 |
| |
From: Diego Calleja <diegocg@gmail.com>
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> --- 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 52df0c6..174e2be 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); -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |