diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-11-04 18:14:54 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-11-25 11:19:06 +0100 |
commit | 090685b5a10f9a1b896b0228572c8d54667354cf (patch) | |
tree | 6e6b445e15a48e430b924a61a68f059a8459ee2d /src/cryptsetup | |
parent | units: document why CAP_SYS_PTRACE is needed by journald (diff) | |
download | systemd-090685b5a10f9a1b896b0228572c8d54667354cf.tar.xz systemd-090685b5a10f9a1b896b0228572c8d54667354cf.zip |
cryptsetup: use strjoin() for concatenating strings
Diffstat (limited to 'src/cryptsetup')
-rw-r--r-- | src/cryptsetup/cryptsetup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 6ccb152d10..f0761ac8aa 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -353,7 +353,8 @@ static char *disk_mount_point(const char *label) { /* Yeah, we don't support native systemd unit files here for now */ - if (asprintf(&device, "/dev/mapper/%s", label) < 0) + device = strjoin("/dev/mapper/", label); + if (!device) return NULL; f = setmntent(fstab_path(), "re"); |