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)
Tue, Nov 18, 6:52 AM
Unknown Object (File)
Sun, Nov 16, 11:54 AM
Unknown Object (File)
Sat, Nov 15, 6:26 AM
Unknown Object (File)
Nov 6 2025, 6:50 AM
Unknown Object (File)
Nov 5 2025, 6:53 AM
Unknown Object (File)
Nov 4 2025, 8:10 AM
Unknown Object (File)
Nov 4 2025, 7:17 AM
Unknown Object (File)
Nov 4 2025, 5:19 AM
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 Skipped
Unit
Tests Skipped