summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/getprotoent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/getprotoent.c')
-rw-r--r--src/lib/libc/net/getprotoent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/net/getprotoent.c b/src/lib/libc/net/getprotoent.c
index 7c6ab68166..f0705e0765 100644
--- a/src/lib/libc/net/getprotoent.c
+++ b/src/lib/libc/net/getprotoent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getprotoent.c,v 1.9 2006/01/17 15:41:52 millert Exp $ */ 1/* $OpenBSD: getprotoent.c,v 1.10 2007/09/02 15:19:17 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 1983, 1993 3 * Copyright (c) 1983, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
@@ -102,7 +102,7 @@ again:
102 pe->p_proto = l; 102 pe->p_proto = l;
103 if (pd->aliases == NULL) { 103 if (pd->aliases == NULL) {
104 pd->maxaliases = 5; 104 pd->maxaliases = 5;
105 pd->aliases = malloc(pd->maxaliases * sizeof(char *)); 105 pd->aliases = calloc(pd->maxaliases, sizeof(char *));
106 if (pd->aliases == NULL) { 106 if (pd->aliases == NULL) {
107 serrno = errno; 107 serrno = errno;
108 endprotoent_r(pd); 108 endprotoent_r(pd);