提交 dc92d146 编写于 作者: N Nelson Escobar 提交者: Doug Ledford

IB/usnic: Fix resource leak in error case

Signed-off-by: NDave Goodell <dgoodell@cisco.com>
Reviewed-by: NReese Faucette <rfaucett@cisco.com>
Reviewed-by: NXuyang Wang <xuywang@cisco.com>
Signed-off-by: NNelson Escobar <neescoba@cisco.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 89e5323c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册