forked from enlightenment/efl
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:
parent
31b07f94b7
commit
76c854433f
|
@ -1701,7 +1701,6 @@ data_thread_script(void *data, Ecore_Thread *thread EINA_UNUSED)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(f);
|
|
||||||
|
|
||||||
if (no_save)
|
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!");
|
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);
|
strlen(cp->original) + 1, compress_mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
unlink(sc->tmpn);
|
unlink(sc->tmpn);
|
||||||
unlink(sc->tmpo);
|
unlink(sc->tmpo);
|
||||||
eina_tmpstr_del(sc->tmpn);
|
eina_tmpstr_del(sc->tmpn);
|
||||||
eina_tmpstr_del(sc->tmpo);
|
eina_tmpstr_del(sc->tmpo);
|
||||||
close(sc->tmpn_fd);
|
// closed by fclose(f) in create_script_file()
|
||||||
close(sc->tmpo_fd);
|
// close(sc->tmpn_fd);
|
||||||
|
// closed by fclose(f) above
|
||||||
|
// close(sc->tmpo_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue