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 c4a1be589f04f1a018cb4a0a8c025634f8428388
Author: Carsten Haitzler (Rasterman) <[email protected]>
AuthorDate: Tue Feb 10 11:58:19 2026 +0000

    meta - handle possible alloc fails
---
 src/backends/default/meta.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/backends/default/meta.c b/src/backends/default/meta.c
index cf148e3..e9ba1cd 100644
--- a/src/backends/default/meta.c
+++ b/src/backends/default/meta.c
@@ -206,7 +206,7 @@ merge_again:
             }
         }
       meta_path_tmp = malloc(strlen(meta_path) + 7 + 1);
-      // XXX: malloc fails?
+      if (!meta_path_tmp) goto err;
       strcpy(meta_path_tmp, meta_path);
       strcat(meta_path_tmp, ".XXXXXX");
       tmpfd = mkstemp(meta_path_tmp);
@@ -226,7 +226,7 @@ merge_again:
           free(dir);
           dir           = NULL;
           meta_path_tmp = malloc(strlen(meta_path) + 7 + 1);
-          // XXX: malloc fails?
+          if (!meta_path_tmp) goto err;
           strcpy(meta_path_tmp, meta_path);
           strcat(meta_path_tmp, ".XXXXXX");
           tmpfd = mkstemp(meta_path_tmp);
@@ -244,6 +244,7 @@ merge_again:
         m->changed = EINA_FALSE;
       }
       fclose(f);
+      f = NULL;
       mt2 = util_file_modtime_get(meta_path);
       if (((util_modtime_valid(mt2)) && (util_modtime_valid(mt))
            && (util_modtime_cmp(mt2, mt) != 0))
@@ -260,6 +261,7 @@ merge_again:
   else // no meta keys - delete it
     ecore_file_unlink(meta_path);
 err:
+  if (f) fclose(f);
   free(meta_path_tmp);
   free(meta_path);
   free(dir);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to