1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

better zero out allocated memory

This commit is contained in:
Phil Sutter 2009-09-14 02:07:45 +02:00
parent b7b9329e38
commit 7fa59c6c90

View File

@ -522,8 +522,7 @@ static struct sorted_process *malloc_sp(struct process *proc)
{
struct sorted_process *sp;
sp = malloc(sizeof(struct sorted_process));
sp->greater = NULL;
sp->less = NULL;
memset(sp, 0, sizeof(struct sorted_process));
sp->proc = proc;
return sp;
}