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:
87296b5
)
btrfs-progs: handler memory allocation failure in add_extent_rec
author
David Sterba
<dsterba@suse.com>
Wed, 6 Jan 2016 14:52:11 +0000
(15:52 +0100)
committer
David Sterba
<dsterba@suse.com>
Tue, 12 Jan 2016 14:02:51 +0000
(15:02 +0100)
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c
patch
|
blob
|
history
diff --git
a/cmds-check.c
b/cmds-check.c
index 266451a894f7ccee5187fd11b716dec3845e7d30..e75165693a9b64336668389006c28cbd44d583e0 100644
(file)
--- a/
cmds-check.c
+++ b/
cmds-check.c
@@
-4586,6
+4586,8
@@
static int add_extent_rec(struct cache_tree *extent_cache,
return ret;
}
rec = malloc(sizeof(*rec));
+ if (!rec)
+ return -ENOMEM;
rec->start = start;
rec->max_size = max_size;
rec->nr = max(nr, max_size);