summaryrefslogtreecommitdiff
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r--cmds-subvolume.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 8832303c..63c708ef 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -236,6 +236,12 @@ again:
}
cpath = realpath(path, NULL);
+ if (!cpath) {
+ ret = errno;
+ fprintf(stderr, "ERROR: finding real path for '%s': %s\n",
+ path, strerror(errno));
+ goto out;
+ }
dupdname = strdup(cpath);
dname = dirname(dupdname);
dupvname = strdup(cpath);