diff options
author | Ryan Dwyer <RyanDwyer@users.noreply.github.com> | 2018-07-04 23:21:41 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-04 23:21:41 +1000 |
commit | 7efeacf16c088f45feae3190d1f33fa3273eb6ea (patch) | |
tree | 75dd1aba08ea3351523d3db33b74eba85cc9419e /sway/desktop | |
parent | f414885b1d1f09b92619dcedc4ec2d20b257a9aa (diff) | |
parent | 50b401677be27103e7c4a67ca455d286f562ff7c (diff) |
Merge pull request #2208 from RyanDwyer/instruction-use-after-free
Fix use after free in transaction code
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/transaction.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index 7b670aec..b4d796cb 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c @@ -377,7 +377,9 @@ static void set_instructions_ready(struct sway_view *view, int index) { for (int i = 0; i <= index; ++i) { struct sway_transaction_instruction *instruction = view->swayc->instructions->items[i]; - set_instruction_ready(instruction); + if (!instruction->ready) { + set_instruction_ready(instruction); + } } } |