summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Goodbody <andrew.goodbody@linaro.org>2025-07-08 12:34:49 +0100
committerTom Rini <trini@konsulko.com>2025-07-15 09:55:37 -0600
commit9204cae0937c0e26fcff1ee08e51ef37f59844fe (patch)
tree243480a023e27f1b740be9d126590c5417744d52
parent70db2be9fbae747a869ec5d7af1055685a9c01f3 (diff)
fs: btrfs: Do not free multi when guaranteed to be NULL
multi is guaranteed to be NULL in the first two error exit paths so the attempt to free it is not needed. Remove those calls. This issue found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 5726981b19c..71b0b55b9c6 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -972,12 +972,10 @@ int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
again:
ce = search_cache_extent(&map_tree->cache_tree, logical);
if (!ce) {
- kfree(multi);
*length = (u64)-1;
return -ENOENT;
}
if (ce->start > logical) {
- kfree(multi);
*length = ce->start - logical;
return -ENOENT;
}