qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH -V5 23/28] virtio-9p: Fix the memset usage


From: Venkateswararao Jujjuri (JV)
Subject: [Qemu-devel] [PATCH -V5 23/28] virtio-9p: Fix the memset usage
Date: Thu, 2 Sep 2010 12:39:43 -0700

From: Aneesh Kumar K.V <address@hidden>

The arguments are wrong. Use qemu_mallocz directly

Signed-off-by: Aneesh Kumar K.V <address@hidden>
Signed-off-by: Venkateswararao Jujjuri <address@hidden>
---
 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 4127439..a53b222 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;
-- 
1.6.5.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]