summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2014-10-30 00:36:49 +0100
committerCedric BAIL <cedric@osg.samsung.com>2014-10-30 00:36:49 +0100
commit62fd3c0a9bf68fe750c24ce6b9516f8dddccf41b (patch)
treeb5abe8dd018813cb114434dcbd1a3bfff305b477 /src/bin
parent9a1ccdcdebec23f5f24e3b668316af34a116512f (diff)
edje: fix use of eina_tmpstr_del after eina_shutdown.
atexit could call eina_tmpstr_del after the shutdown of eina leading to the access of some random/garbage memory. @fix
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/edje/edje_cc_parse.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c
index cfefb45785..57ddc62ac9 100644
--- a/src/bin/edje/edje_cc_parse.c
+++ b/src/bin/edje/edje_cc_parse.c
@@ -851,14 +851,14 @@ parse(char *data, off_t size)
851 DBG("Parsing done"); 851 DBG("Parsing done");
852} 852}
853 853
854Eina_Tmpstr *clean_file = NULL; 854static char *clean_file = NULL;
855static void 855static void
856clean_tmp_file(void) 856clean_tmp_file(void)
857{ 857{
858 if (clean_file) 858 if (clean_file)
859 { 859 {
860 unlink(clean_file); 860 unlink(clean_file);
861 eina_tmpstr_del(clean_file); 861 free(clean_file);
862 } 862 }
863} 863}
864 864
@@ -929,7 +929,8 @@ compile(void)
929 int ret; 929 int ret;
930 char *def; 930 char *def;
931 931
932 clean_file = tmpn; 932 clean_file = strdup(tmpn);
933 eina_tmpstr_del(tmpn);
933 close(fd); 934 close(fd);
934 atexit(clean_tmp_file); 935 atexit(clean_tmp_file);
935 if (!defines) 936 if (!defines)