]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: *ret = NULL for early return in unit_mounts_for_build_json()
authorIvan Kruglov <mail@ikruglov.com>
Wed, 4 Jun 2025 14:37:03 +0000 (07:37 -0700)
committerIvan Kruglov <mail@ikruglov.com>
Thu, 5 Jun 2025 10:59:36 +0000 (03:59 -0700)
src/core/varlink-unit.c

index 23f4e65b83fbdd92151d4bf123908e715cd8ee93..ef1bafc94dfb9577c61524f100390f08f66c557e 100644 (file)
@@ -57,8 +57,10 @@ static int unit_mounts_for_build_json(sd_json_variant **ret, const char *name, v
         assert(ret);
         assert(name);
 
-        if (!mounts_for)
+        if (!mounts_for) {
+                *ret = NULL;
                 return 0;
+        }
 
         d = unit_mount_dependency_type_from_string(name);
         if (d < 0)