net: fix incorrect access to pointer

This is not dereferencing the pointer, and instead checking only
the value of the pointer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
stable-2.7
Paolo Bonzini 2016-07-15 10:43:32 +02:00 committed by Jason Wang
parent 1ac6c07f42
commit 2c5e564f4d
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ void eth_get_protocols(const struct iovec *iov, int iovcnt,
*l4hdr_off, sizeof(l4hdr_info->hdr.tcp),
&l4hdr_info->hdr.tcp);
if (istcp) {
if (*istcp) {
*l5hdr_off = *l4hdr_off +
TCP_HEADER_DATA_OFFSET(&l4hdr_info->hdr.tcp);