All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: fix the problem that the pointer "sp" is double free
@ 2021-11-16  2:45 zhangyue
  0 siblings, 0 replies; only message in thread
From: zhangyue @ 2021-11-16  2:45 UTC (permalink / raw)
  To: qla2xxx-upstream, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

in function qla24xx_sp_unmap, it is already called sp->free(sp), then
it`s not need to called sp->free(sp) after qla24xx_sp_unmap is called.

Signed-off-by: zhangyue <zhangyue1@kylinos.cn>
---
 drivers/scsi/qla2xxx/qla_gs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index c3195d4c25e5..a7198a1e23fb 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -4228,7 +4228,6 @@ static void qla2x00_async_gpnft_gnnft_sp_done(void *s, int res)
 		if (rc) {
 			/* Cleanup here to prevent memory leak */
 			qla24xx_sp_unmap(vha, sp);
-			sp->free(sp);
 		}
 
 		spin_lock_irqsave(&vha->work_lock, flags);
-- 
2.30.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-16  2:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16  2:45 [PATCH] scsi: fix the problem that the pointer "sp" is double free zhangyue

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.