lkml.org 
[lkml]   [2003]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] Memory leak in mtd/chips/cfi_cmdset_0020
    	Hi David,

    Patch against 2.6.0-test6.

    - Frees a previous allocated kmalloced variable before returning NULL;

    Found by smatch.

    Please consider applying,

    Felipe
    --- linux-2.6.0-test6/drivers/mtd/chips/cfi_cmdset_0020.c.orig 2003-10-06 11:37:31.000000000 -0300
    +++ linux-2.6.0-test6/drivers/mtd/chips/cfi_cmdset_0020.c 2003-10-06 11:37:50.000000000 -0300
    @@ -208,6 +208,7 @@
    if (!mtd->eraseregions) {
    printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n");
    kfree(cfi->cmdset_priv);
    + kfree(mtd);
    return NULL;
    }
    \
     
     \ /
      Last update: 2005-03-22 13:49    [W:0.039 / U:119.552 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site