Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not return from c.stop() before re-locking
Unlocking an already unlocked lock is a panic. As such, we have to make sure that the deferred c.lock.Unlock() in c.StopWithTimeout() always runs on a locked container. There was a case in c.stop() where we could return an error after we unlock the container to stop it, but before we re-lock it - thus allowing for a double-unlock to occur. Fix the error return to not happen until after the lock has been re-acquired. Fixes containers#9615 Signed-off-by: Matthew Heon <[email protected]>
- Loading branch information