]> 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)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 7 Jan 2025 18:26:13 +0000 (18:26 +0000)
p->format is not guaranteed to be initialized.

(cherry picked from commit ffcdaec632d8b96b63499054ff3492b03b33e233)

src/repart/repart.c

index 7e6fd2a29a4d9486c503ab85840db2b647af701b..2ddff313fc2dbab7c70979508ba0b0265c797819 100644 (file)
@@ -2311,7 +2311,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,