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/cpupool.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/cpupool.c')
-rw-r--r-- | xen/common/cpupool.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c index d5380f8a46..f9880ecce3 100644 --- a/xen/common/cpupool.c +++ b/xen/common/cpupool.c @@ -39,7 +39,7 @@ DEFINE_PER_CPU(struct cpupool *, cpupool); static struct cpupool *alloc_cpupool_struct(void) { - return xmalloc(struct cpupool); + return xzalloc(struct cpupool); } static void free_cpupool_struct(struct cpupool *c) @@ -118,7 +118,6 @@ static struct cpupool *cpupool_create( *perr = -ENOMEM; if ( (c = alloc_cpupool_struct()) == NULL ) return NULL; - memset(c, 0, sizeof(*c)); /* One reference for caller, one reference for cpupool_destroy(). */ atomic_set(&c->refcnt, 2); |