mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
Free pbuf if pbuf_header() fails
This commit is contained in:
parent
bef0503545
commit
4aee4c1ac7
@ -805,6 +805,7 @@ snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr,
|
||||
/* peek in the UDP header (goto IP payload) */
|
||||
if(pbuf_header(p, UDP_HLEN)){
|
||||
LWIP_ASSERT("Can't move to UDP header", 0);
|
||||
pbuf_free(p);
|
||||
return;
|
||||
}
|
||||
udphdr = p->payload;
|
||||
|
Loading…
Reference in New Issue
Block a user