diff options
author | Bastien Nocera <hadess@hadess.net> | 2017-04-06 14:34:51 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-04-06 14:34:51 +0200 |
commit | d52194fce13f4b477afc997ff752233aa6886cbf (patch) | |
tree | 04f48cb4d7d9f061a04162a8a36451122c855485 /gvc-mixer-control.c | |
parent | 25bf3ed75fa604fa73e8b25241119a993fc659d6 (diff) | |
download | libgnome-volume-control-d52194fce13f4b477afc997ff752233aa6886cbf.tar.gz |
mixer-control: Fix extra reference being leaked
In both cases objects are inserted in hash table by adding an
extra ref, but the existing reference was never removed. Don't
add a reference instead, so we don't end up with a spare one.
Based on patch by Alberts Muktupāvels <alberts.muktupavels@gmail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=765694
Diffstat (limited to 'gvc-mixer-control.c')
-rw-r--r-- | gvc-mixer-control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gvc-mixer-control.c b/gvc-mixer-control.c index 760b05d..7b49456 100644 --- a/gvc-mixer-control.c +++ b/gvc-mixer-control.c @@ -1955,7 +1955,7 @@ create_ui_device_from_port (GvcMixerControl* control, g_hash_table_insert (is_card_port_an_output (port) ? control->priv->ui_outputs : control->priv->ui_inputs, GUINT_TO_POINTER (gvc_mixer_ui_device_get_id (uidevice)), - g_object_ref (uidevice)); + uidevice); if (available) { @@ -2478,7 +2478,7 @@ update_card (GvcMixerControl *control, if (is_new) { g_hash_table_insert (control->priv->cards, GUINT_TO_POINTER (info->index), - g_object_ref (card)); + card); } card_ports = gvc_mixer_card_get_ports (card); |