From 90dfa59d64dec4a1c6a598eef18a8b1586e0deee Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Tue, 22 Feb 2022 13:27:01 +1030 Subject: [PATCH] packetbeat/beater: help the GC clean up the Npcap installer if it's not used 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. --- packetbeat/beater/install_npcap.go | 1 + 1 file changed, 1 insertion(+) diff --git a/packetbeat/beater/install_npcap.go b/packetbeat/beater/install_npcap.go index d15ac21479a0..f247fee70c83 100644 --- a/packetbeat/beater/install_npcap.go +++ b/packetbeat/beater/install_npcap.go @@ -52,6 +52,7 @@ func installNpcap(b *beat.Beat) error { } }() if !npcap.Upgradeable() { + npcap.Installer = nil return nil }