Fix iterator invalidation bug, identified by Coverity.
llvm-svn: 28257
This commit is contained in:
@@ -93,6 +93,7 @@ DynamicLibrary::~DynamicLibrary() {
|
||||
if (*I == a_handle) {
|
||||
// Note: don't use the swap/pop_back trick here. Order is important.
|
||||
OpenedHandles.erase(I);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user