From f4d5b0be586df8e62ee505aebed86fc0d0f2303a Mon Sep 17 00:00:00 2001 From: Dan Kortschak <90160302+efd6@users.noreply.github.com> Date: Wed, 23 Feb 2022 09:28:28 +1030 Subject: [PATCH] packetbeat/beater: help the GC clean up the Npcap installer if it's not 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 d76e44587e88f511b8a90160d54452c562de5c39) --- 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 d15ac21479a..f247fee70c8 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 }