Skip to content

Commit

Permalink
packetbeat/beater: help the GC clean up the Npcap installer if it's n…
Browse files Browse the repository at this point in the history
…ot used

The installer bytes are released in the install case but this was accidentally
removed in elastic#30048. This frees ~1MB of runtime memory after start up has been
completed.
  • Loading branch information
efd6 committed Feb 22, 2022
1 parent d74e7aa commit 90dfa59
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packetbeat/beater/install_npcap.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func installNpcap(b *beat.Beat) error {
}
}()
if !npcap.Upgradeable() {
npcap.Installer = nil
return nil
}

Expand Down

0 comments on commit 90dfa59

Please sign in to comment.