Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hangyu Hua and committed by
David S. Miller
5f9562eb d971650e

+1
+1
net/rds/connection.c
··· 253 253 * should end up here, but if it 254 254 * does, reset/destroy the connection. 255 255 */ 256 + kfree(conn->c_path); 256 257 kmem_cache_free(rds_conn_slab, conn); 257 258 conn = ERR_PTR(-EOPNOTSUPP); 258 259 goto out;