This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository efm2.
View the commit online.
commit 42d8f1bd27b8d8ac0484dd715b2f303c3a820b25
Author: Carsten Haitzler (Rasterman) <[email protected]>
AuthorDate: Tue Feb 10 20:01:29 2026 +0000
meta - ensure fd for meta file is closed
---
src/backends/default/meta.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/backends/default/meta.c b/src/backends/default/meta.c
index e9ba1cd..f7fb4b6 100644
--- a/src/backends/default/meta.c
+++ b/src/backends/default/meta.c
@@ -155,7 +155,7 @@ _meta_file_write(Meta_File *mf)
Meta *m;
FILE *f = NULL;
char *meta_path = NULL, *meta_path_tmp = NULL, *dir = NULL;
- int tmpfd;
+ int tmpfd = -1;
if (!mf->changed) return;
mf->changed = EINA_FALSE;
@@ -214,6 +214,7 @@ merge_again:
if (!f)
{ // can't write to dir - write to personal meta instead
if (tmpfd >= 0) close(tmpfd);
+ tmpfd = -1;
free(meta_path);
meta_path = NULL;
free(meta_path_tmp);
@@ -231,11 +232,7 @@ merge_again:
strcat(meta_path_tmp, ".XXXXXX");
tmpfd = mkstemp(meta_path_tmp);
if (tmpfd >= 0) f = fdopen(tmpfd, "w");
- if (!f)
- {
- if (tmpfd >= 0) close(tmpfd);
- goto err;
- }
+ if (!f) goto err;
}
fprintf(f, "[Efm Meta]\n");
EINA_LIST_FOREACH(mf->list, l, m)
@@ -245,6 +242,8 @@ merge_again:
}
fclose(f);
f = NULL;
+ if (tmpfd >= 0) close(tmpfd);
+ tmpfd = -1;
mt2 = util_file_modtime_get(meta_path);
if (((util_modtime_valid(mt2)) && (util_modtime_valid(mt))
&& (util_modtime_cmp(mt2, mt) != 0))
@@ -262,6 +261,7 @@ merge_again:
ecore_file_unlink(meta_path);
err:
if (f) fclose(f);
+ if (tmpfd >= 0) close(tmpfd);
free(meta_path_tmp);
free(meta_path);
free(dir);
@@ -708,4 +708,4 @@ meta_file_save(Meta_File *mf)
{
_meta_writes = eina_list_remove(_meta_writes, mf);
_meta_file_write(mf);
-}
\ No newline at end of file
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.