diff options
author | Hangyu Hua <hbh25y@gmail.com> | 2021-12-14 18:46:59 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-22 09:19:01 +0100 |
commit | 1ed173726c1a0082e9d77c7d5a85411e85bdd983 (patch) | |
tree | f2ddf9c4e600850633cfa986ee8e756b33d7bce7 | |
parent | 109627a6d54d2e44d7bbdb6c73be345cbd32511f (diff) | |
download | linux-stable-1ed173726c1a0082e9d77c7d5a85411e85bdd983.tar.gz linux-stable-1ed173726c1a0082e9d77c7d5a85411e85bdd983.tar.bz2 linux-stable-1ed173726c1a0082e9d77c7d5a85411e85bdd983.zip |
rds: memory leak in __rds_conn_create()
[ Upstream commit 5f9562ebe710c307adc5f666bf1a2162ee7977c0 ]
__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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | net/rds/connection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c index ac3300b204a6..af9f7d184003 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c @@ -250,6 +250,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; |