diff options
| author | 2020-02-25 16:54:24 +0000 | |
|---|---|---|
| committer | 2020-02-25 16:54:24 +0000 | |
| commit | 5148cc0def88254f00a59a437eca40a4d3ca40ac (patch) | |
| tree | b82255a168187050c8b6ee560449113126aee776 /usr.bin/dig/lib/isc/heap.c | |
| parent | Fix a mistake in context documentation of smr_barrier() and smr_flush(). (diff) | |
| download | wireguard-openbsd-5148cc0def88254f00a59a437eca40a4d3ca40ac.tar.xz wireguard-openbsd-5148cc0def88254f00a59a437eca40a4d3ca40ac.zip | |
malloc(a * b) -> reallocarray(NULL, a, b)
ok jsing jca florian
Diffstat (limited to 'usr.bin/dig/lib/isc/heap.c')
| -rw-r--r-- | usr.bin/dig/lib/isc/heap.c | 4 |
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) { |
