Merge tag 'io_uring-5.15-2021-10-22' of git://git.kernel.dk/linux-block
[platform/kernel/linux-starfive.git] / net / netfilter / nfnetlink_osf.c
index e8f8875..0fa2e20 100644 (file)
@@ -186,6 +186,8 @@ static const struct tcphdr *nf_osf_hdr_ctx_init(struct nf_osf_hdr_ctx *ctx,
 
                ctx->optp = skb_header_pointer(skb, ip_hdrlen(skb) +
                                sizeof(struct tcphdr), ctx->optsize, opts);
+               if (!ctx->optp)
+                       return NULL;
        }
 
        return tcp;