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

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)

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
  • Loading branch information
mergify[bot] and efd6 committed Feb 23, 2022
1 parent 414d18f commit 693c6f1
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 693c6f1

Please sign in to comment.