diff options
| -rw-r--r-- | net/caif/chnl_net.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 69771c04ba8f..e597733affb8 100644 --- a/net/caif/chnl_net.c +++ b/net/caif/chnl_net.c | |||
| @@ -94,6 +94,10 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt) | |||
| 94 | 94 | ||
| 95 | /* check the version of IP */ | 95 | /* check the version of IP */ |
| 96 | ip_version = skb_header_pointer(skb, 0, 1, &buf); | 96 | ip_version = skb_header_pointer(skb, 0, 1, &buf); |
| 97 | if (!ip_version) { | ||
| 98 | kfree_skb(skb); | ||
| 99 | return -EINVAL; | ||
| 100 | } | ||
| 97 | 101 | ||
| 98 | switch (*ip_version >> 4) { | 102 | switch (*ip_version >> 4) { |
| 99 | case 4: | 103 | case 4: |
