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