gamma-control-v1: fix use-after-free in gamma_control_handle_set_gamma

gamma_control_send_failed destroys gamma_control.
This commit is contained in:
Simon Ser 2020-08-05 18:00:29 +02:00
parent 0032954c75
commit 30226eb1fb
1 changed files with 1 additions and 1 deletions

View File

@ -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);