Page MenuHomeFreeBSD

tests/tcp_hpts_test: Fix resource leaks
ClosedPublic

Authored by markj on Apr 26 2026, 3:07 PM.
Tags
None
Referenced Files
F176118127: D56647.diff
Fri, Oct 16, 6:26 AM
Unknown Object (File)
Tue, Oct 13, 5:20 PM
Unknown Object (File)
Tue, Oct 13, 4:45 PM
Unknown Object (File)
Mon, Oct 12, 9:15 AM
Unknown Object (File)
Sun, Oct 11, 4:58 PM
Unknown Object (File)
Sun, Oct 11, 4:56 PM
Unknown Object (File)
Sun, Oct 11, 4:23 PM
Unknown Object (File)
Wed, Oct 7, 10:30 PM

Details

Summary

When a KTEST_EQUAL assertion fails, the test function returns, but this
can cause it to leak locks. Add a variant which causes control flow to
jump to a label in case of failure, and use that to prevent this
problem.

Diff Detail

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