diff options
author | Simon Ser <contact@emersion.fr> | 2020-08-05 18:00:29 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-08-05 18:18:11 +0200 |
commit | 30226eb1fbf2da0f1d6ff6e0c230541e95dfb46b (patch) | |
tree | 0138cbe3528624acb6911235c963a3d9916c5cd6 | |
parent | 0032954c75050276375a151389a25d4717ef1cd5 (diff) |
gamma-control-v1: fix use-after-free in gamma_control_handle_set_gamma
gamma_control_send_failed destroys gamma_control.
-rw-r--r-- | types/wlr_gamma_control_v1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/types/wlr_gamma_control_v1.c b/types/wlr_gamma_control_v1.c index 48356ee1..f96c84aa 100644 --- a/types/wlr_gamma_control_v1.c +++ b/types/wlr_gamma_control_v1.c @@ -107,8 +107,8 @@ static void gamma_control_handle_set_gamma(struct wl_client *client, wlr_output_set_gamma(gamma_control->output, ramp_size, r, g, b); if (!wlr_output_test(gamma_control->output)) { - gamma_control_send_failed(gamma_control); wlr_output_rollback(gamma_control->output); + gamma_control_send_failed(gamma_control); goto error_table; } free(table); |