Skip to content

Commit

Permalink
check RI with ref_id before adding ifinite entry
Browse files Browse the repository at this point in the history
  • Loading branch information
dongchen-coder committed Nov 3, 2019
1 parent 2f953ab commit ceccef2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test_facility/utility/reference_lease.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ void RIwithInfinite() {
cnt++;
}
}
(*RI[ref_it->first])[std::numeric_limits<uint64_t>::max()] = cnt;
if (RI.find(ref_it->first) != RI.end()) {
(*RI[ref_it->first])[std::numeric_limits<uint64_t>::max()] = cnt;
} else {
RI[ref_it->first] = new map<uint64_t, uint64_t>;
(*RI[ref_it->first])[std::numeric_limits<uint64_t>::max()] = cnt;
}
}
return;
}
Expand Down

0 comments on commit ceccef2

Please sign in to comment.