Fix potential memory leak when using margtime and tempramental waveforms
If the waveform generation fails in a known way, then remember to free any buffers allocated for margtime operations.
If the waveform generation fails in a known way, then remember to free any buffers allocated for margtime operations.