diff options
author | Isaac Freund <ifreund@ifreund.xyz> | 2020-11-28 17:41:28 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-11-28 18:24:14 +0100 |
commit | 78e9e692e81d5f4b269d6f125e920011de6bb39e (patch) | |
tree | 1aa76af34a97dea07bdd477ca5508742c295c107 | |
parent | 6485fadc16a45ccbcbdcc76b064bcd2ee6256cda (diff) |
wlr-output-management: add missing NULL check
Handle allocation failure in wlr_output_configuration_head_v1_create
-rw-r--r-- | types/wlr_output_management_v1.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/types/wlr_output_management_v1.c b/types/wlr_output_management_v1.c index 728abee7..312057ed 100644 --- a/types/wlr_output_management_v1.c +++ b/types/wlr_output_management_v1.c @@ -118,6 +118,9 @@ struct wlr_output_configuration_head_v1 * struct wlr_output_configuration_v1 *config, struct wlr_output *output) { struct wlr_output_configuration_head_v1 *config_head = config_head_create(config, output); + if (config_head == NULL) { + return NULL; + } config_head->state.enabled = output->enabled; config_head->state.mode = output->current_mode; config_head->state.custom_mode.width = output->width; |