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>
Tue, 10 Jan 2017 20:46:41 +0000 (21:46 +0100)
commit816c9311f1144a03da1fdc4feb2f6b0d3299fca0
tree18af1a5a0779a32f1c0964396b0cf42b3897979f
parentddc5c9a37be4517270453ce909d3dfcc8de58230
misc: mic: double free on ioctl error path

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