提交 6ddf2f0c 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

misc: mic: use after free printing error message

Swap the printk and kfree() to avoid a use after free bug.

Fixes: 61e9c905 ('misc: mic: Enable VOP host side functionality')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 1b79dff6
......@@ -290,9 +290,9 @@ static int vop_virtio_add_device(struct vop_vdev *vdev,
ret = vop_copy_dp_entry(vdev, argp, &type, &dd);
if (ret) {
kfree(vdev);
dev_err(vop_dev(vdev), "%s %d err %d\n",
__func__, __LINE__, ret);
kfree(vdev);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册