diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-01-09 09:20:16 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-10 21:46:41 +0100 |
commit | 816c9311f1144a03da1fdc4feb2f6b0d3299fca0 (patch) | |
tree | 18af1a5a0779a32f1c0964396b0cf42b3897979f /drivers/misc/mic | |
parent | misc: set error code when devm_kstrdup fails (diff) | |
download | linux-816c9311f1144a03da1fdc4feb2f6b0d3299fca0.tar.xz linux-816c9311f1144a03da1fdc4feb2f6b0d3299fca0.zip |
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>
Diffstat (limited to 'drivers/misc/mic')
-rw-r--r-- | drivers/misc/mic/vop/vop_vringh.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/misc/mic/vop/vop_vringh.c b/drivers/misc/mic/vop/vop_vringh.c index 88e45234d527..fed992e2c258 100644 --- a/drivers/misc/mic/vop/vop_vringh.c +++ b/drivers/misc/mic/vop/vop_vringh.c @@ -292,7 +292,6 @@ static int vop_virtio_add_device(struct vop_vdev *vdev, if (ret) { dev_err(vop_dev(vdev), "%s %d err %d\n", __func__, __LINE__, ret); - kfree(vdev); return ret; } |