C string realloc and concat