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:
parent
b7b9329e38
commit
7fa59c6c90
@ -522,8 +522,7 @@ static struct sorted_process *malloc_sp(struct process *proc)
|
|||||||
{
|
{
|
||||||
struct sorted_process *sp;
|
struct sorted_process *sp;
|
||||||
sp = malloc(sizeof(struct sorted_process));
|
sp = malloc(sizeof(struct sorted_process));
|
||||||
sp->greater = NULL;
|
memset(sp, 0, sizeof(struct sorted_process));
|
||||||
sp->less = NULL;
|
|
||||||
sp->proc = proc;
|
sp->proc = proc;
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user