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

@ -968,7 +968,7 @@ int spa_alsa_init(struct state *state, const struct spa_dict *info)
snd_config_update_free_global();
if ((str = spa_dict_lookup(info, "device.profile.pro")) != NULL)
if (info && (str = spa_dict_lookup(info, "device.profile.pro")) != NULL)
state->is_pro = spa_atob(str);
state->multi_rate = true;