From 17c8ec848438a09ffce0fec1db6eaf84b7b3ba7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20I=C3=B1iguez=20Goia?= Date: Wed, 6 Dec 2023 00:12:41 +0100 Subject: [PATCH] fixed leak getting proc parents --- daemon/procmon/details.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/procmon/details.go b/daemon/procmon/details.go index eba4398f..600a78fe 100644 --- a/daemon/procmon/details.go +++ b/daemon/procmon/details.go @@ -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