Skip to content

Commit 5f9562e

Browse files
HBh25Ydavem330
authored andcommitted
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: aced3ce ("RDS tcp loopback connection can hang") Signed-off-by: Hangyu Hua <[email protected]> Reviewed-by: Sharath Srinivasan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d971650 commit 5f9562e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/rds/connection.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ static struct rds_connection *__rds_conn_create(struct net *net,
253253
* should end up here, but if it
254254
* does, reset/destroy the connection.
255255
*/
256+
kfree(conn->c_path);
256257
kmem_cache_free(rds_conn_slab, conn);
257258
conn = ERR_PTR(-EOPNOTSUPP);
258259
goto out;

0 commit comments

Comments
 (0)