mixer: check for init() failures
When the init() method of a mixer plugin fails, mixer_new() dereferences the NULL pointer.
This commit is contained in:
parent
9ed409cdcc
commit
a547d24eb2
@ -47,7 +47,7 @@ mixer_new(const struct mixer_plugin *plugin, const struct config_param *param)
|
||||
|
||||
mixer = plugin->init(param);
|
||||
|
||||
assert(mixer->plugin == plugin);
|
||||
assert(mixer == NULL || mixer->plugin == plugin);
|
||||
|
||||
return mixer;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user