mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 14:00:29 +01:00
zalloc all events to make sure we have defined defaults
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
39469df2fb
commit
1ef6938257
1 changed files with 8 additions and 8 deletions
|
|
@ -557,7 +557,7 @@ notify_added_device(struct libinput_device *device)
|
|||
{
|
||||
struct libinput_event_device_notify *added_device_event;
|
||||
|
||||
added_device_event = malloc(sizeof *added_device_event);
|
||||
added_device_event = zalloc(sizeof *added_device_event);
|
||||
if (!added_device_event)
|
||||
return;
|
||||
|
||||
|
|
@ -575,7 +575,7 @@ notify_removed_device(struct libinput_device *device)
|
|||
{
|
||||
struct libinput_event_device_notify *removed_device_event;
|
||||
|
||||
removed_device_event = malloc(sizeof *removed_device_event);
|
||||
removed_device_event = zalloc(sizeof *removed_device_event);
|
||||
if (!removed_device_event)
|
||||
return;
|
||||
|
||||
|
|
@ -596,7 +596,7 @@ keyboard_notify_key(struct libinput_device *device,
|
|||
{
|
||||
struct libinput_event_keyboard *key_event;
|
||||
|
||||
key_event = malloc(sizeof *key_event);
|
||||
key_event = zalloc(sizeof *key_event);
|
||||
if (!key_event)
|
||||
return;
|
||||
|
||||
|
|
@ -619,7 +619,7 @@ pointer_notify_motion(struct libinput_device *device,
|
|||
{
|
||||
struct libinput_event_pointer *motion_event;
|
||||
|
||||
motion_event = malloc(sizeof *motion_event);
|
||||
motion_event = zalloc(sizeof *motion_event);
|
||||
if (!motion_event)
|
||||
return;
|
||||
|
||||
|
|
@ -642,7 +642,7 @@ pointer_notify_motion_absolute(struct libinput_device *device,
|
|||
{
|
||||
struct libinput_event_pointer *motion_absolute_event;
|
||||
|
||||
motion_absolute_event = malloc(sizeof *motion_absolute_event);
|
||||
motion_absolute_event = zalloc(sizeof *motion_absolute_event);
|
||||
if (!motion_absolute_event)
|
||||
return;
|
||||
|
||||
|
|
@ -665,7 +665,7 @@ pointer_notify_button(struct libinput_device *device,
|
|||
{
|
||||
struct libinput_event_pointer *button_event;
|
||||
|
||||
button_event = malloc(sizeof *button_event);
|
||||
button_event = zalloc(sizeof *button_event);
|
||||
if (!button_event)
|
||||
return;
|
||||
|
||||
|
|
@ -688,7 +688,7 @@ pointer_notify_axis(struct libinput_device *device,
|
|||
{
|
||||
struct libinput_event_pointer *axis_event;
|
||||
|
||||
axis_event = malloc(sizeof *axis_event);
|
||||
axis_event = zalloc(sizeof *axis_event);
|
||||
if (!axis_event)
|
||||
return;
|
||||
|
||||
|
|
@ -713,7 +713,7 @@ touch_notify_touch(struct libinput_device *device,
|
|||
{
|
||||
struct libinput_event_touch *touch_event;
|
||||
|
||||
touch_event = malloc(sizeof *touch_event);
|
||||
touch_event = zalloc(sizeof *touch_event);
|
||||
if (!touch_event)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue