]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Fix memory leak in ext2fs_alloc_block()
authorTheodore Ts'o <tytso@mit.edu>
Tue, 19 Feb 2008 13:33:50 +0000 (08:33 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 19 Feb 2008 13:40:27 +0000 (08:40 -0500)
If a block buffer was not supplied and ext2fs_alloc_block() returned
with no errors, it would leak a temporary block buffer.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/alloc.c

index 7385123b8752fccbf53a798e23683b64e92ddcf1..65f3ea1c3a135511290e4199e45d24964be6a11b 100644 (file)
@@ -134,7 +134,6 @@ errcode_t ext2fs_alloc_block(ext2_filsys fs, blk_t goal,
        
        ext2fs_block_alloc_stats(fs, block, +1);
        *ret = block;
-       return 0;
 
 fail:
        if (buf)