From 27c6d299cfd1b8a223fe6e51763f5fc6c90f6330 Mon Sep 17 00:00:00 2001 From: kieranm Date: Sun, 30 May 2004 14:04:30 +0000 Subject: [PATCH] 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 --- src/core/pbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 10f73a5f..7cf22c98 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -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; }