2 calls to libxfs_bmapi_write exist in repair's phase6
where "first" is uninitialized, but is accessed
in that function.
Normally we call xfs_bmap_init() first to initialize
both the free list and the first block, but in these
cases, the free list var is sent as NULL.
So in these 2 cases, explicitly initialize the "first"
variable to NULLFSBLOCK as xfs_bmap_init() does
elsewhere.
Coverity caught this.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
error);
}
+ first = NULLFSBLOCK;
while (bno < mp->m_sb.sb_rbmblocks) {
/*
* fill the file one block at a time
error);
}
+ first = NULLFSBLOCK;
while (bno < end_bno) {
/*
* fill the file one block at a time