mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-22 13:53:02 +05:30
Added missing free for newBatches malloc
This commit is contained in:
parent
2257f7f034
commit
3d20691b81
@ -21,8 +21,10 @@ void writemesh(const struct MeshHeader *mh,
|
||||
write(fn, (char*)(&h), sizeof(struct Header));
|
||||
append(fn, (char*)(&newmh), sizeof(struct MeshHeader));
|
||||
|
||||
struct BatchData * newBatches = malloc(newmh.numBatch * sizeof(struct BatchData));
|
||||
|
||||
|
||||
// batch data the same treatment.
|
||||
struct BatchData * newBatches = malloc(newmh.numBatch * sizeof(struct BatchData));
|
||||
uint64_t previousBatch = 0;
|
||||
for (int i = 0; i < newmh.numBatch; i++) {
|
||||
newBatches[i] = (m -> b) -> bd[i];
|
||||
@ -51,6 +53,7 @@ void writemesh(const struct MeshHeader *mh,
|
||||
append(fn, (char*)(m -> b[i].vd.bw), sizeof(struct BoneWeights) * nVertices);
|
||||
}
|
||||
|
||||
free(newBatches);
|
||||
free(fn);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user