diff --git a/net/ipfrag/ipv4_frag.c b/net/ipfrag/ipv4_frag.c index acec0029a8..0d467eb60d 100644 --- a/net/ipfrag/ipv4_frag.c +++ b/net/ipfrag/ipv4_frag.c @@ -361,7 +361,7 @@ int32_t ipv4_fragout(FAR struct net_driver_s *dev, uint16_t mtu) uint16_t offset = 0; uint16_t hdrlen; FAR struct iob_s *frag; - FAR struct ipv4_hdr_s *ref; + FAR struct ipv4_hdr_s *ref = NULL; struct iob_queue_s fragq = { NULL, NULL diff --git a/net/ipfrag/ipv6_frag.c b/net/ipfrag/ipv6_frag.c index c49cc2f0b5..ab19cab73b 100644 --- a/net/ipfrag/ipv6_frag.c +++ b/net/ipfrag/ipv6_frag.c @@ -569,7 +569,7 @@ int32_t ipv6_fragout(FAR struct net_driver_s *dev, uint16_t mtu) uint16_t hdroff; uint16_t hdrtype; FAR struct iob_s *frag; - FAR struct ipv6_hdr_s *ref; + FAR struct ipv6_hdr_s *ref = NULL; FAR struct ipv6_fragment_extension_s *fraghdr; struct iob_queue_s fragq = {