mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 17:24:17 +08:00
misc: mic: use after free printing error message
Swap the printk and kfree() to avoid a use after free bug.
Fixes: 61e9c905df
('misc: mic: Enable VOP host side functionality')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1b79dff672
commit
6ddf2f0cb1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user