diff options
author | Max Kellermann <max@duempel.org> | 2012-03-21 18:51:31 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-03-21 18:58:11 +0100 |
commit | 766905ba9f211ec5b769fce160f2ed5ed2253b46 (patch) | |
tree | 579f0de91a4ab954f9579ebfb80b6f0b1d560781 | |
parent | a29c64b6c76a115ce84dc7be482f18b6e98f30be (diff) | |
download | mpd-766905ba9f211ec5b769fce160f2ed5ed2253b46.tar.gz mpd-766905ba9f211ec5b769fce160f2ed5ed2253b46.tar.xz mpd-766905ba9f211ec5b769fce160f2ed5ed2253b46.zip |
output/alsa: merge alsa_data_free() into destructor
-rw-r--r-- | src/output/alsa_output_plugin.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/output/alsa_output_plugin.c b/src/output/alsa_output_plugin.c index adfbc9f0d..35bea3ce5 100644 --- a/src/output/alsa_output_plugin.c +++ b/src/output/alsa_output_plugin.c @@ -112,13 +112,6 @@ alsa_data_new(void) } 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) { ad->device = config_dup_block_string(param, "device", NULL); @@ -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(); |