Revert a memleak fix in a506c7f