From d794af65e97822a29945a21c1cd2a21ea3b8e6b8 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Tue, 18 Mar 2014 23:07:19 +0100 Subject: [PATCH] route: Return NULL in case of zero found channels in determine_chmap This should fix the problem where the old route syntax can no longer be opened. Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai --- src/pcm/pcm_route.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c index ac11bdc8..a9097caa 100644 --- a/src/pcm/pcm_route.c +++ b/src/pcm/pcm_route.c @@ -883,7 +883,10 @@ static int determine_chmap(snd_config_t *tt, snd_pcm_chmap_t **tt_chmap) } } - + if (chmap->channels == 0) { + free(chmap); + chmap = NULL; + } *tt_chmap = chmap; return 0; -- 2.47.1