diff options
author | Nelson Escobar <neescoba@cisco.com> | 2015-12-09 18:42:18 (GMT) |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-12-23 15:50:58 (GMT) |
commit | dc92d14684c066f81f120e740ef38b87f37e0622 (patch) | |
tree | 89c4b82d2bc538989278f7a9ef48f32d5229b7d9 /drivers/infiniband/hw/usnic | |
parent | 89e5323c644e0b52f8b81b8e77a71e0d447f8c16 (diff) | |
download | linux-dc92d14684c066f81f120e740ef38b87f37e0622.tar.xz |
IB/usnic: Fix resource leak in error case
Signed-off-by: Dave Goodell <dgoodell@cisco.com>
Reviewed-by: Reese Faucette <rfaucett@cisco.com>
Reviewed-by: Xuyang Wang <xuywang@cisco.com>
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/usnic')
-rw-r--r-- | drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c index b306870..5f44b66 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c @@ -575,7 +575,7 @@ alloc_res_chunk_list(struct usnic_vnic *vnic, return res_chunk_list; out_free_res: - for (i--; i > 0; i--) + for (i--; i >= 0; i--) usnic_vnic_put_resources(res_chunk_list[i]); kfree(res_chunk_list); return ERR_PTR(err); |