From: Zbigniew Jędrzejewski-Szmek Date: Tue, 12 Apr 2022 18:42:32 +0000 (+0200) Subject: shared/install: fix crash when reenable is called without --root X-Git-Tag: v251-rc2~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e961aeb262521742a4cd92e4620de193f159f7c;p=thirdparty%2Fsystemd.git shared/install: fix crash when reenable is called without --root --- diff --git a/src/shared/install.c b/src/shared/install.c index 58bccdcaa80..f7257c5ceb8 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -2825,7 +2825,7 @@ static int normalize_linked_files( return r; const char *p = NULL; - if (i && i->path) + if (i && i->path && i->root) /* Use startswith here, because we know that paths are normalized, and * path_startswith() would give us a relative path, but we need an absolute path * relative to i->root.