skins: Fix use-after-free error