core: *ret = NULL for early return in unit_mounts_for_build_json()

This commit is contained in:
Ivan Kruglov
2025-06-05 03:59:36 -07:00
parent 199ccd70f6
commit 27a10f4f2a
+3 -1
View 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)