summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
Diffstat (limited to 'gl')
-rw-r--r--gl/lib/heap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gl/lib/heap.c b/gl/lib/heap.c
index 1de3391a5..4672b6d5b 100644
--- a/gl/lib/heap.c
+++ b/gl/lib/heap.c
@@ -41,7 +41,7 @@ heap_alloc (int (*compare)(const void *, const void *), size_t n_reserve)
if (n_reserve == 0)
n_reserve = 1;
- heap->array = xmalloc (n_reserve * sizeof *(heap->array));
+ heap->array = xnmalloc (n_reserve, sizeof *(heap->array));
heap->array[0] = NULL;
heap->capacity = n_reserve;