alsa: free the strdup'd substring on error

n is the return value of pa_split()

Found by scan-build
This commit is contained in:
Peter Hutterer 2021-05-12 15:48:00 +10:00 committed by Wim Taymans
parent bc64b32798
commit e83f039833

View file

@ -2553,6 +2553,7 @@ static int element_parse_override_map(pa_config_parser_state *state) {
if (i >= (unsigned)channel_count) {
pa_log("[%s:%u] Invalid override map size (>%d) in '%s'", state->filename, state->lineno, channel_count, state->section);
pa_xfree(n);
return -1;
}
channel_position = alsa_channel_positions[i];