mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 08:47:44 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7ac5c9f0a0
commit
2e4c30458e
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user