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
This commit is contained in:
Cedric BAIL 2014-10-30 00:36:49 +01:00
parent 9a1ccdcdeb
commit 62fd3c0a9b
1 changed files with 4 additions and 3 deletions

View File

@ -851,14 +851,14 @@ parse(char *data, off_t size)
DBG("Parsing done");
}
Eina_Tmpstr *clean_file = NULL;
static char *clean_file = NULL;
static void
clean_tmp_file(void)
{
if (clean_file)
{
unlink(clean_file);
eina_tmpstr_del(clean_file);
free(clean_file);
}
}
@ -929,7 +929,8 @@ compile(void)
int ret;
char *def;
clean_file = tmpn;
clean_file = strdup(tmpn);
eina_tmpstr_del(tmpn);
close(fd);
atexit(clean_tmp_file);
if (!defines)