1From 21f7f9a5bdfd5d2f592af19e73647a48fdbb7bf1 Mon Sep 17 00:00:00 2001 2From: kircher <majun65@huawei.com> 3Date: Tue, 16 May 2023 19:07:42 +0800 4Subject: [PATCH] fix pbuf leak in udp connection 5 6--- 7 src/core/udp.c | 5 ++++- 8 1 file changed, 4 insertions(+), 1 deletion(-) 9 10diff --git a/src/core/udp.c b/src/core/udp.c 11index 1398537..9c3cdaa 100644 12--- a/src/core/udp.c 13+++ b/src/core/udp.c 14@@ -933,8 +933,11 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d 15 /* @todo: must this be increased even if error occurred? */ 16 MIB2_STATS_INC(mib2.udpoutdatagrams); 17 18+#if !GAZELLE_ENABLE 19 /* did we chain a separate header pbuf earlier? */ 20- if (q != p) { 21+ if (q != p) 22+#endif 23+ { 24 /* free the header pbuf */ 25 pbuf_free(q); 26 q = NULL; 27-- 282.33.0 29 30