klocwork: fix risk issues

This commit is contained in:
Hong, Yang A
2022-05-31 06:30:18 +00:00
parent 7bf5a9f5cd
commit f194a85d51
16 changed files with 62 additions and 11 deletions

View File

@@ -562,6 +562,10 @@ bool handleMixedPrefixCliche(const NGHolder &h, RoseGraph &g, RoseVertex v,
DEBUG_PRINTF("woot?\n");
shared_ptr<NGHolder> h_new = make_shared<NGHolder>();
if (!h_new) {
assert(0);
throw std::bad_alloc();
}
unordered_map<NFAVertex, NFAVertex> rhs_map;
vector<NFAVertex> exits_vec;
insert(&exits_vec, exits_vec.end(), exits);