Revert memleak fix since it's causing failures on TravisCI