diff options
author | Jan Beulich <jbeulich@suse.com> | 2011-10-04 14:16:32 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2011-10-04 14:16:32 +0200 |
commit | cef3d6c06771651b20504357379c3ad53d7673cd (patch) | |
tree | 3b14f0c937b51fb8f38d78cfd4f27f63e9b92d1f /xen/common/schedule.c | |
parent | beb8eac93c9a38c417db4ae77430af5568e54f1c (diff) | |
download | xen-cef3d6c06771651b20504357379c3ad53d7673cd.tar.gz xen-cef3d6c06771651b20504357379c3ad53d7673cd.tar.bz2 xen-cef3d6c06771651b20504357379c3ad53d7673cd.zip |
use xzalloc in common code
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/schedule.c')
-rw-r--r-- | xen/common/schedule.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 0f6d41ee96..105961ed5b 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -233,14 +233,13 @@ int sched_move_domain(struct domain *d, struct cpupool *c) if ( domdata == NULL ) return -ENOMEM; - vcpu_priv = xmalloc_array(void *, d->max_vcpus); + vcpu_priv = xzalloc_array(void *, d->max_vcpus); if ( vcpu_priv == NULL ) { SCHED_OP(c->sched, free_domdata, domdata); return -ENOMEM; } - memset(vcpu_priv, 0, d->max_vcpus * sizeof(void *)); for_each_vcpu ( d, v ) { vcpu_priv[v->vcpu_id] = SCHED_OP(c->sched, alloc_vdata, v, domdata); |