pidgin/pidgin

Stop saving notification setting on unload

2 months ago, Elliott Sales de Andrade
c834b06188c1
Parents 81ef32d85e5a
Children 5365cc421c7a
Stop saving notification setting on unload

When libpurple is shutting down, the settings backend is gone before the plugins (and maybe this should be fixed elsewhere), so all the saved settings leak as they attempt to write to a `NULL` settings object.

All places in this plugin that change the settings then save them, so there's no need to save on unload.

Testing Done:
Ran in valgrind with the plugin enabled, and there were no longer any leaks of settings values from unload at exit.

Reviewed at https://reviews.imfreedom.org/r/3024/
--- a/libpurple/plugins/notification-sound/notification-sound.c Tue Mar 12 02:16:52 2024 -0500
+++ b/libpurple/plugins/notification-sound/notification-sound.c Tue Mar 12 02:21:44 2024 -0500
@@ -293,8 +293,6 @@
{
purple_signals_disconnect_by_handle(plugin);
- purple_notification_sound_save_prefs();
-
g_clear_pointer(&context, ca_context_destroy);
g_clear_pointer(&mute_until, g_date_time_unref);