lkml.org 
[lkml]   [2004]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] Fix leaks in ISOFS.
    Spotted with the source checker from Coverity.com.

    Signed-off-by: Dave Jones <davej@redhat.com>


    diff -urpN --exclude-from=/home/davej/.exclude bk-linus/fs/isofs/rock.c linux-2.6/fs/isofs/rock.c
    --- bk-linus/fs/isofs/rock.c 2004-07-01 17:44:12.000000000 +0100
    +++ linux-2.6/fs/isofs/rock.c 2004-08-23 14:08:20.000000000 +0100
    @@ -153,6 +153,7 @@ int get_rock_ridge_filename(struct iso_d
    }
    }
    MAYBE_CONTINUE(repeat,inode);
    + if (buffer) kfree(buffer);
    return retnamlen; /* If 0, this file did not have a NM field */
    out:
    if(buffer) kfree(buffer);
    @@ -351,7 +352,6 @@ int parse_rock_ridge_inode_internal(stru
    }
    }
    MAYBE_CONTINUE(repeat,inode);
    - return 0;
    out:
    if(buffer) kfree(buffer);
    return 0;
    @@ -515,6 +515,8 @@ static int rock_ridge_symlink_readpage(s
    }
    }
    MAYBE_CONTINUE(repeat, inode);
    + if (buffer)
    + kfree(buffer);

    if (rpnt == link)
    goto fail;
    -
    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 14:05    [W:0.019 / U:1.364 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site