From patchwork Thu Jul 22 15:58:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH-V3,23/24] virtio-9p: Fix the memset usage Date: Thu, 22 Jul 2010 05:58:10 -0000 From: jvrao X-Patchwork-Id: 59606 Message-Id: <1279814291-8301-24-git-send-email-jvrao@linux.vnet.ibm.com> To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, Venkateswararao Jujjuri , "Aneesh Kumar K.V" From: Aneesh Kumar K.V The arguments are wrong. Use qemu_mallocz directly Signed-off-by: Aneesh Kumar K.V Signed-off-by: Venkateswararao Jujjuri --- hw/virtio-9p.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c index 6899070..2a8deb9 100644 --- a/hw/virtio-9p.c +++ b/hw/virtio-9p.c @@ -2819,8 +2819,7 @@ static void v9fs_wstat_post_chown(V9fsState *s, V9fsWstatState *vs, int err) if (vs->v9stat.name.size != 0) { V9fsRenameState *vr; - vr = qemu_malloc(sizeof(V9fsRenameState)); - memset(vr, sizeof(*vr), 0); + vr = qemu_mallocz(sizeof(V9fsRenameState)); vr->newdirfid = -1; vr->pdu = vs->pdu; vr->fidp = vs->fidp;