Skip to content

Commit

Permalink
koordlet: fix memory leak in perfGroup (#1828)
Browse files Browse the repository at this point in the history
Signed-off-by: bowen-intel <bowen.song@intel.com>
  • Loading branch information
bowen-intel committed Jan 11, 2024
1 parent a73557b commit 7c7a844
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/koordlet/util/perf_group/perf_group_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ func (p *perfCollector) collect(ch chan perfValue) error {

for i := 0; i < int(header.Nr); i++ {
v := perfValuePool.Get().(*value)
defer perfValuePool.Put(v)
value := &perfValue{}
if err := binary.Read(reader, binary.LittleEndian, v); err != nil {
return err
Expand Down

0 comments on commit 7c7a844

Please sign in to comment.