misc: mic: double free on ioctl error path
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 9 Jan 2017 08:20:16 +0000 (11:20 +0300)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 03:01:10 +0000 (03:01 +0000)
commit24efadea7b1a5dc6d8dfbcafe63aa393f371ef1c
tree4c1058c6809b425e01b8b5ece86106ca6677a162
parentca4bbfa42d00a06f4084a195cd5ad1057cf980ce
misc: mic: double free on ioctl error path

commit 816c9311f1144a03da1fdc4feb2f6b0d3299fca0 upstream.

This function only has one caller.  Freeing "vdev" here leads to a use
after free bug.  There are several other error paths in this function
but this is the only one which frees "vdev".  It looks like the kfree()
can be safely removed.

Fixes: 61e9c905df78 ("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>
drivers/misc/mic/vop/vop_vringh.c