lkml.org 
[lkml]   [2008]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 05/42] Staging: Fix leak in drivers/staging/at76_usb.c
    Date
    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/

    \
     
     \ /
      Last update: 2008-10-22 19:37    [W:0.039 / U:32.044 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site