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>
This commit is contained in:
parent
89e5323c64
commit
dc92d14684
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user