spa: alsa: fix some coverity warnings

NULL checks.

Change pa_x* malloc functions act like the pulseaudio ones: assert on
failure, as code assumes that.
This commit is contained in:
Pauli Virtanen 2025-06-14 13:54:23 +03:00
parent 7f2bdab8ea
commit 3539374ba7
4 changed files with 30 additions and 15 deletions

View file

@ -1741,7 +1741,7 @@ int pa_alsa_ucm_set_profile(pa_alsa_ucm_config *ucm, pa_card *card, pa_alsa_prof
ret = -1;
}
} else if (ucm->active_verb) {
} else if (ucm->active_verb && old_profile) {
/* Disable modifiers not in new profile. Has to be done before
* devices, because _dismod fails if a modifier's supported
* devices are disabled. */