From: Victor Julien Date: Fri, 6 May 2016 10:50:01 +0000 (+0200) Subject: host: fix alignment issues X-Git-Tag: suricata-3.1RC1~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31b632a17df9e650f3dc9c9ea48774757488d972;p=thirdparty%2Fsuricata.git host: fix alignment issues --- 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));