[tor-commits] [tor/master] lock: Avoid some undefined behaviour when freeing mutexes.