From 0686380302079404ac2363a73bdfb606ef3b2b15 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 15 Oct 2007 19:18:02 +0000 Subject: [PATCH] Removed bug on memory failure introduced 3 months ago in rev 1.34 (input pbuf was freed on puf_alloc failure) --- src/core/ipv4/icmp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/ipv4/icmp.c b/src/core/ipv4/icmp.c index 8f03d3a2..aef2f371 100644 --- a/src/core/ipv4/icmp.c +++ b/src/core/ipv4/icmp.c @@ -229,7 +229,6 @@ icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) /* ICMP header + IP header + 8 bytes of data */ if (q == NULL) { LWIP_DEBUGF(ICMP_DEBUG, ("icmp_dest_unreach: failed to allocate pbuf for ICMP packet.\n")); - pbuf_free(p); return; } 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 */ if (q == NULL) { LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMP packet.\n")); - pbuf_free(p); return; } LWIP_ASSERT("check that first pbuf can hold icmp message",