Commit a547d24e authored by Max Kellermann's avatar Max Kellermann

mixer: check for init() failures

When the init() method of a mixer plugin fails, mixer_new() dereferences the NULL pointer.
parent 9ed409cd
...@@ -47,7 +47,7 @@ mixer_new(const struct mixer_plugin *plugin, const struct config_param *param) ...@@ -47,7 +47,7 @@ mixer_new(const struct mixer_plugin *plugin, const struct config_param *param)
mixer = plugin->init(param); mixer = plugin->init(param);
assert(mixer->plugin == plugin); assert(mixer == NULL || mixer->plugin == plugin);
return mixer; return mixer;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment