Fix some leaks.