Skip to content

Commit 83c6a6a

Browse files
committed
fix missing check err != nil
1 parent 5d5c260 commit 83c6a6a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compile.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,15 @@ func adjustEbpf(insts asm.Instructions, opts Options) (newInsts asm.Instructions
121121
switch opts.PacketAccessMode {
122122
case BpfProbeReadKernel:
123123
insts, err = adjustEbpfWithBpfProbeReadKernel(insts, opts)
124+
if err != nil {
125+
return nil, err
126+
}
124127
break
125128
case BpfSkbLoadBytes:
126129
insts, err = adjustEbpfWithBpfSkbLoadBytes(insts, opts)
130+
if err != nil {
131+
return nil, err
132+
}
127133
break
128134
case Direct:
129135
break

0 commit comments

Comments
 (0)