]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9541 fix typo in daemon.c
authorHoward Chu <hyc@openldap.org>
Fri, 30 Apr 2021 08:24:32 +0000 (09:24 +0100)
committerHoward Chu <hyc@openldap.org>
Fri, 30 Apr 2021 08:24:32 +0000 (09:24 +0100)
From commit ee49c839764

servers/slapd/daemon.c

index 129ace499c2fe7cfb77d267ca7fef2b6876a9b16..2f6a244ca0f77f9dcfc5dccae6afd19afe96011f 100644 (file)
@@ -1484,7 +1484,7 @@ slap_get_listener_addresses(
                sap = *sal = ch_malloc((n+1) * sizeof(void *));
 
                for ( i = 0; i<n; i++ ) {
-                       sap[i] = ch_calloc(sizeof(struct sockaddr_in));
+                       sap[i] = ch_calloc(1, sizeof(struct sockaddr_in));
                        sap[i]->sa_family = AF_INET;
                        ((struct sockaddr_in *)sap[i])->sin_port = htons(port);
                        AC_MEMCPY( &((struct sockaddr_in *)sap[i])->sin_addr,