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:
parent
0032954c75
commit
30226eb1fb
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue