diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2015-07-28 15:16:10 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-29 20:43:15 (GMT) |
commit | 2e4c30458e31e5f6487d1393254f2ab347cfb02c (patch) | |
tree | fe4512859dcef47510fc2dae75e4f9376c4312c6 /drivers/staging/most | |
parent | 7ac5c9f0a0228fff35c0ea85008ff642b07e6db3 (diff) | |
download | linux-2e4c30458e31e5f6487d1393254f2ab347cfb02c.tar.xz |
Staging: most: fix dereferencing freed memory
This patch fixes the dereferencing of freed memory.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/aim-cdev/cdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c index d5fb4a0..cfc32df 100644 --- a/drivers/staging/most/aim-cdev/cdev.c +++ b/drivers/staging/most/aim-cdev/cdev.c @@ -124,9 +124,9 @@ static int aim_close(struct inode *inode, struct file *filp) cdev_del(&channel->cdev); kfifo_free(&channel->fifo); list_del(&channel->list); - kfree(channel); ida_simple_remove(&minor_id, MINOR(channel->devno)); wake_up_interruptible(&channel->wq); + kfree(channel); return 0; } mutex_unlock(&channel->io_mutex); |