Skip to content

Commit

Permalink
Merge pull request #1100 from daemon1024/fix-bpflsm-cleanup
Browse files Browse the repository at this point in the history
enforcer(bpf): fix panic during cleanup
  • Loading branch information
rksharma95 authored Feb 8, 2023
2 parents 006641f + c7d13d5 commit 258737d
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 258737d

Please sign in to comment.