Enlightenment CVS committal
Author : tsauerbeck
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_config
Modified Files:
edb.c
Log Message:
you allocate memory, you free it
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_config/edb.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- edb.c 25 May 2004 18:52:21 -0000 1.18
+++ edb.c 31 May 2004 15:54:04 -0000 1.19
@@ -178,6 +178,7 @@
Ecore_Config_Prop *next;
E_DB_File *db;
struct stat status;
+ char *tmp;
next = __ecore_config_bundle_local->data;
db = NULL;
@@ -209,13 +210,22 @@
e_db_float_set(db, next->key, ecore_config_float_get(next->key));
break;
case PT_RGB:
- e_db_str_set(db, next->key, ecore_config_rgbstr_get(next->key));
+ if ((tmp = ecore_config_rgbstr_get(next->key))) {
+ e_db_str_set(db, next->key, tmp);
+ free(tmp);
+ }
break;
case PT_STR:
- e_db_str_set(db, next->key, ecore_config_string_get(next->key));
+ if ((tmp = ecore_config_string_get(next->key))) {
+ e_db_str_set(db, next->key, tmp);
+ free(tmp);
+ }
break;
case PT_THM:
- e_db_str_set(db, next->key, ecore_config_theme_get(next->key));
+ if ((tmp = ecore_config_theme_get(next->key))) {
+ e_db_str_set(db, next->key, tmp);
+ free(tmp);
+ }
break;
case PT_NIL:
/* currently we do nothing for undefined ojects */
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs