aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_eal/common/malloc_elem.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_eal/common/malloc_elem.c')
-rw-r--r--lib/librte_eal/common/malloc_elem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
index 98bcd37b..f6cbc422 100644
--- a/lib/librte_eal/common/malloc_elem.c
+++ b/lib/librte_eal/common/malloc_elem.c
@@ -98,6 +98,7 @@ elem_start_pt(struct malloc_elem *elem, size_t size, unsigned align,
if ((new_data_start & bmask) != ((end_pt - 1) & bmask)) {
end_pt = RTE_ALIGN_FLOOR(end_pt, bound);
new_data_start = RTE_ALIGN_FLOOR((end_pt - size), align);
+ end_pt = new_data_start + size;
if (((end_pt - 1) & bmask) != (new_data_start & bmask))
return NULL;
}