projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db09819
)
btrfs-progs: check result of first_cache_extent
author
David Sterba
<dsterba@suse.cz>
Fri, 19 Dec 2014 15:22:59 +0000
(16:22 +0100)
committer
David Sterba
<dsterba@suse.cz>
Fri, 19 Dec 2014 17:04:23 +0000
(18:04 +0100)
If the tree's empty, we'll get NULL and dereference it.
Resolves-Coverity-CID: 1248828
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-check.c
patch
|
blob
|
history
diff --git
a/cmds-check.c
b/cmds-check.c
index
6eea36c
..
3e7a4eb
100644
(file)
--- a/
cmds-check.c
+++ b/
cmds-check.c
@@
-8075,6
+8075,8
@@
static void free_roots_info_cache(void)
struct root_item_info *rii;
entry = first_cache_extent(roots_info_cache);
+ if (!entry)
+ break;
remove_cache_extent(roots_info_cache, entry);
rii = container_of(entry, struct root_item_info, cache_extent);
free(rii);