jeyzu pushed a commit to branch master.

commit c24bdf66df719093d9436cfeccd724eebb5d8a5d
Author: Jérémy Zurcher <[email protected]>
Date:   Tue Apr 23 10:55:31 2013 +0200

    mixer: prevent mem leak and let default card setup on empty module
    config
---
 src/modules/mixer/e_mod_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index 30b3458..c5a31da 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;

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr

Reply via email to