mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
rds: memory leak in __rds_conn_create()
[ Upstream commit5f9562ebe7] __rds_conn_create() did not release conn->c_path when loop_trans != 0 and trans->t_prefer_loopback != 0 and is_outgoing == 0. Fixes:aced3ce57c("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>
This commit is contained in:
parent
67f4362ae2
commit
74dc97dfb2
|
|
@ -253,6 +253,7 @@ static struct rds_connection *__rds_conn_create(struct net *net,
|
||||||
* should end up here, but if it
|
* should end up here, but if it
|
||||||
* does, reset/destroy the connection.
|
* does, reset/destroy the connection.
|
||||||
*/
|
*/
|
||||||
|
kfree(conn->c_path);
|
||||||
kmem_cache_free(rds_conn_slab, conn);
|
kmem_cache_free(rds_conn_slab, conn);
|
||||||
conn = ERR_PTR(-EOPNOTSUPP);
|
conn = ERR_PTR(-EOPNOTSUPP);
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user