-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-TypeSystem-coreclruntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
Also from coverity.
CreateDynamicArrayEnum values aren't freed on error paths. For example:
runtime/src/coreclr/md/compiler/import.cpp
Lines 74 to 84 in 82c7051
| IfFailGo( HENUMInternal::CreateDynamicArrayEnum( mdtMethodDef, &pEnum) ); | |
| // add all methods to the dynamic array | |
| for (index = ridStartMethod; index < ridEndMethod; index++ ) | |
| { | |
| RID rid; | |
| IfFailGo(pMiniMd->GetMethodRid(index, &rid)); | |
| IfFailGo(HENUMInternal::AddElementToEnum( | |
| pEnum, | |
| TokenFromRid(rid, mdtMethodDef))); | |
| } |
The allocated pEnum is not freed in ErrExit.
Are these accepted leaks? Or should we fix them?
Metadata
Metadata
Assignees
Labels
area-TypeSystem-coreclruntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner