mutable-tree: Quiet clang-analyzer warning
authorColin Walters <walters@verbum.org>
Tue, 29 Aug 2023 14:09:25 +0000 (10:09 -0400)
committerColin Walters <walters@verbum.org>
Tue, 29 Aug 2023 14:09:25 +0000 (10:09 -0400)
commitdb4ca6e7acfb9e62764a3c1c006c49e13e225e7b
treeffc5e4245b931fa58d40ebc2d7661cc1d7c4e2f7
parentd001729bef1217594dd10a005c9e6649f022dab3
mutable-tree: Quiet clang-analyzer warning

The warning here was about a use-after-free which is serious, but
I don't think it was reachable in practice, because we'd only
enter the second conditional if `contents_checksum != self->contents_checksum`,
yet we made them the same thing here.

Nevertheless, refactor the code to do a direct return in this
case because that's basically what happened before, and doing
so is a lot clearer.
src/libostree/ostree-mutable-tree.c