]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cryptsetup: use strjoin() for concatenating strings
authorLennart Poettering <lennart@poettering.net>
Wed, 4 Nov 2020 17:14:54 +0000 (18:14 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 25 Nov 2020 10:19:06 +0000 (11:19 +0100)
src/cryptsetup/cryptsetup.c

index 6ccb152d101da20b5854f8ab297c7ce2dde6816b..f0761ac8aa53b62812b0b758a62ea58fd180bd2d 100644 (file)
@@ -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");