lists.openwall.net   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  linux-cve-announce  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]
Message-Id: <1463380306-5939-1-git-send-email-os@iscas.ac.cn>
Date:	Sun, 15 May 2016 23:31:46 -0700
From:	Heloise <os@...as.ac.cn>
To:	jejb@...ux.vnet.ibm.com, martin.petersen@...cle.com
Cc:	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	os@...as.ac.cn
Subject: [PATCH] drivers/scsi:fix memory leak

In function ahc_handle_en_lun, variable lstate has not been
freed before return, which can cause memory leak, fix it.

Signed-off-by: Heloise <os@...as.ac.cn>
---
 drivers/scsi/aic7xxx/aic7xxx_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
index 64ab9ea..e8fbdb5 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -7684,6 +7684,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
 
 		if (ccb->ccb_h.status != CAM_REQ_CMP) {
 			ahc_unlock(ahc, &s);
+			kfree(lstate);
 			return;
 		}
 
-- 
2.1.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ