From 4f057bffd635f2f1d5d17397c59158360a880787 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Fri, 5 Nov 2021 10:43:17 +0100 Subject: [PATCH] Fix NULL pointer checks in blas_memory_alloc --- driver/others/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/others/memory.c b/driver/others/memory.c index 8e601099c..0a0b0eb3d 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -2921,7 +2921,7 @@ void *blas_memory_alloc(int procpos){ func = &memoryalloc[0]; - while ((func != NULL) && (map_address == (void *) -1)) { + while ((*func != NULL) && (map_address == (void *) -1)) { map_address = (*func)((void *)base_address); @@ -3032,7 +3032,7 @@ allocation2: func = &memoryalloc[0]; - while ((func != NULL) && (map_address == (void *) -1)) { + while ((*func != NULL) && (map_address == (void *) -1)) { map_address = (*func)((void *)base_address);