summary refs log tree commit diff stats
path: root/hw
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-09-02 11:09:07 +0530
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-09-08 22:56:42 +0530
commit783f04e1d419f730639755e6bd4e7026ad6f2a3f (patch)
treea249be0c80dc6b165b874998eb0b32d08120fcfd /hw
parent5c0f255dd4c8b8f3349b6ed14233f77948c5a9a6 (diff)
downloadfocaccia-qemu-783f04e1d419f730639755e6bd4e7026ad6f2a3f.tar.gz
focaccia-qemu-783f04e1d419f730639755e6bd4e7026ad6f2a3f.zip
virtio-9p: Fix the memset usage
The arguments are wrong. Use qemu_mallocz directly

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/virtio-9p.c3
1 files changed, 1 insertions, 2 deletions
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;