tomoyo: fix potential use after free