Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c411c36 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "getaddrinfo: initialize addrinfo_sort_elem array to zero"

parents 7eeed85c 17311bed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1354,7 +1354,7 @@ void resolv_rfc6724_sort(struct addrinfo* list_sentinel, unsigned mark, uid_t ui
        cur = cur->ai_next;
    }

    elems = (struct addrinfo_sort_elem*) malloc(nelem * sizeof(struct addrinfo_sort_elem));
    elems = (struct addrinfo_sort_elem*) calloc(nelem, sizeof(struct addrinfo_sort_elem));
    if (elems == NULL) {
        goto error;
    }