efl - edje_cc - fix double close of embryo script fd's to tmp files

@fix

thanks to 김낙경 <nakkyong.kim@samsung.com> for pointing this out.
indeed fclose() closes the fd adopted by fdopen(). it doesn't dup it.
so we double-closed. it seems this never caused an issue until now.
this should fix it.
This commit is contained in:
Carsten Haitzler 2015-09-21 16:50:17 +09:00
parent 31b07f94b7
commit 76c854433f
1 changed files with 5 additions and 3 deletions

View File

@ -1701,7 +1701,6 @@ data_thread_script(void *data, Ecore_Thread *thread EINA_UNUSED)
return;
}
}
fclose(f);
if (no_save)
WRN("You are removing the source from this Edje file. This may break some use cases.\nBe aware of your choice and the poor kitten you are harming with it!");
@ -1725,13 +1724,16 @@ data_thread_script(void *data, Ecore_Thread *thread EINA_UNUSED)
strlen(cp->original) + 1, compress_mode);
}
}
fclose(f);
unlink(sc->tmpn);
unlink(sc->tmpo);
eina_tmpstr_del(sc->tmpn);
eina_tmpstr_del(sc->tmpo);
close(sc->tmpn_fd);
close(sc->tmpo_fd);
// closed by fclose(f) in create_script_file()
// close(sc->tmpn_fd);
// closed by fclose(f) above
// close(sc->tmpo_fd);
}
static void