Re: [PATCH -next] RDMA/rtrs: fix potential resources leaks

2020-06-19 Thread Jason Gunthorpe
On Fri, Jun 19, 2020 at 03:16:57PM +0200, Jinpu Wang wrote: > Hi, Bo, > On Fri, Jun 19, 2020 at 3:10 PM Bo YU wrote: > > > > Dev is returned from allocation function kzalloc but it does not > > free it in out_err path. > If allocation failed, kzalloc return NULL, nothing to free. You should re-or

Re: [PATCH -next] RDMA/rtrs: fix potential resources leaks

2020-06-19 Thread Jinpu Wang
Hi, Bo, On Fri, Jun 19, 2020 at 3:10 PM Bo YU wrote: > > Dev is returned from allocation function kzalloc but it does not > free it in out_err path. If allocation failed, kzalloc return NULL, nothing to free. > > Detected by CoverityScan, CID# 1464569: (Resource leak) > > Fixes: c0894b3ea69d3("RDM

[PATCH -next] RDMA/rtrs: fix potential resources leaks

2020-06-19 Thread Bo YU
Dev is returned from allocation function kzalloc but it does not free it in out_err path. Detected by CoverityScan, CID# 1464569: (Resource leak) Fixes: c0894b3ea69d3("RDMA/rtrs: core: lib functions shared between client and server modules") Signed-off-by: Bo YU --- drivers/infiniband/ulp/rtrs