fixed leak getting proc parents

This commit is contained in:
Gustavo Iñiguez Goia 2023-12-06 00:12:41 +01:00
parent 430c280687
commit 17c8ec8484
Failed to generate hash of commit

View file

@ -50,7 +50,9 @@ func (p *Process) GetParent() {
// TODO: see how we can reuse this object and the ppid, to save some iterations.
// right now it opens the can of leaks.
p.mu.Lock()
p.Parent = NewProcessEmpty(ppid, "")
p.mu.Unlock()
p.Parent.ReadPath()
// get process tree