alsa: Check pa_modargs_get_value_boolean() retval for use_ucm
authorPeter Meerwald-Stadler <pmeerw@pmeerw.net>
Mon, 15 Aug 2016 21:11:50 +0000 (23:11 +0200)
committerPeter Meerwald-Stadler <pmeerw@pmeerw.net>
Mon, 15 Aug 2016 21:53:32 +0000 (23:53 +0200)
CID 1137983

src/modules/alsa/module-alsa-card.c

index d807a82..4f1236e 100644 (file)
@@ -741,7 +741,10 @@ 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;
+    }
 
     /* Force ALSA to reread its configuration. This matters if our device
      * was hot-plugged after ALSA has already read its configuration - see