mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
lib: fix a Null Pointer Dereference bug in sockopt.c
Signed-off-by: mugitya03 <mugitya233@outlook.com>
This commit is contained in:
parent
ae3f7c2fb2
commit
69d4cbc055
|
@ -179,7 +179,7 @@ static int getsockopt_ipv6_ifindex(struct msghdr *msgh)
|
|||
|
||||
pktinfo = getsockopt_cmsg_data(msgh, IPPROTO_IPV6, IPV6_PKTINFO);
|
||||
|
||||
if (pktinfo == NULL)
|
||||
if (!pktinfo)
|
||||
return 0;
|
||||
return pktinfo->ipi6_ifindex;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue