mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Removed bug on memory failure introduced 3 months ago in rev 1.34 (input pbuf was freed on puf_alloc failure)
This commit is contained in:
parent
282e9ead17
commit
0686380302
@ -229,7 +229,6 @@ icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t)
|
|||||||
/* ICMP header + IP header + 8 bytes of data */
|
/* ICMP header + IP header + 8 bytes of data */
|
||||||
if (q == NULL) {
|
if (q == NULL) {
|
||||||
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_dest_unreach: failed to allocate pbuf for ICMP packet.\n"));
|
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_dest_unreach: failed to allocate pbuf for ICMP packet.\n"));
|
||||||
pbuf_free(p);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LWIP_ASSERT("check that first pbuf can hold icmp message",
|
LWIP_ASSERT("check that first pbuf can hold icmp message",
|
||||||
@ -276,7 +275,6 @@ icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t)
|
|||||||
/* ICMP header + IP header + 8 bytes of data */
|
/* ICMP header + IP header + 8 bytes of data */
|
||||||
if (q == NULL) {
|
if (q == NULL) {
|
||||||
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMP packet.\n"));
|
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMP packet.\n"));
|
||||||
pbuf_free(p);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LWIP_ASSERT("check that first pbuf can hold icmp message",
|
LWIP_ASSERT("check that first pbuf can hold icmp message",
|
||||||
|
Loading…
Reference in New Issue
Block a user