procmon: fixed leak reading proc's environ vars

This commit is contained in:
Gustavo Iñiguez Goia 2023-12-17 23:29:27 +01:00
parent 94492f0a71
commit 290ed40e8d
Failed to generate hash of commit

View file

@ -169,7 +169,9 @@ func (p *Process) ReadEnv() {
if parts != nil && len(parts) == 2 {
key := core.Trim(parts[0])
val := core.Trim(parts[1])
p.mu.Lock()
p.Env[key] = val
p.mu.Unlock()
}
}
}