From: Roland Dreier <roland@xxxxxxxxxxxxxxx> Commit 911ae9434f83 ("[SCSI] mpt2sas: Added NUNA IO support in driver which uses multi-reply queue support of the HBA") added new allocations to the beginning of mpt2sas_base_attach(), which means directly returning an error on failure of mpt2sas_base_map_resources() will leak those allocations. Fix this by doing "goto out_free_resources" in this place too, as the rest of the function does. Signed-off-by: Roland Dreier <roland@xxxxxxxxxxxxxxx> --- drivers/scsi/mpt2sas/mpt2sas_base.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index beda04a..a7b2a16 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -4206,7 +4206,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc) r = mpt2sas_base_map_resources(ioc); if (r) - return r; + goto out_free_resources; if (ioc->is_warpdrive) { ioc->reply_post_host_index[0] = -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html