Skip to content

Commit

Permalink
pkg/sensors: fix memory use of unloaded sensors
Browse files Browse the repository at this point in the history
Sensors that are disabled are not loaded and should not use memory, thus
we clear the LoadedMapsInfo on unloading programs.

Signed-off-by: Mahe Tardy <[email protected]>
  • Loading branch information
mtardy committed Oct 21, 2024
1 parent dd04c6c commit b350f2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/sensors/program/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ func (p *Program) Unload() error {
}
p.unloader = nil
p.unloaderOverride = nil
p.LoadedMapsInfo = nil
return nil
}

Expand Down

0 comments on commit b350f2c

Please sign in to comment.