Merge branch 'tmp-CID-645850' into 'master'

Fix new Coverity Scan defect

See merge request openconnect/ocserv!530
This commit is contained in:
Nikos Mavrogiannopoulos
2026-05-01 19:26:45 +00:00
+8 -5
View File
@@ -72,12 +72,15 @@ int main(void)
vhost = talloc_zero(s, struct vhost_cfg_st); vhost = talloc_zero(s, struct vhost_cfg_st);
if (vhost == NULL) if (vhost == NULL)
exit(1); exit(1);
vhost->config = talloc_zero(vhost, ReloadableConfig); vhost->config = talloc_zero(vhost, ReloadableConfig);
if (vhost->config != NULL) { if (vhost->config == NULL)
/* talloc_zero suffices for test-only field access; no pack/unpack needed */ exit(1);
vhost->config->network =
talloc_zero(vhost->config, NetworkConfig); /* talloc_zero suffices for test-only field access; no pack/unpack needed */
} vhost->config->network = talloc_zero(vhost->config, NetworkConfig);
if (vhost->config->network == NULL)
exit(1);
list_add(s->vconfig, &vhost->list); list_add(s->vconfig, &vhost->list);