Skip to content

Commit

Permalink
fixed leak getting proc parents
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-iniguez-goya committed Dec 5, 2023
1 parent 430c280 commit 17c8ec8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions daemon/procmon/details.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 17c8ec8

Please sign in to comment.