From: Hillf Danton Date: Mon, 16 May 2011 23:45:35 +0000 (-0700) Subject: [SCSI] libfc: fix mm leak in handling incoming request for target discovery X-Git-Tag: firefly_0821_release~7613^2~1023^2~46 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=83383dd11a445bbe493c75b9c88c243aa43df8d7;p=firefly-linux-kernel-4.4.55.git [SCSI] libfc: fix mm leak in handling incoming request for target discovery When handling incoming request, if the operation code carried by the received frame is not RSCN, the frame should be freed as in the RSCN case, or there is memory leakage. Signed-off-by: Hillf Danton Signed-off-by: Robert Love Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index 911b2736cafa..b9cb8140b398 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c @@ -205,6 +205,7 @@ static void fc_disc_recv_req(struct fc_lport *lport, struct fc_frame *fp) default: FC_DISC_DBG(disc, "Received an unsupported request, " "the opcode is (%x)\n", op); + fc_frame_free(fp); break; } }