Fixed a small memory leak in PreferencesController and keychain access.