mptcp: deduplicate error paths on endpoint creation
authorPaolo Abeni <pabeni@redhat.com>
Fri, 18 Nov 2022 18:46:07 +0000 (10:46 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Nov 2022 13:09:07 +0000 (13:09 +0000)
commit976d302fb6165ad620778d7ba834cde6e3fe9f9f
tree6d9ea0a1778c0563e31f57fffeb91a2cecffcaa8
parent7a7160edf1bfde25422262fb26851cef65f695d3
mptcp: deduplicate error paths on endpoint creation

When endpoint creation fails, we need to free the newly allocated
entry and eventually destroy the paired mptcp listener socket.

Consolidate such action in a single point let all the errors path
reach it.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/pm_netlink.c