]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
repair: fix an uninitialized variable issue
authorGao Xiang <hsiangkao@redhat.com>
Fri, 23 Apr 2021 14:20:15 +0000 (10:20 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 23 Apr 2021 14:20:15 +0000 (10:20 -0400)
commitda7f6039b6f0fed8cb8fce6bd3c876a02bcca9f9
tree41c01343294033944719ed85b5ea3777a3ab0c56
parent272480fa96b2066487e1cc9e7d0c63c1a105b76d
repair: fix an uninitialized variable issue

An uninitialized variable issue reported by Coverity, it seems
the following for-loop can be exited in advance with isblock == 1,
and bp is still uninitialized.

In case of that, initialize bp as NULL in advance to avoid this.

Fixes: 1f7c7553489c ("repair: don't duplicate names in phase 6")
Fixes-coverity-id: 1476291
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/phase6.c