forked from enlightenment/enlightenment
mixer: prevent mem leak and let default card setup on empty module
config
This commit is contained in:
parent
fb4d8b9f35
commit
c24bdf66df
|
@ -785,7 +785,7 @@ _mixer_sys_setup(E_Mixer_Instance *inst)
|
|||
if (!conf->card)
|
||||
{
|
||||
ERR("conf->card in mixer sys setup is NULL");
|
||||
return 1;
|
||||
/* return 1; */
|
||||
}
|
||||
|
||||
if (inst->sys)
|
||||
|
@ -842,6 +842,8 @@ _mixer_sys_setup_default_card(E_Mixer_Instance *inst)
|
|||
if (!card)
|
||||
goto error;
|
||||
|
||||
if (inst->sys)
|
||||
e_mod_mixer_del(inst->sys);
|
||||
inst->sys = e_mod_mixer_new(card);
|
||||
if (!inst->sys)
|
||||
goto system_error;
|
||||
|
|
Loading…
Reference in New Issue