[pulseaudio-discuss] [PATCH v2 12/12] alsa: Check pa_modargs_get_value_boolean() retval for use_ucm

Peter Meerwald pmeerw at pmeerw.net
Tue Sep 15 15:01:50 PDT 2015


CID 1137983
---
 src/modules/alsa/module-alsa-card.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
index df4f848..2116eab 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
@@ -664,7 +664,11 @@ int pa__init(pa_module *m) {
         }
     }
 
-    pa_modargs_get_value_boolean(u->modargs, "use_ucm", &u->use_ucm);
+    if (pa_modargs_get_value_boolean(u->modargs, "use_ucm", &u->use_ucm) < 0) {
+        pa_log("Failed to parse use_ucm argument.");
+        goto fail;
+    }
+
     if (u->use_ucm && !pa_alsa_ucm_query_profiles(&u->ucm, u->alsa_card_index)) {
         pa_log_info("Found UCM profiles");
 
-- 
1.9.1



More information about the pulseaudio-discuss mailing list