diff options
Diffstat (limited to 'src/shared/install.c')
-rw-r--r-- | src/shared/install.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/shared/install.c b/src/shared/install.c index 9b72f76662..a1720488e8 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -48,13 +48,12 @@ typedef struct { static int in_search_path(const char *path, char **search) { _cleanup_free_ char *parent = NULL; - int r; assert(path); - r = path_get_parent(path, &parent); - if (r < 0) - return r; + parent = dirname_malloc(path); + if (!parent) + return -ENOMEM; return strv_contains(search, parent); } |