]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: mpt3sas: Fixed memory leaks in driver
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Tue, 10 Oct 2017 13:11:15 +0000 (18:41 +0530)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 27 Oct 2017 21:30:53 +0000 (14:30 -0700)
commitce82346ddcc056a462efc44fee691e86c236b36e
treeb1eab5494dae68a48f6fae030637ba4ccbf33b26
parentbfc2669c924fd405a7f7247afbc88630bdfd6986
scsi: mpt3sas: Fixed memory leaks in driver

While removing Expander devices, we are removing expander device entry
from the list before freeing its child devices. While freeing child
device we are finding its parent device node as NULL and therefore we
are not freeing the child device's allocated data structures.  Updated
the driver to remove the expander device from the list only after
freeing all its child devices.

[mkp: clarified commit message]

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Orabug: 26894858
(cherry picked from commit bbe3def3a11dc1040d45469f5dd26032e9fd8c79)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_scsih.c