1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-08 08:58:27 +03:00

shared/install: fix crash when reenable is called without --root

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-04-12 20:42:32 +02:00 committed by Luca Boccassi
parent 27cd31c0b2
commit 6e961aeb26

View File

@ -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.