Commit 3a745b6f authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8bdeeb26
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment