summaryrefslogtreecommitdiff
path: root/usr.bin/dig/lib/dns/rdataset.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/dig/lib/dns/rdataset.c')
-rw-r--r--usr.bin/dig/lib/dns/rdataset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/dig/lib/dns/rdataset.c b/usr.bin/dig/lib/dns/rdataset.c
index 328c1b72bd4..be37939199a 100644
--- a/usr.bin/dig/lib/dns/rdataset.c
+++ b/usr.bin/dig/lib/dns/rdataset.c
@@ -285,8 +285,8 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
shuffle = ISC_TRUE;
if (shuffle && count > MAX_SHUFFLE) {
- in = malloc(count * sizeof(*in));
- out = malloc(count * sizeof(*out));
+ in = reallocarray(NULL, count, sizeof(*in));
+ out = reallocarray(NULL, count, sizeof(*out));
if (in == NULL || out == NULL)
shuffle = ISC_FALSE;
} else {