Cleanup label.

Use conditional free on allocated resources so we always exit
gracefully.