temp = (ATTRIBUTE *)REALLOC((void *)atts, attsSize * sizeof(ATTRIBUTE));
atts = temp;
ってなくらいだからattsはATTRIBUTEの配列なんでないの?