summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio_route/audio_route.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/audio_route/audio_route.c b/audio_route/audio_route.c
index 029951c..c14cbf9 100644
--- a/audio_route/audio_route.c
+++ b/audio_route/audio_route.c
@@ -493,8 +493,12 @@ static int alloc_mixer_state(struct audio_route *ar)
/* Skip unsupported types that are not supported yet in XML */
type = mixer_ctl_get_type(ctl);
- if (!is_supported_ctl_type(type))
+ if (!is_supported_ctl_type(type)) {
+ ar->mixer_state[i].old_value = NULL;
+ ar->mixer_state[i].new_value = NULL;
+ ar->mixer_state[i].reset_value = NULL;
continue;
+ }
ar->mixer_state[i].old_value = malloc(num_values * sizeof(int));
ar->mixer_state[i].new_value = malloc(num_values * sizeof(int));