Changed free with delete for case when buffer is made to be passed forwa...

...rd to TMIn, but an error occurs before that is possible.