Skip to content

Commit

Permalink
xfs: fix uninitialized variable in xfs_attr3_leaf_inactive
Browse files Browse the repository at this point in the history
Dan Carpenter pointed out that error is uninitialized.  While there
never should be an attr leaf block with zero entries, let's not leave
that logic bomb there.

Fixes: 0bb9d15 ("xfs: streamline xfs_attr3_leaf_inactive")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Allison Collins <[email protected]>
Reviewed-by: Eric Sandeen <[email protected]>
  • Loading branch information
djwong committed Jan 24, 2020
1 parent aa12443 commit 54027a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_attr_inactive.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ xfs_attr3_leaf_inactive(
struct xfs_attr_leafblock *leaf = bp->b_addr;
struct xfs_attr_leaf_entry *entry;
struct xfs_attr_leaf_name_remote *name_rmt;
int error;
int error = 0;
int i;

xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, leaf);
Expand Down

0 comments on commit 54027a4

Please sign in to comment.