diff options
Diffstat (limited to 'src/tmpfiles/tmpfiles.c')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 09b6ca5c2c..693a3da2f4 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -2101,7 +2101,7 @@ static int parse_argv(int argc, char *argv[]) { {} }; - int c; + int c, r; assert(argc >= 0); assert(argv); @@ -2144,10 +2144,10 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_ROOT: - free(arg_root); - arg_root = path_make_absolute_cwd(optarg); - if (!arg_root) - return log_oom(); + arg_root = mfree(arg_root); + r = path_make_absolute_cwd(optarg, &arg_root); + if (r < 0) + return log_error_errno(r, "Failed to make root path absolute: %m"); path_kill_slashes(arg_root); break; |