mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue