diff options
author | Michal Ratajsky <[email protected]> | 2014-08-21 17:11:44 +0200 |
---|---|---|
committer | Michal Ratajsky <[email protected]> | 2014-08-21 17:11:44 +0200 |
commit | b6955dd78085d642f10325ec6d929e7421224d74 (patch) | |
tree | 13b0ef3242b87ba6343316d30159680e77fc4a26 /backends/alsa | |
parent | 3a99c51bb0bcba28d0d38bbed937c2071d9666b2 (diff) | |
download | libmatemixer-b6955dd78085d642f10325ec6d929e7421224d74.tar.bz2 libmatemixer-b6955dd78085d642f10325ec6d929e7421224d74.tar.xz |
Fix memory problems in ALSA and MateMixerToggle and rename toggle option properties
Diffstat (limited to 'backends/alsa')
-rw-r--r-- | backends/alsa/alsa-backend.c | 10 | ||||
-rw-r--r-- | backends/alsa/alsa-device.c | 2 | ||||
-rw-r--r-- | backends/alsa/alsa-toggle.c | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/backends/alsa/alsa-backend.c b/backends/alsa/alsa-backend.c index 6bac691..2493d45 100644 --- a/backends/alsa/alsa-backend.c +++ b/backends/alsa/alsa-backend.c @@ -363,10 +363,12 @@ read_device (AlsaBackend *alsa, const gchar *card) static void add_device (AlsaBackend *alsa, AlsaDevice *device) { - alsa->priv->devices = g_list_insert_sorted_with_data (alsa->priv->devices, - device, - (GCompareDataFunc) compare_devices, - NULL); + /* Takes reference of device */ + alsa->priv->devices = + g_list_insert_sorted_with_data (alsa->priv->devices, + device, + (GCompareDataFunc) compare_devices, + NULL); /* Keep track of device identifiers */ g_hash_table_add (alsa->priv->devices_ids, g_strdup (ALSA_DEVICE_GET_ID (device))); diff --git a/backends/alsa/alsa-device.c b/backends/alsa/alsa-device.c index f7f705e..03dd7c0 100644 --- a/backends/alsa/alsa-device.c +++ b/backends/alsa/alsa-device.c @@ -230,7 +230,7 @@ alsa_device_finalize (GObject *object) close_mixer (device); - G_OBJECT_CLASS (alsa_device_parent_class)->dispose (object); + G_OBJECT_CLASS (alsa_device_parent_class)->finalize (object); } AlsaDevice * diff --git a/backends/alsa/alsa-toggle.c b/backends/alsa/alsa-toggle.c index a7958c9..c843985 100644 --- a/backends/alsa/alsa-toggle.c +++ b/backends/alsa/alsa-toggle.c @@ -92,8 +92,8 @@ alsa_toggle_new (const gchar *name, "label", label, "flags", MATE_MIXER_SWITCH_TOGGLE, "role", role, - "state-option-on", on, - "state-option-off", off, + "on-state-option", on, + "off-state-option", off, NULL); toggle->priv->type = type; |