From: Zbigniew Jędrzejewski-Szmek Date: Tue, 19 Mar 2024 22:34:24 +0000 (+0100) Subject: shared/dissect-image: use strdup_to_full() in one more place X-Git-Tag: v256-rc1~459^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b41f88a23c1117eec892d212d001c37d1a0aa56d;p=thirdparty%2Fsystemd.git shared/dissect-image: use strdup_to_full() in one more place --- diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index eac3641abd5..ad6c5c065f0 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -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: