Re: [PATCH] fs/iomap: fix memory leak on error condition

2018-02-21 Thread Garry McNulty
On 21 February 2018 at 21:56, Dave Chinner wrote: > > On Wed, Feb 21, 2018 at 08:41:28PM +, Garry McNulty wrote: > > If the call to is_sync_kiocb() fails an error is returned without > > freeing dio. Set the return code and jump to out_free_dio. > > > > Detected by

Re: [PATCH] fs/iomap: fix memory leak on error condition

2018-02-21 Thread Garry McNulty
On 21 February 2018 at 21:56, Dave Chinner wrote: > > On Wed, Feb 21, 2018 at 08:41:28PM +, Garry McNulty wrote: > > If the call to is_sync_kiocb() fails an error is returned without > > freeing dio. Set the return code and jump to out_free_dio. > > > > Detected by CoverityScan, CID 1429424

Re: [PATCH] fs/iomap: fix memory leak on error condition

2018-02-21 Thread Dave Chinner
On Wed, Feb 21, 2018 at 08:41:28PM +, Garry McNulty wrote: > If the call to is_sync_kiocb() fails an error is returned without > freeing dio. Set the return code and jump to out_free_dio. > > Detected by CoverityScan, CID 1429424 ("Resource leak") Coverity is wrong. > Signed-off-by: Garry

Re: [PATCH] fs/iomap: fix memory leak on error condition

2018-02-21 Thread Dave Chinner
On Wed, Feb 21, 2018 at 08:41:28PM +, Garry McNulty wrote: > If the call to is_sync_kiocb() fails an error is returned without > freeing dio. Set the return code and jump to out_free_dio. > > Detected by CoverityScan, CID 1429424 ("Resource leak") Coverity is wrong. > Signed-off-by: Garry

[PATCH] fs/iomap: fix memory leak on error condition

2018-02-21 Thread Garry McNulty
If the call to is_sync_kiocb() fails an error is returned without freeing dio. Set the return code and jump to out_free_dio. Detected by CoverityScan, CID 1429424 ("Resource leak") Signed-off-by: Garry McNulty --- fs/iomap.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH] fs/iomap: fix memory leak on error condition

2018-02-21 Thread Garry McNulty
If the call to is_sync_kiocb() fails an error is returned without freeing dio. Set the return code and jump to out_free_dio. Detected by CoverityScan, CID 1429424 ("Resource leak") Signed-off-by: Garry McNulty --- fs/iomap.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff