Fix iterator invalidation bug, identified by Coverity.
llvm-svn: 28257
This commit is contained in:
parent
1fe2d2c600
commit
1971e8a77b
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ Process::GetTimeUsage(TimeValue& elapsed, TimeValue& user_time,
|
|||
TimeValue& sys_time)
|
||||
{
|
||||
elapsed = TimeValue::now();
|
||||
#if defined(HAVE_GETRUSAGE)
|
||||
#if 0 // defined(HAVE_GETRUSAGE)
|
||||
struct rusage usage;
|
||||
::getrusage(RUSAGE_SELF, &usage);
|
||||
user_time = TimeValue(
|
||||
|
|
Loading…
Reference in New Issue