Skip to content

Commit

Permalink
ilmControl: fix memory corruption at input listener
Browse files Browse the repository at this point in the history
Allocate memory in the size of accepted_seat struct instead of
size of a pointer of the struct

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
  • Loading branch information
eucan committed Apr 19, 2017
1 parent 6fb8414 commit b933a95
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -934,7 +934,7 @@ input_listener_input_acceptance(void *data,
return;
}

accepted_seat = calloc(1, sizeof(accepted_seat));
accepted_seat = calloc(1, sizeof(*accepted_seat));
if (accepted_seat == NULL) {
fprintf(stderr, "Failed to allocate memory for accepted seat\n");
return;
Expand Down

0 comments on commit b933a95

Please sign in to comment.