Plug a memleak in builtin-revert