]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/dissect-image: use strdup_to_full() in one more place
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 19 Mar 2024 22:34:24 +0000 (23:34 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 20 Mar 2024 14:18:21 +0000 (15:18 +0100)
src/shared/dissect-image.c

index eac3641abd56196af2c8a32367c61b51c87c349f..ad6c5c065f066ae9df84f0de47e39382ab230c70 100644 (file)
@@ -268,16 +268,8 @@ int probe_filesystem_full(
         (void) blkid_probe_lookup_value(b, "TYPE", &fstype, NULL);
 
         if (fstype) {
-                char *t;
-
                 log_debug("Probed fstype '%s' on partition %s.", fstype, path);
-
-                t = strdup(fstype);
-                if (!t)
-                        return -ENOMEM;
-
-                *ret_fstype = t;
-                return 1;
+                return strdup_to_full(ret_fstype, fstype);
         }
 
 not_found: