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