udp[6]_multi_input: Don't unlock freed inp.

If udp[6]_append() returns non-zero, it is because the inp has gone
away (inpcbrele_rlocked returned 1 after running the tunnel function).

Reviewed by:	ae
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D37511
This commit is contained in:
John Baldwin 2022-11-30 14:38:51 -08:00
parent 79b6799423
commit d00c20882f
2 changed files with 0 additions and 2 deletions

View file

@ -446,7 +446,6 @@ udp_multi_input(struct mbuf *m, int proto, struct sockaddr_in *udp_in)
else
UDP_PROBE(receive, NULL, inp, ip, inp, uh);
if (udp_append(inp, ip, n, sizeof(struct ip), udp_in)) {
INP_RUNLOCK(inp);
break;
} else
appends++;

View file

@ -312,7 +312,6 @@ udp6_multi_input(struct mbuf *m, int off, int proto,
UDP_PROBE(receive, NULL, inp, ctx.ip6, inp,
ctx.uh);
if (udp6_append(inp, n, off, fromsa)) {
INP_RUNLOCK(inp);
break;
} else
appends++;