Fix three coverity complaints

Two resource leaks, one uninitialized variable.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2019-03-25 15:15:13 +10:00
parent 2edc7e37ac
commit 26702e4d73
2 changed files with 4 additions and 4 deletions

View file

@ -1440,11 +1440,11 @@ litest_create(enum litest_device_type which,
break;
}
}
free(abs);
free(events);
}
free(abs);
free(events);
path = libevdev_uinput_get_devnode(d->uinput);
litest_assert(path != NULL);
fd = open(path, O_RDWR|O_NONBLOCK);

View file

@ -1841,7 +1841,7 @@ select_device(void)
int ndev, selected_device;
int rc;
char *device_path;
bool has_eaccess;
bool has_eaccess = false;
int available_devices = 0;
ndev = scandir("/dev/input", &namelist, is_event_node, versionsort);