Always align pool element lengths properly.

Enforce 8-byte alignment on the pool element lengths.
This commit is contained in:
Joris Vink 2021-12-11 22:35:37 +01:00
parent 685f504564
commit cf6cf5f820
1 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,8 @@ kore_pool_init(struct kore_pool *pool, const char *name,
if ((pool->name = strdup(name)) == NULL)
fatal("kore_pool_init: strdup %s", errno_s);
len = (len + (8 - 1)) & ~(8 - 1);
pool->lock = 0;
pool->elms = 0;
pool->inuse = 0;