linux/drivers/infiniband/ulp
Gioh Kim 7ecd7e290b RDMA/rtrs-clt: Fix memory leak of not-freed sess->stats and stats->pcpu_stats
sess->stats and sess->stats->pcpu_stats objects are freed
when sysfs entry is removed. If something wrong happens and
session is closed before sysfs entry is created,
sess->stats and sess->stats->pcpu_stats objects are not freed.

This patch adds freeing of them at three places:
1. When client uses wrong address and session creation fails.
2. When client fails to create a sysfs entry.
3. When client adds wrong address via sysfs add_path.

Fixes: 215378b838 ("RDMA/rtrs: client: sysfs interface functions")
Link: https://lore.kernel.org/r/20210528113018.52290-21-jinpu.wang@ionos.com
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-05-28 20:52:59 -03:00
..
ipoib IB/ipoib: Use DEVICE_ATTR_*() macros 2021-05-28 20:39:16 -03:00
iser RDMA/iser: struct iscsi_iser_task is declared twice 2021-03-30 19:53:08 -03:00
isert IB/isert: set rdma cm afonly flag 2021-05-28 20:24:52 -03:00
opa_vnic RDMA: Convert comma to semicolon 2021-01-07 13:53:41 -04:00
rtrs RDMA/rtrs-clt: Fix memory leak of not-freed sess->stats and stats->pcpu_stats 2021-05-28 20:52:59 -03:00
srp RDMA/srp: Use DEVICE_ATTR_*() macros 2021-05-28 20:40:29 -03:00
srpt IB/srpt: Remove redundant assignment to ret 2021-05-11 13:42:17 -03:00
Makefile RDMA/rtrs: include client and server modules into kernel compilation 2020-05-17 18:57:15 -03:00