diff options
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r-- | src/nspawn/nspawn.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 99e24cf4ff..056b4ce5f3 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -278,6 +278,7 @@ static int custom_mounts_prepare(void) { static int set_sanitized_path(char **b, const char *path) { char *p; + int r; assert(b); assert(path); @@ -287,9 +288,9 @@ static int set_sanitized_path(char **b, const char *path) { if (errno != ENOENT) return -errno; - p = path_make_absolute_cwd(path); - if (!p) - return -ENOMEM; + r = path_make_absolute_cwd(path, &p); + if (r < 0) + return r; } free(*b); |