From 783f04e1d419f730639755e6bd4e7026ad6f2a3f Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Thu, 2 Sep 2010 11:09:07 +0530 Subject: virtio-9p: Fix the memset usage The arguments are wrong. Use qemu_mallocz directly Signed-off-by: Aneesh Kumar K.V --- hw/virtio-9p.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw') diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c index 4127439cf0..a53b2225e6 100644 --- a/hw/virtio-9p.c +++ b/hw/virtio-9p.c @@ -2823,8 +2823,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; -- cgit v1.2.3