Commit f21dc4a8 authored by Brad King's avatar Brad King
Browse files

cmState: Avoid accumulating policy stack storage for short-lived scopes

We enforce policy push/pop balance around any scope that pushes/pops a
snapshot.  Therefore a snapshot may never reference entries of
PolicyStack that were created in nested scopes.  Free storage of
short-lived policy stack entries when they are popped.
parent bc1d3a8a
......@@ -1124,7 +1124,7 @@ bool cmState::Snapshot::PopPolicy()
{
return false;
}
++pos->Policies;
pos->Policies = this->State->PolicyStack.Pop(pos->Policies);
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment