]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/exec-invoke: do not check array being non-NULL
authorMike Yuan <me@yhndnzj.com>
Tue, 11 Nov 2025 18:51:01 +0000 (19:51 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 11 Nov 2025 22:41:24 +0000 (22:41 +0000)
Addresses
https://download.copr.fedorainfracloud.org/results/packit/systemd-systemd-39680/fedora-rawhide-i386/09787959-systemd/builder-live.log.gz

src/core/exec-invoke.c

index ff6d73b9dbf12b76b291ef6237a408a2d750f923..20efad69125167d162d20d1142fa2640c2deeac3 100644 (file)
@@ -2134,7 +2134,7 @@ static int build_environment(
         }
 
         if (!sd_id128_is_null(p->invocation_id)) {
-                assert(p->invocation_id_string);
+                assert(!isempty(p->invocation_id_string));
 
                 r = strv_extend_joined_with_size(&e, &n, "INVOCATION_ID=", p->invocation_id_string);
                 if (r < 0)