netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=d11ea1b84c569eb51ebc98f22bf2d2529a6dfcc5

commit d11ea1b84c569eb51ebc98f22bf2d2529a6dfcc5
Author: Alastair Poole <[email protected]>
Date:   Sun Mar 22 13:44:48 2020 +0000

    0.3.1: Fix OpenBSD Bug.
---
 NEWS              | 6 ++++++
 VERSION           | 2 +-
 src/bin/process.c | 4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 3bd2b98..94f6261 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+============
+Evisum 0.3.1
+============
+
+   * Fix OpenBSD process init.
+
 ============
 Evisum 0.3.0
 ============
diff --git a/VERSION b/VERSION
index 0d91a54..9e11b32 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.3.0
+0.3.1
diff --git a/src/bin/process.c b/src/bin/process.c
index a69bce9..6039754 100644
--- a/src/bin/process.c
+++ b/src/bin/process.c
@@ -333,7 +333,7 @@ proc_info_by_pid(int pid)
    if (count == 0) return NULL;
    pagesize = getpagesize();
 
-   Proc_Stats *p = malloc(sizeof(Proc_Stats));
+   Proc_Stats *p = calloc(1, sizeof(Proc_Stats));
    if (!p) return NULL;
 
    p->pid = kp->p_pid;
@@ -381,7 +381,7 @@ _process_list_openbsd_get(void)
 
    for (int i = 0; i < pid_count; i++)
      {
-        p = malloc(sizeof(Proc_Stats));
+        p = calloc(1, sizeof(Proc_Stats));
         if (!p) return NULL;
 
         p->pid = kp[i].p_pid;

-- 


Reply via email to