Fix gosec bounds in the byte swizzle, drop the now-unused releaseCapture, and make the SSH and approval-reuse tests actually exercise their paths

This commit is contained in:
Viktor Liu
2026-09-22 21:03:30 +02:00
parent 65bb3ae4f5
commit 8f06a43d93
4 changed files with 17 additions and 16 deletions
-10
View File
@@ -370,16 +370,6 @@ func (s *Server) evictActiveCaptureLocked() func() {
}
}
// releaseCapture clears the active-capture owner if it still matches sess.
func (s *Server) releaseCapture(sess *capture.Session) {
s.mutex.Lock()
defer s.mutex.Unlock()
if s.activeCapture == sess {
s.activeCapture = nil
s.activeCaptureCancel = nil
}
}
// clearCaptureIfOwner clears engine's capture slot only if sess still owns it.
func (s *Server) clearCaptureIfOwner(sess *capture.Session, engine *internal.Engine) {
s.mutex.Lock()