fix space leak in recordShutdown

There are perhaps nicer ways to fix this, such as changing shutdown to be just a timestamp (and possibly adding a 'finalized' field), but this seems the least-intrusive fix.