>>615
- top[i] = malloc(sizeof(float));
+ top[i] = malloc(sizeof(float)*3);
じゃないか?