tools/xenstored: fix possible NULL deref

Avoid dereferencing NULL in introduce_domain() when called during
live update.

Coverity ID: 1665111
Fixes: f78895ad78 ("tools/xenstored: Read event channel from xenstored page")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
This commit is contained in:
Juergen Gross authored and Jan Beulich committed 2025-08-21 12:49:25 +02:00
1 parent 723e057192
commit f3365a6bfd
1 file changed
+1 -1
+1 -1
View File
@@ -1032,7 +1032,7 @@ static struct domain *introduce_domain(const void *ctx,
if (!interface && !restore)
return NULL;
if (interface->evtchn_port)
if (!restore && interface->evtchn_port)
port = interface->evtchn_port;
if (new_domain(domain, port, restore)) {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.