Skip to content

Commit

Permalink
[SCSI] be2iscsi: Free tags allocated
Browse files Browse the repository at this point in the history
This patch  frees tags that are already allocated in case of
failure

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Jayamohan Kallickal authored and James Bottomley committed Jul 28, 2010
1 parent 4f5af07 commit 5db3f33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/be2iscsi/be_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;

}
Expand Down

0 comments on commit 5db3f33

Please sign in to comment.