Commit 2ebd7835 authored by Tomas Henzl's avatar Tomas Henzl Committed by Tim Gardner

mpt3sas: A correction in unmap_resources

BugLink: http://bugs.launchpad.net/bugs/1512221

It might happen that we try to free an already freed pointer.
Reported-by: default avatarMaurizio Lombardi <mlombard@redhat.com>
Signed-off-by: default avatarTomas Henzl <thenzl@redhat.com>
Acked-by: default avatarChaitra P B <chaitra.basappa@avagotech.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 5f985d88)
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 4cb25d47
......@@ -2020,8 +2020,10 @@ mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER *ioc)
_base_free_irq(ioc);
_base_disable_msix(ioc);
if (ioc->msix96_vector)
if (ioc->msix96_vector) {
kfree(ioc->replyPostRegisterIndex);
ioc->replyPostRegisterIndex = NULL;
}
if (ioc->chip_phys) {
iounmap(ioc->chip);
......
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