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>
This commit is contained in:
Aneesh Kumar K.V 2010-09-02 11:09:07 +05:30
parent 5c0f255dd4
commit 783f04e1d4
1 changed files with 1 additions and 2 deletions

View File

@ -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;