Skip to contentSkip to conversation

be2iscsi: Free tags allocated

PATCH In review Jayamohan Kallickal 1 participant 1 message Jul 21, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 8/19 be2iscsi: Free tags allocated

This patch frees tags that are already allocated in case of
failure

---
 drivers/scsi/be2iscsi/be_mgmt.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/scsi/be2iscsi/be_mgmt.c +2 -0
index dcb70fa..3036d9e 100644
@@ -168,6 +168,7 @@ unsigned int  mgmt_invalidate_icds(struct beiscsi_hba *phba,
 		SE_DEBUG(DBG_LVL_1,
 			 "Failed to alloc memory for mgmt_invalidate_icds\n");
 		spin_unlock(&ctrl->mbox_lock);
+		free_mcc_tag(&phba->ctrl, tag);
 		return 0;
 	}
 	nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
@@ -330,6 +331,7 @@ int mgmt_open_connection(struct beiscsi_hba *phba,
 		shost_printk(KERN_ERR, phba->shost, "unknown addr family %d\n",
 			     dst_addr->sa_family);
 		spin_unlock(&ctrl->mbox_lock);
+		free_mcc_tag(&phba->ctrl, tag);
 		return -EINVAL;
 
 	}
Signature · 1 line
1.6.5.2