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:
98203e8
)
btrfs-progs: handle failed strdup in subvol_uuid_search2
author
David Sterba
<dsterba@suse.com>
Mon, 12 Dec 2016 16:53:31 +0000
(17:53 +0100)
committer
David Sterba
<dsterba@suse.com>
Wed, 14 Dec 2016 14:06:36 +0000
(15:06 +0100)
Signed-off-by: David Sterba <dsterba@suse.com>
send-utils.c
patch
|
blob
|
history
diff --git
a/send-utils.c
b/send-utils.c
index
8b7f2d3
..
384cc5b
100644
(file)
--- a/
send-utils.c
+++ b/
send-utils.c
@@
-501,6
+501,10
@@
struct subvol_info *subvol_uuid_search2(struct subvol_uuid_search *s,
info->rtransid = btrfs_root_rtransid(&root_item);
if (type == subvol_search_by_path) {
info->path = strdup(path);
+ if (!info->path) {
+ ret = -ENOMEM;
+ goto out;
+ }
} else {
info->path = malloc(PATH_MAX);
if (!info->path) {