Skip to content

Commit

Permalink
rgw: Fix the last policy use-after-free
Browse files Browse the repository at this point in the history
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
  • Loading branch information
adamemerson committed Aug 7, 2017
1 parent 97d026d commit 5353d95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rgw/rgw_iam_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,9 @@ bool ParseState::key(const char* s, size_t l) {
if (w->kind == TokenKind::cond_op) {
auto id = w->id;
auto& t = pp->policy.statements.back();
auto c_ife = cond_ifexists;
pp->s.emplace_back(pp, cond_key);
t.conditions.emplace_back(id, s, l, cond_ifexists);
t.conditions.emplace_back(id, s, l, c_ife);
return true;
} else {
return false;
Expand Down

0 comments on commit 5353d95

Please sign in to comment.