提交 3a745b6f 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册