lkml.org 
[lkml]   [2003]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [CHECKER] 32 Memory Leaks on Error Paths


    Timothy Miller wrote:

    >
    >>> 276: /* OK, it's not open. Create cache info for it */
    >>> START -->
    >>> 277: mtdblk = kmalloc(sizeof(struct mtdblk_dev), GFP_KERNEL);
    >>> 278: if (!mtdblks)
    >>> END -->
    >>> 279: return -ENOMEM;
    >>
    >
    >>
    >> Invalid. This is quite an obvious false positive, at least if your
    >> algorithm checks for possible value ranges.
    >
    >
    > Wait... one is "mtdblk", and the other is "mtdblks". One has an extra
    > 's' on it. Unless there is some kind of aliasing going on, they would
    > appear to be different variables. Naturally, I didn't check the
    > original code, so I could be full of it. :)


    Yes its a bug from glancing at the source code.


    -
    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: 2005-03-22 13:48    [W:0.021 / U:244.296 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site