浏览代码

[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>
Hillf Danton 14 年之前
父节点
当前提交
83383dd11a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/scsi/libfc/fc_disc.c

+ 1 - 0
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;
 	}
 }