debug data deallocation on error