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 9d39e07be3b6319ca37741616389ec3ac69a0126
Author: Carsten Haitzler (Rasterman) <[email protected]>
AuthorDate: Fri Feb 13 15:24:18 2026 +0000

    status mon - handle file open fail
---
 src/shared/status_mon.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/shared/status_mon.c b/src/shared/status_mon.c
index faff996..1ad9acb 100644
--- a/src/shared/status_mon.c
+++ b/src/shared/status_mon.c
@@ -50,9 +50,23 @@ status_op_add(const char *path)
   Status_Op *so = calloc(1, sizeof(Status_Op));
 
   if (!so) return NULL;
-  so->path = eina_stringshare_add(path);
   so->file = fopen(so->path, "r");
+  if (!so->file)
+    {
+      free(so);
+      so = NULL;
+      goto done;
+    }
+  so->path = eina_stringshare_add(path);
+  if (!so->path)
+    {
+      fclose(so->file);
+      free(so);
+      so = NULL;
+      goto done;
+    }
   ops      = eina_list_append(ops, so);
+done:
   return so;
 }
 
@@ -222,4 +236,4 @@ status_mon_shutdown(void)
   mon = NULL;
   EINA_LIST_FREE(cbs, sc) free(sc);
   while (ops) status_op_del(ops->data);
-}
\ No newline at end of file
+}

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

Reply via email to