Fix memory leaks in subsurf

This commit is contained in:
Campbell Barton 2014-06-18 12:07:20 +10:00
parent 528673436b
commit 3a101d8c92
1 changed files with 2 additions and 0 deletions

View File

@ -1457,6 +1457,7 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3])
edgeMap2[GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e))] = e;
}
ccgEdgeIterator_free(ei);
totface = ccgSubSurf_getNumFaces(ss);
faceMap2 = MEM_mallocN(totface * sizeof(*faceMap2), "facemap");
@ -3542,6 +3543,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
ccgdm->edgeMap[GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e))].edge = e;
}
ccgEdgeIterator_free(ei);
totface = ccgSubSurf_getNumFaces(ss);
ccgdm->faceMap = MEM_mallocN(totface * sizeof(*ccgdm->faceMap), "faceMap");