From: Lennart Poettering Date: Wed, 4 Nov 2020 17:14:54 +0000 (+0100) Subject: cryptsetup: use strjoin() for concatenating strings X-Git-Tag: v247~14^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=090685b5a10f9a1b896b0228572c8d54667354cf;p=thirdparty%2Fsystemd.git cryptsetup: use strjoin() for concatenating strings --- diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 6ccb152d101..f0761ac8aa5 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");