[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [PATCH 1/2] lib/ukalloc: Correct uk_pfree() interface behaviour



As designed, every allocator interface calls a *_do_*()
variant which actually implements the operation (e.g.,
malloc, free). uk_pfree() was calling the allocator
directly and skipped an assertion check. This patch
fixes this behavior by calling uk_do_pfree() instead.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 lib/ukalloc/include/uk/alloc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ukalloc/include/uk/alloc.h b/lib/ukalloc/include/uk/alloc.h
index 1802755..3f0d9e5 100644
--- a/lib/ukalloc/include/uk/alloc.h
+++ b/lib/ukalloc/include/uk/alloc.h
@@ -210,7 +210,7 @@ static inline void uk_do_pfree(struct uk_alloc *a, void 
*ptr, size_t order)
 }
 static inline void uk_pfree(struct uk_alloc *a, void *ptr, size_t order)
 {
-       a->pfree(a, ptr, order);
+       uk_do_pfree(a, ptr, order);
 }
 #endif
 static inline int uk_alloc_addmem(struct uk_alloc *a, void *base,
-- 
2.7.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.