xmb: Fix a potential memleak