Skip to content

Commit

Permalink
Remove debug log
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Anh Duong <anh.duong@kyber.network>
  • Loading branch information
vietanhduong committed Dec 28, 2023
1 parent 8dd29a1 commit 06ac034
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions pkg/syms/elf/elfmmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func NewMMapedElfFile(fpath string) (*MMapedElfFile, error) {
res.Progs = progs
res.Sections = sections

runtime.SetFinalizer(res, func(obj *MMapedElfFile) { obj.Finalize() })
runtime.SetFinalizer(res, func(obj *MMapedElfFile) { obj.Close() })
return res, nil
}

Expand Down Expand Up @@ -80,14 +80,10 @@ func (f *MMapedElfFile) ensureOpen() error {
return f.open()
}

func (f *MMapedElfFile) Finalize() {
if f.fd != nil {
println("ebpf mmaped elf not closed")
}
f.Close()
}

func (f *MMapedElfFile) Close() {
if f == nil {
return
}
if f.fd != nil {
f.fd.Close()
f.fd = nil
Expand Down

0 comments on commit 06ac034

Please sign in to comment.