summaryrefslogtreecommitdiff
path: root/src/shared/path-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/path-util.c')
-rw-r--r--src/shared/path-util.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/shared/path-util.c b/src/shared/path-util.c
index dd12d3d634..4857971b33 100644
--- a/src/shared/path-util.c
+++ b/src/shared/path-util.c
@@ -190,13 +190,17 @@ char **path_strv_canonicalize(char **l) {
errno = 0;
u = canonicalize_file_name(t);
- free(t);
if (!u) {
- if (errno == ENOMEM || !errno)
- enomem = true;
-
- continue;
+ if (errno == ENOENT)
+ u = t;
+ else {
+ free(t);
+ if (errno == ENOMEM || !errno)
+ enomem = true;
+
+ continue;
+ }
}
l[k++] = u;