output/alsa: merge alsa_data_free() into destructor

This commit is contained in:
Max Kellermann 2012-03-21 18:51:31 +01:00
parent a29c64b6c7
commit 766905ba9f

View File

@ -111,13 +111,6 @@ alsa_data_new(void)
return ret;
}
static void
alsa_data_free(struct alsa_data *ad)
{
g_free(ad->device);
g_free(ad);
}
static void
alsa_configure(struct alsa_data *ad, const struct config_param *param)
{
@ -166,7 +159,9 @@ alsa_finish(struct audio_output *ao)
struct alsa_data *ad = (struct alsa_data *)ao;
ao_base_finish(&ad->base);
alsa_data_free(ad);
g_free(ad->device);
g_free(ad);
/* free libasound's config cache */
snd_config_update_free_global();