From: Victor Julien Date: Fri, 6 May 2016 10:50:15 +0000 (+0200) Subject: ippair: fix alignment issues X-Git-Tag: suricata-3.1RC1~188 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35d081a797a1eaff6351eefb072b0741e8241471;p=thirdparty%2Fsuricata.git ippair: fix alignment issues --- diff --git a/src/ippair.c b/src/ippair.c index 736cdce5ba..e86d67b531 100644 --- a/src/ippair.c +++ b/src/ippair.c @@ -192,7 +192,7 @@ void IPPairInitConfig(char quiet) (uintmax_t)sizeof(IPPairHashRow)); exit(EXIT_FAILURE); } - ippair_hash = SCCalloc(ippair_config.hash_size, sizeof(IPPairHashRow)); + ippair_hash = SCMallocAligned(ippair_config.hash_size * sizeof(IPPairHashRow), CLS); if (unlikely(ippair_hash == NULL)) { SCLogError(SC_ERR_FATAL, "Fatal error encountered in IPPairInitConfig. Exiting..."); exit(EXIT_FAILURE); @@ -280,7 +280,7 @@ void IPPairShutdown(void) HRLOCK_DESTROY(&ippair_hash[u]); } - SCFree(ippair_hash); + SCFreeAligned(ippair_hash); ippair_hash = NULL; } (void) SC_ATOMIC_SUB(ippair_memuse, ippair_config.hash_size * sizeof(IPPairHashRow));