Skip to content

Commit b01222d

Browse files
committed
fixed a possible nil pointer dereference
1 parent 078fa20 commit b01222d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

agent/knock.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,9 @@ func (a *UdpAgent) preAccessRequest(ackMsg *common.ServerKnockAckMsg) (err error
256256
acWg.Add(1)
257257
go func(info *common.PreAccessInfo) {
258258
defer acWg.Done()
259-
260-
a.processPreAccessAction(info)
259+
if info != nil {
260+
a.processPreAccessAction(info)
261+
}
261262
}(action)
262263
}
263264
acWg.Wait()

0 commit comments

Comments
 (0)