diff options
author | 2016-01-22 11:10:17 +0000 | |
---|---|---|
committer | 2016-01-22 11:10:17 +0000 | |
commit | efa0ff8a36906de2c285d6bf70190eff917fa6f4 (patch) | |
tree | e862db561d985404ea1361b20992d2673cef4016 /sys/netinet/tcp_input.c | |
parent | escape punctuation to have it mark up properly; (diff) | |
download | wireguard-openbsd-efa0ff8a36906de2c285d6bf70190eff917fa6f4.tar.xz wireguard-openbsd-efa0ff8a36906de2c285d6bf70190eff917fa6f4.zip |
fix a missing if_put() in the default af path of tcp_mss()
ok mpi@
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index a495f54fe31..3fa82c5b593 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.312 2015/12/05 10:52:26 tedu Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.313 2016/01/22 11:10:17 jsg Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -2954,7 +2954,7 @@ int tcp_mss(struct tcpcb *tp, int offer) { struct rtentry *rt; - struct ifnet *ifp; + struct ifnet *ifp = NULL; int mss, mssopt; int iphlen; struct inpcb *inp; @@ -3028,8 +3028,8 @@ tcp_mss(struct tcpcb *tp, int offer) mssopt = ifp->if_mtu - iphlen - sizeof(struct tcphdr); mssopt = max(tcp_mssdflt, mssopt); } - if_put(ifp); out: + if_put(ifp); /* * The current mss, t_maxseg, is initialized to the default value. * If we compute a smaller value, reduce the current mss. |