Skip to content

Commit

Permalink
enforcer(bpf): fix panic during cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: daemon1024 <[email protected]>
  • Loading branch information
daemon1024 committed Feb 7, 2023
1 parent 006641f commit c7d13d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions KubeArmor/enforcer/bpflsm/enforcer.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ func (be *BPFEnforcer) DestroyBPFEnforcer() error {
}

for _, link := range be.Probes {
if link == nil {
continue
}
if err := link.Close(); err != nil {
be.Logger.Err(err.Error())
errBPFCleanUp = true
Expand Down

0 comments on commit c7d13d5

Please sign in to comment.