Skip to content

Commit ef5faf0

Browse files
isodudeti-mo
authored andcommitted
Fix variable naming for cgroup link attachment
Signed-off-by: Josef Johansson <[email protected]>
1 parent 4c99a2e commit ef5faf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/tcprtt_sockops/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ func main() {
6464
defer objs.Close()
6565

6666
// Attach ebpf program to a cgroupv2
67-
link, err := link.AttachCgroup(link.CgroupOptions{
67+
l, err := link.AttachCgroup(link.CgroupOptions{
6868
Path: cgroupPath,
6969
Program: objs.BpfSockopsCb,
7070
Attach: ebpf.AttachCGroupSockOps,
7171
})
7272
if err != nil {
7373
log.Fatal(err)
7474
}
75-
defer link.Close()
75+
defer l.Close()
7676

7777
log.Printf("eBPF program loaded and attached on cgroup %s\n", cgroupPath)
7878

0 commit comments

Comments
 (0)