* [PATCH 09/21] lpfc 8.3.30: Fix resource leak when acc fails for received plogi
@ 2012-03-02 3:36 James Smart
0 siblings, 0 replies; only message in thread
From: James Smart @ 2012-03-02 3:36 UTC (permalink / raw)
To: linux-scsi
Fix resource leak when acc fails for received plogi.
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
---
lpfc_nportdisc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff -upNr a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c 2012-02-27 23:35:05.000000000 -0500
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c 2012-03-01 17:33:43.000000000 -0500
@@ -440,11 +440,15 @@ lpfc_rcv_plogi(struct lpfc_vport *vport,
spin_unlock_irq(shost->host_lock);
stat.un.b.lsRjtRsnCode = LSRJT_INVALID_CMD;
stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE;
- lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb,
+ rc = lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb,
ndlp, mbox);
+ if (rc)
+ mempool_free(mbox, phba->mbox_mem_pool);
return 1;
}
- lpfc_els_rsp_acc(vport, ELS_CMD_PLOGI, cmdiocb, ndlp, mbox);
+ rc = lpfc_els_rsp_acc(vport, ELS_CMD_PLOGI, cmdiocb, ndlp, mbox);
+ if (rc)
+ mempool_free(mbox, phba->mbox_mem_pool);
return 1;
out:
stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-02 3:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 3:36 [PATCH 09/21] lpfc 8.3.30: Fix resource leak when acc fails for received plogi James Smart
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).