I think you need to convert `realloc` to `git__realloc`. Or even better, instead of storing `line_index` as an `int *` (which is not even the correct data type since a pointer diff is not guaranteed to be storable in an `int`), store it as a `git_array_t(size_t)` which will take care of the memory management.