Fixed a couple of memory leaks in trace.t