summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorHangyu Hua <hbh25y@gmail.com>2021-12-14 18:46:59 +0800
committerDavid S. Miller <davem@davemloft.net>2021-12-14 12:51:52 +0000
commit5f9562ebe710c307adc5f666bf1a2162ee7977c0 (patch)
tree6daeaf3e8bbad3ded46a2b797e9c946b4f76e5b9 /net
parentd971650e17a985a0275b20f04fa67b62b4944897 (diff)
rds: memory leak in __rds_conn_create()
__rds_conn_create() did not release conn->c_path when loop_trans != 0 and trans->t_prefer_loopback != 0 and is_outgoing == 0. Fixes: aced3ce57cd3 ("RDS tcp loopback connection can hang") Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Reviewed-by: Sharath Srinivasan <sharath.srinivasan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/rds/connection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index a3bc4b54d491..b4cc699c5fad 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -253,6 +253,7 @@ static struct rds_connection *__rds_conn_create(struct net *net,
* should end up here, but if it
* does, reset/destroy the connection.
*/
+ kfree(conn->c_path);
kmem_cache_free(rds_conn_slab, conn);
conn = ERR_PTR(-EOPNOTSUPP);
goto out;