summaryrefslogtreecommitdiff
path: root/src/shared/install.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-04-12 20:42:32 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2022-04-15 18:26:07 +0200
commit6e961aeb262521742a4cd92e4620de193f159f7c (patch)
treee68fa5d8f940eed1ae141fbcffdec790b24d50aa /src/shared/install.c
parent27cd31c0b20ce09c1165ea2691ae5079b675d6d6 (diff)
downloadsystemd-6e961aeb262521742a4cd92e4620de193f159f7c.tar.gz
shared/install: fix crash when reenable is called without --root
Diffstat (limited to 'src/shared/install.c')
-rw-r--r--src/shared/install.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 58bccdcaa8..f7257c5ceb 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.