summaryrefslogtreecommitdiff
path: root/backends/alsa/alsa-backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/alsa/alsa-backend.c')
-rw-r--r--backends/alsa/alsa-backend.c10
1 files changed, 6 insertions, 4 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)));