From: Wouter Wijngaards Date: Thu, 11 Mar 2010 11:18:40 +0000 (+0000) Subject: - fix for memory alignment in struct sock_list allocation. X-Git-Tag: release-1.4.3~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cf3327d8dbe14068f0379f9869bbd87140b3f55;p=thirdparty%2Funbound.git - fix for memory alignment in struct sock_list allocation. git-svn-id: file:///svn/unbound/trunk@2023 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/util/net_help.c b/util/net_help.c index d2e7fcca1..8733bb8f8 100644 --- a/util/net_help.c +++ b/util/net_help.c @@ -497,7 +497,7 @@ void sock_list_insert(struct sock_list** list, struct sockaddr_storage* addr, socklen_t len, struct regional* region) { struct sock_list* add = (struct sock_list*)regional_alloc(region, - sizeof(add->next) + sizeof(add->len) + (size_t)len); + sizeof(*add) - sizeof(add->addr) + (size_t)len); if(!add) { log_err("out of memory in socketlist insert"); return;