diff options
| author | Xin LI <delphij@FreeBSD.org> | 2017-03-23 05:19:00 +0000 | 
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2017-03-23 05:19:00 +0000 | 
| commit | 07ac48c3644021279e113d530764a231e27490a7 (patch) | |
| tree | 0cbc5ca54b66605faf74bfd0773111623cfe3d9b /ntpd/ntp_restrict.c | |
| parent | 01b922f62c559f5778a983c365d390371956a214 (diff) | |
Diffstat (limited to 'ntpd/ntp_restrict.c')
| -rw-r--r-- | ntpd/ntp_restrict.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/ntpd/ntp_restrict.c b/ntpd/ntp_restrict.c index 0b5fa2e3fa0e6..ad6c82a32a411 100644 --- a/ntpd/ntp_restrict.c +++ b/ntpd/ntp_restrict.c @@ -166,7 +166,7 @@ alloc_res4(void)  	if (res != NULL)  		return res; -	rl = emalloc_zero(count * cb); +	rl = eallocarray(count, cb);  	/* link all but the first onto free list */  	res = (void *)((char *)rl + (count - 1) * cb);  	for (i = count - 1; i > 0; i--) { @@ -192,7 +192,7 @@ alloc_res6(void)  	if (res != NULL)  		return res; -	rl = emalloc_zero(count * cb); +	rl = eallocarray(count, cb);  	/* link all but the first onto free list */  	res = (void *)((char *)rl + (count - 1) * cb);  	for (i = count - 1; i > 0; i--) {  | 
