be2iscsi: Fix MCC WRB leak in open_connection
authorJitendra Bhivare <jitendra.bhivare@broadcom.com>
Thu, 4 Feb 2016 10:19:16 +0000 (15:49 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
commit291fef26e0f85bd2c1f7152138fc3459e7a00ea1
tree433e666244370df5be7df093ec75721b9bc6a6f6
parentc448427b96ed1a71700728a67323e3e5c76563d2
be2iscsi: Fix MCC WRB leak in open_connection

In open with IP of unknown address family, only tag is freed and error
returned. MCC WRB allocated for the operation is not freed.

Added check for supported family of IP in the beginning before
allocating the tag and WRB.

Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/be2iscsi/be_mgmt.c