NTB: ntb_tool: fix memory leak on 'buf' on error exit path
Currently there is a memory leak on buf when the call to ntb_mw_get_align
fails. Add an exit err label and jump to this so that kfree on buf frees
the memory.
Detected by CoverityScan, CID#1464286 ("Resource leak")
Fixes: d637628ce00c ("NTB: ntb_tool: Add full multi-port NTB API support")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Acked-by: NSerge Semin <fancer.lancer@gmail.com>
Signed-off-by: NJon Mason <jdmason@kudzu.us>
Showing
想要评论请 注册 或 登录