Skip to content

Commit ac1a0de

Browse files
committed
objpool: fix flag initialisation
We compare flags on repeated allocations from an existing pool, but initialisation got forgotten in the process. Restore it. Fixes: d6e6ac5 ("Add a object pool allocator") Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 92c8a55 commit ac1a0de

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/lib/objpool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ void *objpool_alloc(struct objpool_head *head, size_t size, uint32_t flags)
8888
unsigned int new_n;
8989

9090
if (list_is_empty(&head->list)) {
91+
head->flags = flags;
9192
new_n = 2;
9293
} else {
9394
/* Check the last one */

0 commit comments

Comments
 (0)