git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70db2be
)
fs: btrfs: Do not free multi when guaranteed to be NULL
author
Andrew Goodbody
<andrew.goodbody@linaro.org>
Tue, 8 Jul 2025 11:34:49 +0000
(12:34 +0100)
committer
Tom Rini
<trini@konsulko.com>
Tue, 15 Jul 2025 15:55:37 +0000
(09:55 -0600)
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>
fs/btrfs/volumes.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/volumes.c
b/fs/btrfs/volumes.c
index
5726981
..
71b0b55
100644
(file)
--- 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;
}