aboutsummaryrefslogtreecommitdiff
path: root/net/eth.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-07-15 10:43:32 +0200
committerJason Wang <jasowang@redhat.com>2016-07-18 16:16:49 +0800
commit2c5e564f4d8309ee0f47029ab461c4c4459f43c4 (patch)
treef564a9c73266b9c845aa29cbe85f79fd69fcf6da /net/eth.c
parent1ac6c07f4288b0a563310fad0cdabb3a47c85607 (diff)
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>
Diffstat (limited to 'net/eth.c')
-rw-r--r--net/eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/eth.c b/net/eth.c
index 95fe15c23f..c147c2ebb3 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -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);