mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Fix a bunch of mistakes detected with scan-build
This commit is contained in:
parent
ac78c6642a
commit
bb79ada49f
10 changed files with 19 additions and 9 deletions
|
|
@ -66,10 +66,11 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
|
|||
int product = libinput_device_get_id_product(libinput_dev);
|
||||
const char *name = libinput_device_get_name(libinput_dev);
|
||||
struct wl_list *wlr_devices = calloc(1, sizeof(struct wl_list));
|
||||
wl_list_init(wlr_devices);
|
||||
if (!wlr_devices) {
|
||||
goto fail;
|
||||
wlr_log(L_ERROR, "Allocation failed");
|
||||
return;
|
||||
}
|
||||
wl_list_init(wlr_devices);
|
||||
wlr_log(L_DEBUG, "Added %s [%d:%d]", name, vendor, product);
|
||||
|
||||
if (libinput_device_has_capability(libinput_dev, LIBINPUT_DEVICE_CAP_KEYBOARD)) {
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ static size_t explicit_find_gpus(struct wlr_session *session,
|
|||
}
|
||||
} while ((ptr = strtok_r(NULL, ":", &save)));
|
||||
|
||||
free(ptr);
|
||||
free(gpus);
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue