From c81987ceebda9023c10840356d08c5ae91a1dfd1 Mon Sep 17 00:00:00 2001 From: gamemann Date: Fri, 12 Nov 2021 21:07:30 +0000 Subject: [PATCH] Initialize headers as NULL. --- src/xdpfw_kern.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xdpfw_kern.c b/src/xdpfw_kern.c index c64a9fe..e4eb35b 100644 --- a/src/xdpfw_kern.c +++ b/src/xdpfw_kern.c @@ -105,8 +105,8 @@ int xdp_prog_main(struct xdp_md *ctx) __u64 blocktime = 1; // Initialize IP headers. - struct iphdr *iph; - struct ipv6hdr *iph6; + struct iphdr *iph = NULL; + struct ipv6hdr *iph6 = NULL; __u128 srcip6 = 0; // Set IPv4 and IPv6 common variables.