unarr: fix typo
fix potential memory leak