summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-04-18 17:06:53 +0300
committerSteffen Klassert <steffen.klassert@secunet.com>2017-04-19 07:49:00 +0300
commitffa6f571e4e20bbe5b3d8b5e112e66b3b6c29632 (patch)
tree921ec9ab617b8a08d741d3d66ec196faa5f0d22e
parentbcd1f8a45e7d5804e4f7bd78a91348cfce3cb74a (diff)
downloadlinux-ffa6f571e4e20bbe5b3d8b5e112e66b3b6c29632.tar.xz
esp6: fix incorrect null pointer check on xo
The check for xo being null is incorrect, currently it is checking for non-null, it should be checking for null. Detected with CoverityScan, CID#1429349 ("Dereference after null check") Fixes: 7862b4058b9f ("esp: Add gso handlers for esp4 and esp6") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
-rw-r--r--net/ipv6/esp6_offload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/esp6_offload.c b/net/ipv6/esp6_offload.c
index 1cceeee7cc33..95f10728abaa 100644
--- a/net/ipv6/esp6_offload.c
+++ b/net/ipv6/esp6_offload.c
@@ -120,7 +120,7 @@ static struct sk_buff *esp6_gso_segment(struct sk_buff *skb,
netdev_features_t esp_features = features;
struct xfrm_offload *xo = xfrm_offload(skb);
- if (xo)
+ if (!xo)
goto out;
seq = xo->seq.low;