HomeFreeBSD

tcp: improve error handling in syncache_socket()

Description

tcp: improve error handling in syncache_socket()

If syncache_socket() fails after calling tcp_newtcpcb(), the resources
allocated in tcp_newtcpcb() needs to be freed. Just call
tcp_discardcb() to do this.
Thanks to jtl for making me aware of the issue and proposing a fix.
Reviewed by: glebius, jtl, rscheff
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D45749

Details

Provenance
tuexenAuthored on Thu, Jun 27, 5:25 AM
Reviewer
glebius
Differential Revision
D45749: tcp: fix cleanup when in_pcbconnect() fails in syncache_socket()
Parents
rG18a27dd64129: wpa_cli.8: describe better + tag spdx + linter nit
Branches
Unknown
Tags
Unknown