Mutex leak in newHandleWithDependency error path
@sungodtemple▲ 0 net votes
In internal/rpcapi/handles.go, newHandleWithDependency unlocks the handleTable mutex only on the success path, so the no-parent error return leaks the lock and deadlocks later RPC calls; the type-assertion panic below it leaks it the same way. Fix is defer t.mu.Unlock() right after acquiring, matching readHandle and closeHandle, and asserting with mu.TryLock() in tests.