Skip to content
  • Theodore Ts'o's avatar
    ext4: fix memory leak in ext4_free_branches · 1c5b9e90
    Theodore Ts'o authored
    Commit 40389687
    
     moved a call to ext4_forget() out of
    ext4_free_branches and let ext4_free_blocks() handle calling
    bforget().  But that change unfortunately did not replace the call to
    ext4_forget() with brelse(), which was needed to drop the in-use count
    of the indirect block's buffer head, which lead to a memory leak when
    deleting files that used indirect blocks.  Fix this.
    
    Thanks to Hugh Dickins for pointing this out.
    
    Cc: stable@kernel.org
    Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
    1c5b9e90