backend-vnc: allocate seat with xzalloc
Let xzalloc warn and abort when running out of memory and remove the now unnecessary error handling. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
dfa845b1dd
commit
2b3f5f7821
@ -548,12 +548,8 @@ vnc_new_client(struct nvnc_client *client)
|
||||
peer = xzalloc(sizeof(*peer));
|
||||
peer->client = client;
|
||||
peer->backend = backend;
|
||||
peer->seat = zalloc(sizeof(*peer->seat));
|
||||
peer->seat = xzalloc(sizeof(*peer->seat));
|
||||
|
||||
if (!peer->seat) {
|
||||
weston_log("unable to create a weston_seat\n");
|
||||
return;
|
||||
}
|
||||
weston_seat_init(peer->seat, backend->compositor, seat_name);
|
||||
weston_seat_init_pointer(peer->seat);
|
||||
weston_seat_init_keyboard(peer->seat, backend->xkb_keymap);
|
||||
|
Loading…
Reference in New Issue
Block a user