]> git.alsa-project.org Git - alsa-lib.git/commit
ucm: Return NULL from get_list0() and get_list20() in case of empty lists.
authorTanu Kaskinen <tanu.kaskinen@digia.com>
Wed, 1 Aug 2012 13:06:16 +0000 (16:06 +0300)
committerTakashi Iwai <tiwai@suse.de>
Wed, 1 Aug 2012 13:47:27 +0000 (15:47 +0200)
commite16a9a04b190c1c7981d9c65c08c504b9a23fe37
tree706559710f49cf528bb7137ac0148646c8b93b91
parent480d3204fea75021d10132fcd2b54b7476d6cb0e
ucm: Return NULL from get_list0() and get_list20() in case of empty lists.

alloc_str_list() sets the result to NULL too, so this patch
makes the behavior more consistent. This also fixes a crash
in PulseAudio, because PulseAudio assumes that
snd_use_case_get_list() always initializes the result, and
since snd_use_case_get_list() uses get_list20(), this
assumption didn't hold.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/ucm/main.c