Skip to content

Commit 0c32c9a

Browse files
lyakhlgirdwood
authored andcommitted
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 d01a028 commit 0c32c9a

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
@@ -94,6 +94,7 @@ void *objpool_alloc(struct objpool_head *head, size_t size, uint32_t flags)
9494
unsigned int new_n;
9595

9696
if (list_is_empty(&head->list)) {
97+
head->flags = flags;
9798
new_n = 2;
9899
} else {
99100
/* Check the last one */

0 commit comments

Comments
 (0)