Try to improve sanity of control flow

The wacky memory management before the cleanup label makes this
more annoying than it should be.