From 3b0bca4b38276c95f1305247ebf8a3db02ff5d83 Mon Sep 17 00:00:00 2001
From: liyunqing <liyunqing@kylinos.cn>
Date: Thu, 7 Mar 2024 11:18:00 +0800
Subject: [PATCH] fix duplicate pbuf_free in udp_sendto

---
 src/core/udp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/core/udp.c b/src/core/udp.c
index 440f909..ff5c99b 100644
--- a/src/core/udp.c
+++ b/src/core/udp.c
@@ -680,7 +680,6 @@ udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip,
   struct pbuf *udp_pbuf = do_lwip_get_from_sendring((struct lwip_sock *)(p->payload), p->tot_len, &apiflags);
   do_lwip_get_from_sendring_over((struct lwip_sock *)(p->payload));
 
-  pbuf_free(p);
   p = udp_pbuf;
   if (p == NULL) {
     return ERR_MEM;
-- 
2.27.0

