rds: tcp: cleanup if kmem_cache_alloc fails in rds_tcp_conn_alloc()
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Fri, 22 Dec 2017 17:39:01 +0000 (09:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Dec 2017 18:37:27 +0000 (13:37 -0500)
commit66261da169263f90c431741886b90b0982dda981
treead18de18bd14bf8b173a5f5ee48b53ee3c8c4a39
parentb319109396d6ddf1587a54e33f89fd3bea7c66db
rds: tcp: cleanup if kmem_cache_alloc fails in rds_tcp_conn_alloc()

If kmem_cache_alloc() fails in the middle of the for() loop,
cleanup anything that might have been allocated so far.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/tcp.c