]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Use streq_ptr()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 6 Jan 2025 22:02:30 +0000 (23:02 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 7 Jan 2025 08:11:30 +0000 (09:11 +0100)
p->format is not guaranteed to be initialized.

src/repart/repart.c

index 7934a974355e6948aaa6c2be28219fd8339ca4db..bed4fd92bc2d7ed81774eff341fccad5e726f8a1 100644 (file)
@@ -2324,7 +2324,7 @@ static int partition_finalize_fstype(Partition *p, const char *path) {
                 return log_oom();
 
         const char *v = secure_getenv(e);
-        if (!v || streq(p->format, v))
+        if (!v || streq_ptr(p->format, v))
                 return 0;
 
         log_syntax(NULL, LOG_NOTICE, path, 1, 0,