LwIP: Allow smaller initial PDU buffer allocations

This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2026-08-31 10:46:47 +01:00
1 parent d0605cc5e7
commit 44e02b8693
1 file changed
+1 -1
+1 -1
View File
@@ -138,7 +138,7 @@ coap_pdu_init(coap_pdu_type_t type, coap_pdu_code_t code, coap_mid_t mid,
pdu->alloc_size = min(size, COAP_DEFAULT_MTU);
#ifdef WITH_LWIP
pdu->pbuf = pbuf_alloc(PBUF_TRANSPORT, max(size, COAP_DEFAULT_MTU) + pdu->max_hdr_size,
pdu->pbuf = pbuf_alloc(PBUF_TRANSPORT, pdu->alloc_size + pdu->max_hdr_size,
PBUF_RAM);
if (pdu->pbuf == NULL) {
coap_free_type(COAP_PDU, pdu);