lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun,  9 Aug 2020 17:11:53 -0500
From:   Navid Emamdoost <>
To:     Nilesh Javali <>,,
        "James E.J. Bottomley" <>,
        "Martin K. Petersen" <>,,
Cc:, Navid Emamdoost <>
Subject: [PATCH] scsi: qla2xxx: fix memory leak if qlt_add_target fails

In the implementation of qla2x00_probe_one() the allocated and
initialized ha is leaked if it fails to add target via qlt_add_target().
Go to error handling path if qlt_add_target() fails.

Signed-off-by: Navid Emamdoost <>
 drivers/scsi/qla2xxx/qla_os.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index e92fad99338c..81a58ae54909 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -3457,7 +3457,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	    ha->isp_ops->fw_version_str(base_vha, fw_str, sizeof(fw_str)));
-	qlt_add_target(ha, base_vha);
+	ret = qlt_add_target(ha, base_vha);
+	if (ret)
+		goto probe_failed;
 	clear_bit(PFLG_DRIVER_PROBING, &base_vha->pci_flags);

Powered by blists - more mailing lists