summaryrefslogtreecommitdiff
path: root/drivers/scsi/libfc/fc_disc.c
diff options
context:
space:
mode:
authorHillf Danton <dhillf@gmail.com>2011-05-16 23:45:35 (GMT)
committerJames Bottomley <jbottomley@parallels.com>2011-05-24 16:36:41 (GMT)
commit83383dd11a445bbe493c75b9c88c243aa43df8d7 (patch)
treeee07e934da9afe147c49faadc7289948b34d37ea /drivers/scsi/libfc/fc_disc.c
parentbdf252183e58654fcceedbf3fdcfd878b9e4f2d6 (diff)
downloadlinux-83383dd11a445bbe493c75b9c88c243aa43df8d7.tar.xz
[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 <dhillf@gmail.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <jbottomley@parallels.com>
Diffstat (limited to 'drivers/scsi/libfc/fc_disc.c')
-rw-r--r--drivers/scsi/libfc/fc_disc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 911b273..b9cb814 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;
}
}