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/event_channel.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/event_channel.c')
-rw-r--r-- | xen/common/event_channel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 0628120c24..588efadbbe 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -100,10 +100,9 @@ static int get_free_port(struct domain *d) if ( port == MAX_EVTCHNS(d) ) return -ENOSPC; - chn = xmalloc_array(struct evtchn, EVTCHNS_PER_BUCKET); + chn = xzalloc_array(struct evtchn, EVTCHNS_PER_BUCKET); if ( unlikely(chn == NULL) ) return -ENOMEM; - memset(chn, 0, EVTCHNS_PER_BUCKET * sizeof(*chn)); bucket_from_port(d, port) = chn; for ( i = 0; i < EVTCHNS_PER_BUCKET; i++ ) |