Changed free with delete for case when buffer is made to be passed forward to TMIn, but an error occurs before that is possible.