[SCSI] libfc: fix mm leak in handling incoming request for target discovery
authorHillf Danton <dhillf@gmail.com>
Mon, 16 May 2011 23:45:35 +0000 (16:45 -0700)
committerJames Bottomley <jbottomley@parallels.com>
Tue, 24 May 2011 16:36:41 +0000 (12:36 -0400)
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>
drivers/scsi/libfc/fc_disc.c

index 911b2736cafae204379b8db7f18767b788d79bc3..b9cb8140b398220c384820029dc5cac3efdae393 100644 (file)
@@ -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;
        }
 }