-/* $OpenBSD: tcp_output.c,v 1.117 2016/06/13 21:24:43 bluhm Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.118 2016/07/19 21:28:43 bluhm Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
tdb = gettdbbysrcdst(rtable_l2(tp->t_inpcb->inp_rtableid),
0, &src, &dst, IPPROTO_TCP);
- if (tdb == NULL)
+ if (tdb == NULL) {
+ m_freem(m);
return (EPERM);
+ }
if (tcp_signature(tdb, tp->pf, m, th, iphlen, 0,
- mtod(m, caddr_t) + hdrlen - optlen + sigoff) < 0)
+ mtod(m, caddr_t) + hdrlen - optlen + sigoff) < 0) {
+ m_freem(m);
return (EINVAL);
+ }
}
#endif /* TCP_SIGNATURE */