mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
723e057192
commit
f3365a6bfd
1 file changed
+1
-1
@@ -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)) {
|
||||
|
||||