]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: fix unitialized automatic struct ifake to 0.
authorBill O'Donnell <bodonnel@redhat.com>
Fri, 14 Jun 2024 16:00:14 +0000 (11:00 -0500)
committerCarlos Maiolino <cem@kernel.org>
Mon, 17 Jun 2024 11:54:47 +0000 (13:54 +0200)
Ensure automatic struct ifake is properly initialized.

Coverity-id: 15966001596597

Signed-off-by: Bill O'Donnell <bodonnel@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
db/bmap_inflate.c

index 00e1aff665678c463141d3de464704f8a627fffc..4de534dccf34b2368bd970003038a93383805d97 100644 (file)
@@ -340,7 +340,7 @@ build_new_datafork(
        const struct xfs_bmbt_irec      *irec,
        xfs_extnum_t                    nextents)
 {
-       struct xbtree_ifakeroot         ifake;
+       struct xbtree_ifakeroot         ifake = {};
        struct xfs_btree_cur            *bmap_cur;
        int                             error;
 
@@ -396,7 +396,7 @@ estimate_size(
                .leaf_slack             = 1,
                .node_slack             = 1,
        };
-       struct xbtree_ifakeroot         ifake;
+       struct xbtree_ifakeroot         ifake = {};
        struct xfs_btree_cur            *bmap_cur;
        int                             error;