From 31b632a17df9e650f3dc9c9ea48774757488d972 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 6 May 2016 12:50:01 +0200 Subject: [PATCH] host: fix alignment issues --- src/host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/host.c b/src/host.c index faf9513bde..86092d9ef3 100644 --- a/src/host.c +++ b/src/host.c @@ -196,7 +196,7 @@ void HostInitConfig(char quiet) (uintmax_t)sizeof(HostHashRow)); exit(EXIT_FAILURE); } - host_hash = SCCalloc(host_config.hash_size, sizeof(HostHashRow)); + host_hash = SCMallocAligned(host_config.hash_size * sizeof(HostHashRow), CLS); if (unlikely(host_hash == NULL)) { SCLogError(SC_ERR_FATAL, "Fatal error encountered in HostInitConfig. Exiting..."); exit(EXIT_FAILURE); @@ -284,7 +284,7 @@ void HostShutdown(void) HRLOCK_DESTROY(&host_hash[u]); } - SCFree(host_hash); + SCFreeAligned(host_hash); host_hash = NULL; } (void) SC_ATOMIC_SUB(host_memuse, host_config.hash_size * sizeof(HostHashRow)); -- 2.47.2