]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- fix for memory alignment in struct sock_list allocation.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 11 Mar 2010 11:18:40 +0000 (11:18 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 11 Mar 2010 11:18:40 +0000 (11:18 +0000)
git-svn-id: file:///svn/unbound/trunk@2023 be551aaa-1e26-0410-a405-d3ace91eadb9

util/net_help.c

index d2e7fcca16a75627940d2c9575e832335d0fc9ec..8733bb8f845341543dbca55a3538e831b67d60ef 100644 (file)
@@ -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;