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:
c9d43f2
)
btrfs-progs: subvol_uuid_search: return error on memory allocation failure
author
Prasanth K S R
<prasanth.ksr@dell.com>
Sat, 10 Dec 2016 13:47:42 +0000
(19:17 +0530)
committer
David Sterba
<dsterba@suse.com>
Wed, 14 Dec 2016 14:06:36 +0000
(15:06 +0100)
This commit fixes coverity defect CID 1328695.
Resolves-coverity-id: 1328695
Signed-off-by: Prasanth K S R <prasanth.ksr@dell.com>
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
a85fa08
..
5026882
100644
(file)
--- a/
send-utils.c
+++ b/
send-utils.c
@@
-486,6
+486,10
@@
struct subvol_info *subvol_uuid_search(struct subvol_uuid_search *s,
info->path = strdup(path);
} else {
info->path = malloc(PATH_MAX);
+ if (!info->path) {
+ ret = -ENOMEM;
+ goto out;
+ }
ret = btrfs_subvolid_resolve(s->mnt_fd, info->path,
PATH_MAX, root_id);
}