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 (#30513)

The installer bytes are released in the install case but this was accidentally
removed in #30048. This frees ~1MB of runtime memory after start up has been
completed.

(cherry picked from commit d76e445)
  • Loading branch information
efd6 authored and mergify-bot committed Feb 22, 2022
1 parent 414d18f commit f4d5b0b
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 f4d5b0b

Please sign in to comment.