lkml.org 
[lkml]   [2006]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH][resend] fix resource leak in pnp card_probe()
    Date
    (resend of patch already send once on 23/03-2006 
    - still applies cleanly to latest -git)


    We can leak `clink' in drivers/pnp/card.c::card_probe()


    Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
    ---

    drivers/pnp/card.c | 4 +++-
    1 files changed, 3 insertions(+), 1 deletion(-)

    --- linux-2.6.16-mm1-orig/drivers/pnp/card.c 2006-03-26 13:43:38.000000000 +0200
    +++ linux-2.6.16-mm1/drivers/pnp/card.c 2006-03-26 15:45:00.000000000 +0200
    @@ -81,8 +81,10 @@ static int card_probe(struct pnp_card *
    }
    kfree(clink);
    }
    - } else
    + } else {
    + kfree(clink);
    return 1;
    + }
    }
    return 0;
    }


    -
    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: 2006-05-13 22:37    [W:0.020 / U:1.788 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site