提交 783f04e1 编写于 作者: A Aneesh Kumar K.V

virtio-9p: Fix the memset usage

The arguments are wrong. Use qemu_mallocz directly
Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
上级 5c0f255d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册