Page MenuHomeFreeBSD

tcp: fix cleanup when in_pcbconnect() fails in syncache_socket()
ClosedPublic

Authored by tuexen on Jun 26 2024, 7:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 3, 8:17 PM
Unknown Object (File)
Sat, Oct 3, 3:35 PM
Unknown Object (File)
Sat, Oct 3, 12:40 AM
Unknown Object (File)
Fri, Sep 11, 8:42 AM
Unknown Object (File)
Sep 2 2026, 4:09 PM
Unknown Object (File)
Aug 28 2026, 1:40 PM
Unknown Object (File)
Aug 27 2026, 11:39 AM
Unknown Object (File)
Aug 25 2026, 6:54 PM
Subscribers

Details

Summary

If syncache_socket() fails after calling tcp_newtcpcb(), the resources allocated during
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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable