summaryrefslogtreecommitdiffstats
path: root/usr.bin/dig/lib/isc/heap.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/dig/lib/isc/heap.c')
-rw-r--r--usr.bin/dig/lib/isc/heap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/dig/lib/isc/heap.c b/usr.bin/dig/lib/isc/heap.c
index 4b03e895dc8..c50de97d59a 100644
--- a/usr.bin/dig/lib/isc/heap.c
+++ b/usr.bin/dig/lib/isc/heap.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: heap.c,v 1.5 2020/02/25 05:00:43 jsg Exp $ */
+/* $Id: heap.c,v 1.6 2020/02/25 16:54:24 deraadt Exp $ */
/*! \file
* Heap implementation of priority queues adapted from the following:
@@ -110,7 +110,7 @@ resize(isc_heap_t *heap) {
unsigned int new_size;
new_size = heap->size + heap->size_increment;
- new_array = malloc(new_size * sizeof(void *));
+ new_array = reallocarray(NULL, new_size, sizeof(void *));
if (new_array == NULL)
return (ISC_FALSE);
if (heap->array != NULL) {