[Xfce4-commits] [panel-plugins/xfce4-pulseaudio-plugin] 01/01: More memory leak improvements
noreply at xfce.org
noreply at xfce.org
Sun Dec 3 20:50:51 CET 2017
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-pulseaudio-plugin.
commit f22d7eed887607deb84faf9869b9bfd4b69d63af
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Dec 3 14:50:45 2017 -0500
More memory leak improvements
---
panel-plugin/pulseaudio-mpris.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/panel-plugin/pulseaudio-mpris.c b/panel-plugin/pulseaudio-mpris.c
index bebbcbe..eb20044 100644
--- a/panel-plugin/pulseaudio-mpris.c
+++ b/panel-plugin/pulseaudio-mpris.c
@@ -190,16 +190,14 @@ pulseaudio_mpris_tick_cb (gpointer user_data)
g_signal_connect (player, "playback-status", G_CALLBACK (pulseaudio_mpris_player_update_cb), mpris);
g_signal_connect (player, "metadata", G_CALLBACK (pulseaudio_mpris_player_metadata_cb), mpris);
- g_hash_table_insert (mpris->players, players[i], player);
+ g_hash_table_insert (mpris->players, g_strdup (players[i]), player);
pulseaudio_config_add_mpris_player (mpris->config, players[i]);
}
}
- /* TODO: Safely free this memory.
if (players != NULL)
g_strfreev (players);
- */
return TRUE;
}
@@ -393,7 +391,7 @@ pulseaudio_mpris_new (PulseaudioConfig *config)
mpris->config = config;
mpris->dbus_connection = gconnection;
- mpris->players = g_hash_table_new (g_str_hash, g_str_equal);
+ mpris->players = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)g_free, (GDestroyNotify)g_free);
mpris->player_timer_id = g_timeout_add_seconds (1, pulseaudio_mpris_tick_cb, mpris);
return mpris;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list