Fix some double-frees/use-after-free

r? @frank-trampe
I am aware that low-level code uses gotos and even stack-rewriting, context-switching blocks of assembly (and indeed I needed to write one once), but, in higher level code, the breaking of the nested model makes it more difficult to write good code, particularly when each block layer needs trailing clean-up. A destroy + null doesn't take up much more space (7 characters) than a goto in this case.