What is wrong? It gets a segmentation fault.
int *fib(int **seq, int n) {
    *seq = malloc(sizeof(int) * n);

    int i;
    int sum = 0;
    for (i = 0; i < n; i++) {
        *seq[i] = sum;
        if (i >= 1) {
            sum += *seq[i-1];
        } else if (i == 0) {
            sum += 1;
        }
    }

    return *seq;
}