Skip to content

Commit

Permalink
ext3: fix possible non-initialized variable on htree_dirblock_to_tree()
Browse files Browse the repository at this point in the history
This is a backport of ext4 commit 90b0a97 which fixes a possible
non-initialized variable on htree_dirblock_to_tree().
Ext3 has the same non initialized variable, but, in any case it will be
initialized by ext3_get_blocks_handle(), which will avoid the bug to be
triggered, but, the non-initialized variable by htree_dirblock_to_tree() is
still a bug.

Signed-off-by: Carlos Maiolino <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
cmaiolino authored and jankara committed Oct 9, 2012
1 parent 9e2d865 commit aa96601
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext3/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ static int htree_dirblock_to_tree(struct file *dir_file,
{
struct buffer_head *bh;
struct ext3_dir_entry_2 *de, *top;
int err, count = 0;
int err = 0, count = 0;

dxtrace(printk("In htree dirblock_to_tree: block %d\n", block));
if (!(bh = ext3_bread (NULL, dir, block, 0, &err)))
Expand Down

0 comments on commit aa96601

Please sign in to comment.