From: Mike Yuan Date: Tue, 14 May 2024 07:48:15 +0000 (+0800) Subject: shared/bootspec: use path_make_absolute where appropriate X-Git-Tag: v256-rc2~17^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94e9ae6f533133d2055726aa3223e3da419b4164;p=thirdparty%2Fsystemd.git shared/bootspec: use path_make_absolute where appropriate --- diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index 882d026a404..188613fb9ea 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -79,10 +79,7 @@ static int mangle_path( assert(ret); /* Spec leaves open if prefixed with "/" or not, let's normalize that */ - if (path_is_absolute(p)) - c = strdup(p); - else - c = strjoin("/", p); + c = path_make_absolute(p, "/"); if (!c) return -ENOMEM;