Re: [PATCH][next] NTB: ntb_tool: fix memory leak on 'buf' on error exit path

2018-01-23 Thread Jon Mason
On Mon, Jan 22, 2018 at 01:02:39PM +0300, Serge Semin wrote: > On Mon, Jan 22, 2018 at 09:38:57AM +, Colin King > wrote: > > From: Colin Ian King > > > > Currently there is a memory leak on buf when the call to ntb_mw_get_align > > fails.

Re: [PATCH][next] NTB: ntb_tool: fix memory leak on 'buf' on error exit path

2018-01-23 Thread Jon Mason
On Mon, Jan 22, 2018 at 01:02:39PM +0300, Serge Semin wrote: > On Mon, Jan 22, 2018 at 09:38:57AM +, Colin King > wrote: > > From: Colin Ian King > > > > 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

Re: [PATCH][next] NTB: ntb_tool: fix memory leak on 'buf' on error exit path

2018-01-22 Thread Serge Semin
On Mon, Jan 22, 2018 at 09:38:57AM +, Colin King wrote: > From: Colin Ian King > > 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

Re: [PATCH][next] NTB: ntb_tool: fix memory leak on 'buf' on error exit path

2018-01-22 Thread Serge Semin
On Mon, Jan 22, 2018 at 09:38:57AM +, Colin King wrote: > From: Colin Ian King > > 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

[PATCH][next] NTB: ntb_tool: fix memory leak on 'buf' on error exit path

2018-01-22 Thread Colin King
From: Colin Ian King 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:

[PATCH][next] NTB: ntb_tool: fix memory leak on 'buf' on error exit path

2018-01-22 Thread Colin King
From: Colin Ian King 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