Commit f2780cec authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix missing brelse() on ext3 htree error path

It will leak a bh ref on ENOMEM.
parent f3e4f3e7
...@@ -576,8 +576,10 @@ int ext3_htree_fill_tree(struct file *dir_file, __u32 start_hash, ...@@ -576,8 +576,10 @@ int ext3_htree_fill_tree(struct file *dir_file, __u32 start_hash,
(hinfo.minor_hash < start_minor_hash))) (hinfo.minor_hash < start_minor_hash)))
continue; continue;
if ((err = ext3_htree_store_dirent(dir_file, if ((err = ext3_htree_store_dirent(dir_file,
hinfo.hash, hinfo.minor_hash, de)) != 0) hinfo.hash, hinfo.minor_hash, de)) != 0) {
brelse(bh);
goto errout; goto errout;
}
count++; count++;
} }
brelse (bh); brelse (bh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment