mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 03:59:40 +02:00
Staging: ipack: dereferencing freed memory
We free "dev" then dereference it on the next line. Cc: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8bdeeb26c5
commit
3a745b6f47
|
|
@ -867,8 +867,8 @@ static int tpci200_slot_unregister(struct ipack_device *dev)
|
|||
return -ERESTARTSYS;
|
||||
|
||||
ipack_device_unregister(dev);
|
||||
kfree(dev);
|
||||
tpci200->slots[dev->slot].dev = NULL;
|
||||
kfree(dev);
|
||||
mutex_unlock(&tpci200->mutex);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user