diff --git a/xen/common/domain.c b/xen/common/domain.c index d151be3f36..164c9d14e9 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -421,14 +421,15 @@ struct domain *domain_create(domid_t domid, if ( (d = alloc_domain_struct()) == NULL ) return ERR_PTR(-ENOMEM); - d->options = config ? config->flags : 0; - /* Sort out our idea of is_system_domain(). */ d->domain_id = domid; /* Debug sanity. */ ASSERT(is_system_domain(d) ? config == NULL : config != NULL); + if ( config ) + d->options = config->flags; + /* Sort out our idea of is_control_domain(). */ d->is_privileged = is_priv;