summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--send-utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/send-utils.c b/send-utils.c
index 8b7f2d31..384cc5b7 100644
--- 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) {