Skip to content

Commit

Permalink
fixed a possible nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
craftleon committed Dec 19, 2024
1 parent 078fa20 commit b01222d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions agent/knock.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ func (a *UdpAgent) preAccessRequest(ackMsg *common.ServerKnockAckMsg) (err error
acWg.Add(1)
go func(info *common.PreAccessInfo) {
defer acWg.Done()

a.processPreAccessAction(info)
if info != nil {
a.processPreAccessAction(info)
}
}(action)
}
acWg.Wait()
Expand Down

0 comments on commit b01222d

Please sign in to comment.