diff --git a/pkg/proc/internal/ebpf/helpers.go b/pkg/proc/internal/ebpf/helpers.go index cddb4af7..3f4fde40 100644 --- a/pkg/proc/internal/ebpf/helpers.go +++ b/pkg/proc/internal/ebpf/helpers.go @@ -71,10 +71,8 @@ func (ctx *EBPFContext) Close() { if ctx.objs != nil { ctx.objs.Close() } - if ctx.links != nil { - for _, l := range ctx.links { - l.Close() - } + for _, l := range ctx.links { + l.Close() } }