Enlightenment CVS committal

Author  : moom
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/lib


Modified Files:
        etk_config.c 


Log Message:
Patch from drexil:
 - Fix a mem leak in Etk_Config
 - Fix some warnings


===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_config.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- etk_config.c        31 Aug 2006 17:33:58 -0000      1.1
+++ etk_config.c        8 Oct 2006 10:11:59 -0000       1.2
@@ -139,6 +139,18 @@
 {
    FREED(_etk_config_gen_edd);
    FREED(_etk_config_ver_edd);   
+   if (_etk_config)
+   {
+      free(_etk_config->version);
+      if (_etk_config->general);
+      {
+         free(_etk_config->general->widget_theme);
+         free(_etk_config->general->font);
+         free(_etk_config->general->engine);
+         free(_etk_config->general);
+      }
+      free(_etk_config);
+   }
 }
 
 /**
@@ -206,9 +218,11 @@
          {
             ETK_WARNING("Your version / configuration of Etk is not valid!");
             eet_close(ef);
+            free(v);
             _etk_config_defaults_apply();
             return ETK_FALSE;
          }
+       free(v);
      }
    
    _etk_config->general = eet_data_read(ef, _etk_config_gen_edd, 
"config/general");



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to