Fix mem error (missing realloc)