Call realloc() properly in path.c.