diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-05-10 15:19:04 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-10 16:50:12 (GMT) |
commit | 3a745b6f471dbd7e057b30e031e476c41c6a2bf8 (patch) | |
tree | 5253d51d3d5c83dbe5680db9b49218a48e71bb42 /drivers/staging/ipack | |
parent | 8bdeeb26c57012ea19a3b8fe3aeaecff377ae07d (diff) | |
download | linux-fsl-qoriq-3a745b6f471dbd7e057b30e031e476c41c6a2bf8.tar.xz |
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>
Diffstat (limited to 'drivers/staging/ipack')
-rw-r--r-- | drivers/staging/ipack/bridges/tpci200.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index ab6ea0a..08cd851 100644 --- a/drivers/staging/ipack/bridges/tpci200.c +++ b/drivers/staging/ipack/bridges/tpci200.c @@ -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; |