diff options
author | emersion <contact@emersion.fr> | 2018-07-27 21:23:50 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-08-02 23:33:59 +0100 |
commit | bbd0fbe573bee16975eb30e7e680e50251a1b47b (patch) | |
tree | be99e695a5bf9b9ba9268a0f503c446d8a088c9b | |
parent | 2ae05756319206a9fbfde29e38bdcb04743486e4 (diff) |
gamma-control-v1: fix fds not closed
-rw-r--r-- | types/wlr_gamma_control_v1.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/types/wlr_gamma_control_v1.c b/types/wlr_gamma_control_v1.c index dfa52115..2163d356 100644 --- a/types/wlr_gamma_control_v1.c +++ b/types/wlr_gamma_control_v1.c @@ -99,6 +99,8 @@ static void gamma_control_handle_set_gamma(struct wl_client *client, gamma_control_send_failed(gamma_control); goto error_table; } + close(fd); + fd = -1; uint16_t *r = table; uint16_t *g = table + ramp_size; @@ -109,8 +111,8 @@ static void gamma_control_handle_set_gamma(struct wl_client *client, gamma_control_send_failed(gamma_control); goto error_table; } - free(table); + return; error_table: |