target-mips: fix memory leak