Leak found by valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189167
91177308-0d34-0410-b5e6-
96231b3b80d8
constructImportedEntityDIE(TheCU, i->second, ScopeDIE);
}
constructImportedEntityDIE(TheCU, i->second, ScopeDIE);
}
- if (!ScopeDIE) return NULL;
+ if (!ScopeDIE) {
+ std::for_each(Children.begin(), Children.end(), deleter<DIE>);
+ return NULL;
+ }
// Add children
for (SmallVectorImpl<DIE *>::iterator I = Children.begin(),
// Add children
for (SmallVectorImpl<DIE *>::iterator I = Children.begin(),