* [PATCH] drivers/scsi:fix memory leak
@ 2016-05-16 6:31 Heloise
0 siblings, 0 replies; only message in thread
From: Heloise @ 2016-05-16 6:31 UTC (permalink / raw)
To: jejb, martin.petersen; +Cc: linux-scsi, linux-kernel, os
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@iscas.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-16 6:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-16 6:31 [PATCH] drivers/scsi:fix memory leak Heloise
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).