how to fix this error malloc.c:2379: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
void fib(int **heap_loc, int n) {
    *heap_loc = malloc(sizeof(int) * n);
    for (int i = 0; i <= n; i++) {
        if (i == 0) {
            (*heap_loc)[i] = 0;
        } else if (i == 1) {
            (*heap_loc)[i] = 1;
        } else {
            (*heap_loc)[i] = (*heap_loc)[i - 1] + (*heap_loc)[i - 2];
        }
    }
}