Skip to content

Commit 3a6ccf9

Browse files
committed
main: DetachXDP() after program ends.
Signed-off-by: Simarpreet Singh <simar@linux.com>
1 parent 815a0e1 commit 3a6ccf9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,6 @@ func main() {
9191
if err = w.attachXDP(); err != nil {
9292
w.lg.Fatalf("unable to attach XDP program: ", err)
9393
}
94+
defer w.xdp.Detach()
95+
9496
}

0 commit comments

Comments
 (0)