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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue