Fix some leaks reported by Analyze.