net: tcp2: Fix dereference after null check in tcp_in()

Fix dereference after null check in tcp_in().

Coverity CID :210051

Fixes #25783

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
This commit is contained in:
Oleg Zhurakivskyy 2020-07-09 12:25:11 +03:00 committed by Carles Cufí
commit fda94f7d06

View file

@ -1203,7 +1203,7 @@ next_state:
}
}
if (len) {
if (th && len) {
if (th_seq(th) == conn->ack) {
if (tcp_data_get(conn, pkt) < 0) {
break;