]> git.alsa-project.org Git - alsa-lib.git/commit
ucm: simplify and fix the previous patch (geti)
authorJaroslav Kysela <perex@perex.cz>
Sun, 15 Jan 2023 17:32:20 +0000 (18:32 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 15 Jan 2023 17:37:40 +0000 (18:37 +0100)
commitc083417b723a3485657234a21da3264419da1411
tree23f3c38835d06a74e0ed2bfc366a5e1577a3c16b
parent436cd5b6d01edf7aedd58c209dc0d3b9adb111c6
ucm: simplify and fix the previous patch (geti)

Use macro to maintain only one code. The status may be 0 or 1 - handle
both values correctly.

Also, fix the possible memory leak in snd_use_case_geti() - string
str should be freed even when the error is returned.

Fixes: 436cd5b6 ("ucm: add existence checks to geti calls")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/main.c