diff options
Diffstat (limited to 'src/basic/btrfs-util.c')
-rw-r--r-- | src/basic/btrfs-util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/btrfs-util.c b/src/basic/btrfs-util.c index f799f8dcc2..7b49a1a516 100644 --- a/src/basic/btrfs-util.c +++ b/src/basic/btrfs-util.c @@ -60,13 +60,13 @@ static int validate_subvolume_name(const char *name) { static int open_parent(const char *path, int flags) { _cleanup_free_ char *parent = NULL; - int r, fd; + int fd; assert(path); - r = path_get_parent(path, &parent); - if (r < 0) - return r; + parent = dirname_malloc(path); + if (!parent) + return -ENOMEM; fd = open(parent, flags); if (fd < 0) |