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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Jun 2017 05:11:16 +0000 (07:11 +0200)
commitf28ba80c6a3e8bf7ec96e06667dd82e98ae1c672
treefff16aa77dd9b218738f26eba554da394b06831a
parent02d009e865a830a16d932c4ea2fce158642c0bbe
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