does this function raise segmentation fault
int **split_array(const int *s, int length) {
    int **arr_indexes = malloc(2 * sizeof(int));
    int even_count = 0;
    int odd_count = 0;
    for (int i = 0; i < length; i++) {
        if (s[i] % 2 == 0) {
            even_count += 1;
        } else {
            odd_count += 1;
        }
    }
    int *even_pt = malloc(even_count * sizeof(int));
    int *odd_pt = malloc(odd_count * sizeof(int));
    int even_idx = 0;
    int odd_idx = 0;
    for (int i = 0; i < length; i++) {
        if (s[i] % 2 == 0) {
            even_pt[even_idx] = s[i];
            even_idx += 1;
        } else {
            odd_pt[odd_idx] = s[i];
            odd_idx += 1;
        }
        arr_indexes[0] = even_pt;
        arr_indexes[1] = odd_pt;

    }
    return arr_indexes;
}