summaryrefslogtreecommitdiff
path: root/src/modules/mixer/e_mod_main.c
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-04-23 10:55:31 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2013-04-23 10:57:28 +0200
commitc24bdf66df719093d9436cfeccd724eebb5d8a5d (patch)
treee60ed982ab601854ebab1963abbbbbf74272748b /src/modules/mixer/e_mod_main.c
parentfb4d8b9f35d41903363851d2f262644befcb2daf (diff)
downloadenlightenment-c24bdf66df719093d9436cfeccd724eebb5d8a5d.tar.gz
mixer: prevent mem leak and let default card setup on empty module
config
Diffstat (limited to 'src/modules/mixer/e_mod_main.c')
-rw-r--r--src/modules/mixer/e_mod_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index 30b345800b..c5a31da68f 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -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;