mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 09:19:53 +00:00
raw.c: Avoid NULL pointer dereference
This commit is contained in:
parent
f9ce31f98b
commit
e89b48d23f
@ -434,8 +434,10 @@ raw_new_ip6(u8_t proto)
|
|||||||
struct raw_pcb *pcb;
|
struct raw_pcb *pcb;
|
||||||
pcb = raw_new(proto);
|
pcb = raw_new(proto);
|
||||||
#if LWIP_IPV4
|
#if LWIP_IPV4
|
||||||
IP_SET_TYPE_VAL(pcb->local_ip, IPADDR_TYPE_V6);
|
if(pcb != NULL) {
|
||||||
IP_SET_TYPE_VAL(pcb->remote_ip, IPADDR_TYPE_V6);
|
IP_SET_TYPE_VAL(pcb->local_ip, IPADDR_TYPE_V6);
|
||||||
|
IP_SET_TYPE_VAL(pcb->remote_ip, IPADDR_TYPE_V6);
|
||||||
|
}
|
||||||
#endif /* LWIP_IPV4 */
|
#endif /* LWIP_IPV4 */
|
||||||
return pcb;
|
return pcb;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user