fix possible memory leak, because key_get_tab return xstrdup (?)