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:
kieranm 2004-05-30 14:04:30 +00:00
parent 450dd65165
commit 27c6d299cf

View File

@ -306,7 +306,7 @@ pbuf_alloc(pbuf_layer l, u16_t length, pbuf_flag flag)
break;
case PBUF_RAM:
/* 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) {
return NULL;
}