mirror of https://github.com/xemu-project/xemu.git
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:
parent
5c0f255dd4
commit
783f04e1d4
|
@ -2823,8 +2823,7 @@ static void v9fs_wstat_post_chown(V9fsState *s, V9fsWstatState *vs, int err)
|
||||||
if (vs->v9stat.name.size != 0) {
|
if (vs->v9stat.name.size != 0) {
|
||||||
V9fsRenameState *vr;
|
V9fsRenameState *vr;
|
||||||
|
|
||||||
vr = qemu_malloc(sizeof(V9fsRenameState));
|
vr = qemu_mallocz(sizeof(V9fsRenameState));
|
||||||
memset(vr, sizeof(*vr), 0);
|
|
||||||
vr->newdirfid = -1;
|
vr->newdirfid = -1;
|
||||||
vr->pdu = vs->pdu;
|
vr->pdu = vs->pdu;
|
||||||
vr->fidp = vs->fidp;
|
vr->fidp = vs->fidp;
|
||||||
|
|
Loading…
Reference in New Issue