lkml.org 
[lkml]   [2009]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] cciss: memory leak in cciss_init_one()
    Miller, Mike (OS Dev) a écrit :
    >
    >
    >> -----Original Message-----
    >> From: Jens Axboe [mailto:jens.axboe@oracle.com]
    >> Sent: Monday, August 24, 2009 3:01 AM
    >> To: Eric Dumazet
    >> Cc: Andrew Morton; Miller, Mike (OS Dev); linux kernel;
    >> stable@kernel.org; FUJITA Tomonori
    >> Subject: Re: [PATCH] cciss: memory leak in cciss_init_one()
    >>
    >> On Sun, Aug 23 2009, Eric Dumazet wrote:
    >>> Andrew, I originally sent this 18 days ago and got no reply
    >> yet, maybe
    >>> could you get the baby ?
    >> I'll add it for 2.6.32.
    >>
    >
    > I guess I'm missing something. Where is the leak?

    Well...

    Problem is : In normal path, kfree(inq_buff); is not called.

    It is called only if a "goto clean4;" is done (error path,
    and in this case, inq_buff is NULL anyway)

    So we exit from cciss_init_one() without freeing
    a "InquiryData_struct" structure.

    I am pretty sure kmemleak would complain on this leak :)
    --
    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: 2009-08-24 18:41    [W:0.021 / U:30.856 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site