1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-08 19:28:21 -05:00

Add defer

This commit is contained in:
RPRX 2020-09-10 15:58:38 +00:00 committed by GitHub
parent 46d739d848
commit 8c2e8e9db9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,6 +167,8 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i
} else {
request, requestAddons, err, pre = encoding.DecodeRequestHeader(reader, h.validator)
if pre == nil {
defer pre.Release()
} else {
isfb = false
}
}
@ -286,6 +288,7 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i
}
}
pro := buf.New()
defer pro.Release()
switch fb.Xver {
case 1:
if ipv4 {