Merge pull request #533 from martinetd/wl_array_add

ENOMEM checks: consistently check wl_array_add return
This commit is contained in:
Drew DeVault 2017-12-28 07:44:21 -08:00 committed by GitHub
commit bb24895a2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 48 additions and 8 deletions

View file

@ -95,7 +95,7 @@ static void handle_global(void *data, struct wl_registry *registry,
static struct screenshooter_output *output;
if (strcmp(interface, "wl_output") == 0) {
output = calloc(1, sizeof *output);
output = calloc(1, sizeof(*output));
output->output = wl_registry_bind(registry, name, &wl_output_interface,
1);
wl_list_insert(&output_list, &output->link);