Yeah... exit() kills everything right there... like a flu excuse on a global financial system.
How one terminates is like a box of chocolates... sometimes it works out ok, sometimes it sux. The best place to have exit() is evidently where one knows nothing further will or can ever happen afterwards (saves a hiccup like mine when one comes to insert more code further down the execution chain, a long time after one's forgotten about the code in the preceding flow). I suspect (without having looked into the fine details) the very last return will also end up destroying everything anyway (?).