alloc: bdw: fix memory error on bdw

The maximum valid address should be base + size -1

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
This commit is contained in:
Rander Wang 2018-12-12 13:41:17 +08:00 committed by Liam Girdwood
parent a0268d61c8
commit 0122caf080
1 changed files with 1 additions and 1 deletions

View File

@ -581,7 +581,7 @@ void rfree(void *ptr)
/* panic if pointer is from system heap */
if (ptr >= (void *)cpu_heap->heap &&
ptr <= (void *)cpu_heap->heap + cpu_heap->size) {
ptr < (void *)cpu_heap->heap + cpu_heap->size) {
trace_error(TRACE_CLASS_MEM, "rfree() error: "
"attempt to free system heap = %p, cpu = %d",
(uintptr_t)ptr, cpu_get_id());