mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 09:16:20 +00:00
Kieran Mansley - kjm25@cam.ac.uk - 30th May 2004
* Fixed bug #9160 after discussion on mailing list - alters use of MEM_ALIGN_SIZE in pbuf_alloc when calling mem_malloc for a PBUF_RAM pbuf
This commit is contained in:
parent
450dd65165
commit
27c6d299cf
@ -306,7 +306,7 @@ pbuf_alloc(pbuf_layer l, u16_t length, pbuf_flag flag)
|
|||||||
break;
|
break;
|
||||||
case PBUF_RAM:
|
case PBUF_RAM:
|
||||||
/* If pbuf is to be allocated in RAM, allocate memory for it. */
|
/* If pbuf is to be allocated in RAM, allocate memory for it. */
|
||||||
p = mem_malloc(MEM_ALIGN_SIZE(sizeof(struct pbuf) + length + offset));
|
p = mem_malloc(MEM_ALIGN_SIZE(sizeof(struct pbuf) + offset) + MEM_ALIGN_SIZE(length));
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user