Merge change 657 into donut

* changes:
  Fix a memory deallocation error that was crashing q2dm.