libinput-1.30.1-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libinput-1.30.1/src/evdev-fallback.c:1412:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(56)’
libinput-1.30.1/src/evdev-fallback.c:1387:1: enter_function: entry to ‘fallback_lid_pair_keyboard’
libinput-1.30.1/src/evdev-fallback.c:1390:46: call_function: inlined call to ‘fallback_dispatch’ from ‘fallback_lid_pair_keyboard’
libinput-1.30.1/src/evdev-fallback.c:1394:14: branch_false: ...to here
libinput-1.30.1/src/evdev-fallback.c:1394:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev-fallback.c:1395:14: branch_false: ...to here
libinput-1.30.1/src/evdev-fallback.c:1394:13: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev-fallback.c:1398:13: branch_false: ...to here
libinput-1.30.1/src/evdev-fallback.c:1398:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev-fallback.c:1401:9: branch_false: ...to here
libinput-1.30.1/src/evdev-fallback.c:1403:20: branch_false: following ‘false’ branch (when ‘count != 4’)...
libinput-1.30.1/src/evdev-fallback.c:1401:9: branch_false: ...to here
libinput-1.30.1/src/evdev-fallback.c:1410:15: call_function: calling ‘zalloc’ from ‘fallback_lid_pair_keyboard’
libinput-1.30.1/src/evdev-fallback.c:1410:15: return_function: returning to ‘fallback_lid_pair_keyboard’ from ‘zalloc’
libinput-1.30.1/src/evdev-fallback.c:1412:9: throw: if ‘libinput_device_init_event_listener’ throws an exception...
libinput-1.30.1/src/evdev-fallback.c:1412:9: danger: ‘zalloc(56)’ leaks here; was allocated at [(18)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/17)
# 1410|   	kbd = zalloc(sizeof(*kbd));
# 1411|   	kbd->device = keyboard;
# 1412|-> 	libinput_device_init_event_listener(&kbd->listener);
# 1413|   	list_insert(&dispatch->lid.paired_keyboard_list, &kbd->link);
# 1414|   	evdev_log_debug(lid_switch,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libinput-1.30.1/src/evdev-fallback.c:1675:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc((long unsigned int)libevdev_get_num_slots(*device.evdev) * 32)’
libinput-1.30.1/src/evdev-fallback.c:1650:1: enter_function: entry to ‘fallback_dispatch_init_slots’
libinput-1.30.1/src/evdev-fallback.c:1659:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev-fallback.c:1660:14: branch_false: ...to here
libinput-1.30.1/src/evdev-fallback.c:1659:13: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev-fallback.c:1661:14: branch_false: ...to here
libinput-1.30.1/src/evdev-fallback.c:1659:13: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev-fallback.c:1667:14: branch_false: ...to here
libinput-1.30.1/src/evdev-fallback.c:1667:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev-fallback.c:1670:44: branch_false: ...to here
libinput-1.30.1/src/evdev-fallback.c:1672:17: call_function: calling ‘zalloc’ from ‘fallback_dispatch_init_slots’
libinput-1.30.1/src/evdev-fallback.c:1672:17: return_function: returning to ‘fallback_dispatch_init_slots’ from ‘zalloc’
libinput-1.30.1/src/evdev-fallback.c:1674:24: branch_true: following ‘true’ branch...
libinput-1.30.1/src/evdev-fallback.c:1675:22: branch_true: ...to here
libinput-1.30.1/src/evdev-fallback.c:1677:25: throw: if ‘libevdev_get_slot_value’ throws an exception...
libinput-1.30.1/src/evdev-fallback.c:1675:22: danger: ‘zalloc((long unsigned int)libevdev_get_num_slots(*device.evdev) * 32)’ leaks here; was allocated at [(14)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/13)
# 1673|   
# 1674|   	for (slot = 0; slot < num_slots; ++slot) {
# 1675|-> 		slots[slot].seat_slot = -1;
# 1676|   		slots[slot].point.x =
# 1677|   			libevdev_get_slot_value(evdev, slot, ABS_MT_POSITION_X);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libinput-1.30.1/src/evdev-fallback.c:1677:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc((long unsigned int)libevdev_get_num_slots(*device.evdev) * 32) + (long unsigned int)slot * 32’
libinput-1.30.1/src/evdev-fallback.c:1769:1: enter_function: entry to ‘fallback_dispatch_create’
libinput-1.30.1/src/evdev-fallback.c:1774:20: call_function: calling ‘zalloc’ from ‘fallback_dispatch_create’
libinput-1.30.1/src/evdev-fallback.c:1774:20: return_function: returning to ‘fallback_dispatch_create’ from ‘zalloc’
libinput-1.30.1/src/evdev-fallback.c:1782:9: call_function: calling ‘fallback_dispatch_init_abs’ from ‘fallback_dispatch_create’
libinput-1.30.1/src/evdev-fallback.c:1782:9: return_function: returning to ‘fallback_dispatch_create’ from ‘fallback_dispatch_init_abs’
libinput-1.30.1/src/evdev-fallback.c:1783:13: call_function: calling ‘fallback_dispatch_init_slots’ from ‘fallback_dispatch_create’
# 1675|   		slots[slot].seat_slot = -1;
# 1676|   		slots[slot].point.x =
# 1677|-> 			libevdev_get_slot_value(evdev, slot, ABS_MT_POSITION_X);
# 1678|   		slots[slot].point.y =
# 1679|   			libevdev_get_slot_value(evdev, slot, ABS_MT_POSITION_Y);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libinput-1.30.1/src/evdev-fallback.c:1779:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(736)’
libinput-1.30.1/src/evdev-fallback.c:1769:1: enter_function: entry to ‘fallback_dispatch_create’
libinput-1.30.1/src/evdev-fallback.c:1774:20: call_function: calling ‘zalloc’ from ‘fallback_dispatch_create’
libinput-1.30.1/src/evdev-fallback.c:1774:20: return_function: returning to ‘fallback_dispatch_create’ from ‘zalloc’
libinput-1.30.1/src/evdev-fallback.c:1779:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/evdev-fallback.c:1779:9: danger: ‘zalloc(736)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/5)
# 1777|   	dispatch->base.interface = &fallback_interface;
# 1778|   	dispatch->pending_event = EVDEV_NONE;
# 1779|-> 	list_init(&dispatch->lid.paired_keyboard_list);
# 1780|   
# 1781|   	fallback_dispatch_init_rel(dispatch, device);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libinput-1.30.1/src/evdev-frame.h:442:9: warning[-Wanalyzer-malloc-leak]: leak of ‘plugin_queued_event_new(frame,  device)’
libinput-1.30.1/src/libinput-plugin.c:741:1: enter_function: entry to ‘plugin_system_notify_evdev_frame’
libinput-1.30.1/src/libinput-plugin.c:754:49: call_function: calling ‘plugin_queued_event_new’ from ‘plugin_system_notify_evdev_frame’
libinput-1.30.1/src/libinput-plugin.c:754:49: return_function: returning to ‘plugin_system_notify_evdev_frame’ from ‘plugin_queued_event_new’
libinput-1.30.1/src/evdev-frame.h:442:9: danger: ‘plugin_queued_event_new(frame,  device)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  440|   evdev_frame_ref(struct evdev_frame *frame)
#  441|   {
#  442|-> 	assert(frame->refcount > 0);
#  443|   	++frame->refcount;
#  444|   	return frame;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
libinput-1.30.1/src/evdev-frame.h:442:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.30.1/src/libinput-plugin.c:741:1: enter_function: entry to ‘plugin_system_notify_evdev_frame’
libinput-1.30.1/src/libinput-plugin.c:754:49: call_function: calling ‘plugin_queued_event_new’ from ‘plugin_system_notify_evdev_frame’
#  440|   evdev_frame_ref(struct evdev_frame *frame)
#  441|   {
#  442|-> 	assert(frame->refcount > 0);
#  443|   	++frame->refcount;
#  444|   	return frame;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
libinput-1.30.1/src/evdev-tablet-pad-leds.c:176:31: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(112)’
libinput-1.30.1/src/evdev-tablet-pad-leds.c:584:1: enter_function: entry to ‘pad_init_fallback_group’
libinput-1.30.1/src/evdev-tablet-pad-leds.c:588:17: call_function: calling ‘pad_group_new’ from ‘pad_init_fallback_group’
#  174|   
#  175|   	group = zalloc(sizeof *group);
#  176|-> 	group->base.device = &pad->device->base;
#  177|   	group->base.refcount = 1;
#  178|   	group->base.index = group_index;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
libinput-1.30.1/src/evdev-tablet-pad-leds.c:233:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.30.1/src/evdev-tablet-pad-leds.c:440:1: enter_function: entry to ‘pad_init_leds_from_libwacom’
libinput-1.30.1/src/evdev-tablet-pad-leds.c:446:12: branch_false: following ‘false’ branch (when ‘wacom’ is non-NULL)...
libinput-1.30.1/src/evdev-tablet-pad-leds.c:446:12: branch_false: ...to here
libinput-1.30.1/src/evdev-tablet-pad-leds.c:449:25: branch_true: following ‘true’ branch...
libinput-1.30.1/src/evdev-tablet-pad-leds.c:450:28: branch_true: ...to here
libinput-1.30.1/src/evdev-tablet-pad-leds.c:458:20: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev-tablet-pad-leds.c:462:25: call_function: inlined call to ‘pad_button_target_mode’ from ‘pad_init_leds_from_libwacom’
libinput-1.30.1/src/evdev-tablet-pad-leds.c:502:20: branch_true: following ‘true’ branch (when ‘nmodes > 1’)...
libinput-1.30.1/src/evdev-tablet-pad-leds.c:504:33: branch_true: ...to here
libinput-1.30.1/src/evdev-tablet-pad-leds.c:504:33: call_function: inlined call to ‘pad_get_mode_group’ from ‘pad_init_leds_from_libwacom’
libinput-1.30.1/src/evdev-tablet-pad-leds.c:505:28: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev-tablet-pad-leds.c:521:38: branch_false: ...to here
libinput-1.30.1/src/evdev-tablet-pad-leds.c:521:38: call_function: calling ‘pad_led_group_add_toggle_button’ from ‘pad_init_leds_from_libwacom’
#  231|   
#  232|   	button->target_mode = mode;
#  233|-> 	list_append(&group->toggle_button_list, &button->link);
#  234|   	group->base.toggle_button_mask |= bit(button_index);
#  235|   	group->base.button_mask |= bit(button_index);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
libinput-1.30.1/src/evdev-totem.c:105:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(368)’
libinput-1.30.1/src/evdev-totem.c:78:1: enter_function: entry to ‘totem_new_tool’
libinput-1.30.1/src/evdev-totem.c:83:16: call_function: calling ‘zalloc’ from ‘totem_new_tool’
libinput-1.30.1/src/evdev-totem.c:83:16: return_function: returning to ‘totem_new_tool’ from ‘zalloc’
libinput-1.30.1/src/evdev-totem.c:105:9: throw: if ‘list_insert’ throws an exception...
libinput-1.30.1/src/evdev-totem.c:105:9: danger: ‘zalloc(368)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  103|   	set_bit(tool->buttons, BTN_0);
#  104|   
#  105|-> 	list_insert(&libinput->tool_list, &tool->link);
#  106|   
#  107|   	return tool;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
libinput-1.30.1/src/evdev.c:2237:16: warning[-Wanalyzer-malloc-leak]: leak of ‘str_sanitize(udev_device_get_sysname(udev_device))’
libinput-1.30.1/src/evdev.c:2241:1: enter_function: entry to ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: call_function: calling ‘str_sanitize’ from ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: return_function: returning to ‘evdev_device_create’ from ‘str_sanitize’
libinput-1.30.1/src/evdev.c:2251:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev.c:2256:13: branch_false: ...to here
libinput-1.30.1/src/evdev.c:2256:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev.c:2264:14: branch_false: ...to here
libinput-1.30.1/src/evdev.c:2264:14: throw: if ‘open_restricted’ throws an exception...
libinput-1.30.1/src/evdev.c:2237:16: danger: ‘str_sanitize(udev_device_get_sysname(udev_device))’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
# 2235|   	value = udev_device_get_property_value(udev_device, "LIBINPUT_IGNORE_DEVICE");
# 2236|   
# 2237|-> 	return value && !streq(value, "0");
# 2238|   }
# 2239|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
libinput-1.30.1/src/evdev.c:2252:17: warning[-Wanalyzer-malloc-leak]: leak of ‘str_sanitize(udev_device_get_sysname(udev_device))’
libinput-1.30.1/src/evdev.c:2241:1: enter_function: entry to ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: call_function: calling ‘str_sanitize’ from ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: return_function: returning to ‘evdev_device_create’ from ‘str_sanitize’
libinput-1.30.1/src/evdev.c:2251:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/evdev.c:2252:17: branch_true: ...to here
libinput-1.30.1/src/evdev.c:2252:17: throw: if ‘log_msg’ throws an exception...
libinput-1.30.1/src/evdev.c:2252:17: danger: ‘str_sanitize(udev_device_get_sysname(udev_device))’ leaks here; was allocated at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
# 2250|   
# 2251|   	if (!devnode) {
# 2252|-> 		log_info(libinput, "%s: no device node associated\n", sysname);
# 2253|   		goto err;
# 2254|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libinput-1.30.1/src/evdev.c:2256:13: warning[-Wanalyzer-malloc-leak]: leak of ‘str_sanitize(udev_device_get_sysname(udev_device))’
libinput-1.30.1/src/evdev.c:2241:1: enter_function: entry to ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: call_function: calling ‘str_sanitize’ from ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: return_function: returning to ‘evdev_device_create’ from ‘str_sanitize’
libinput-1.30.1/src/evdev.c:2251:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev.c:2256:13: branch_false: ...to here
libinput-1.30.1/src/evdev.c:2256:13: call_function: calling ‘udev_device_should_be_ignored’ from ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2256:13: danger: ‘str_sanitize(udev_device_get_sysname(udev_device))’ leaks here; was allocated at [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8)
# 2254|   	}
# 2255|   
# 2256|-> 	if (udev_device_should_be_ignored(udev_device)) {
# 2257|   		log_debug(libinput, "%s: device is ignored\n", sysname);
# 2258|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
libinput-1.30.1/src/evdev.c:2280:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(1856)’
libinput-1.30.1/src/evdev.c:2241:1: enter_function: entry to ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: call_function: calling ‘str_sanitize’ from ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: return_function: returning to ‘evdev_device_create’ from ‘str_sanitize’
libinput-1.30.1/src/evdev.c:2251:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev.c:2256:13: branch_false: ...to here
libinput-1.30.1/src/evdev.c:2256:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev.c:2264:14: branch_false: ...to here
libinput-1.30.1/src/evdev.c:2265:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev.c:2274:14: branch_false: ...to here
libinput-1.30.1/src/evdev.c:2274:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/evdev.c:2277:18: branch_true: ...to here
libinput-1.30.1/src/evdev.c:2277:18: call_function: calling ‘zalloc’ from ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2277:18: return_function: returning to ‘evdev_device_create’ from ‘zalloc’
libinput-1.30.1/src/evdev.c:2280:9: throw: if ‘libinput_device_init’ throws an exception...
libinput-1.30.1/src/evdev.c:2280:9: danger: ‘zalloc(1856)’ leaks here; was allocated at [(19)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/18)
# 2278|   	device->sysname = steal(&sysname);
# 2279|   
# 2280|-> 	libinput_device_init(&device->base, seat);
# 2281|   	libinput_seat_ref(seat);
# 2282|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
libinput-1.30.1/src/evdev.h:393:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(1168)’
libinput-1.30.1/src/evdev-tablet.c:3037:1: enter_function: entry to ‘evdev_tablet_create’
libinput-1.30.1/src/evdev-tablet.c:3044:18: call_function: calling ‘zalloc’ from ‘evdev_tablet_create’
libinput-1.30.1/src/evdev-tablet.c:3044:18: return_function: returning to ‘evdev_tablet_create’ from ‘zalloc’
libinput-1.30.1/src/evdev-tablet.c:3046:13: call_function: calling ‘tablet_init’ from ‘evdev_tablet_create’
#  391|   evdev_libinput_context(const struct evdev_device *device)
#  392|   {
#  393|-> 	return device->base.seat->libinput;
#  394|   }
#  395|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libinput-1.30.1/src/evdev.h:393:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(3432)’
libinput-1.30.1/src/evdev-tablet-pad.c:857:1: enter_function: entry to ‘evdev_tablet_pad_create’
libinput-1.30.1/src/evdev-tablet-pad.c:861:15: call_function: calling ‘zalloc’ from ‘evdev_tablet_pad_create’
libinput-1.30.1/src/evdev-tablet-pad.c:861:15: return_function: returning to ‘evdev_tablet_pad_create’ from ‘zalloc’
libinput-1.30.1/src/evdev-tablet-pad.c:863:13: call_function: calling ‘pad_init’ from ‘evdev_tablet_pad_create’
#  391|   evdev_libinput_context(const struct evdev_device *device)
#  392|   {
#  393|-> 	return device->base.seat->libinput;
#  394|   }
#  395|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def16]
libinput-1.30.1/src/evdev.h:777:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.30.1/src/evdev-mt-touchpad-thumb.c:159:1: enter_function: entry to ‘tp_thumb_suppress’
libinput-1.30.1/src/evdev-mt-touchpad-thumb.c:168:9: call_function: calling ‘tp_thumb_set_state’ from ‘tp_thumb_suppress’
#  775|   #pragma GCC diagnostic push
#  776|   #pragma GCC diagnostic ignored "-Wformat-nonliteral"
#  777|-> 	log_msg_va(evdev_libinput_context(device), priority, buf, args);
#  778|   #pragma GCC diagnostic pop
#  779|   	va_end(args);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def17]
libinput-1.30.1/src/evdev.h:815:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.30.1/src/evdev-tablet-pad.c:339:1: enter_function: entry to ‘pad_strip_get_mode_group’
libinput-1.30.1/src/evdev-tablet-pad.c:349:9: call_function: calling ‘evdev_log_msg_ratelimit’ from ‘pad_strip_get_mode_group’
#  813|   #pragma GCC diagnostic push
#  814|   #pragma GCC diagnostic ignored "-Wformat-nonliteral"
#  815|-> 	log_msg_va(evdev_libinput_context(device), priority, buf, args);
#  816|   #pragma GCC diagnostic pop
#  817|   	va_end(args);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libinput-1.30.1/src/filter-custom.c:46:13: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/filter-custom.c:424:1: enter_function: entry to ‘create_custom_accelerator_filter’
libinput-1.30.1/src/filter-custom.c:426:40: call_function: calling ‘zalloc’ from ‘create_custom_accelerator_filter’
libinput-1.30.1/src/filter-custom.c:426:40: return_function: returning to ‘create_custom_accelerator_filter’ from ‘zalloc’
libinput-1.30.1/src/filter-custom.c:434:29: call_function: calling ‘create_custom_accel_function’ from ‘create_custom_accelerator_filter’
libinput-1.30.1/src/filter-custom.c:434:29: return_function: returning to ‘create_custom_accelerator_filter’ from ‘create_custom_accel_function’
libinput-1.30.1/src/filter-custom.c:46:13: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#   44|   create_custom_accel_function(double step, const double *points, size_t npoints)
#   45|   {
#   46|-> 	if (npoints < LIBINPUT_ACCEL_NPOINTS_MIN ||
#   47|   	    npoints > LIBINPUT_ACCEL_NPOINTS_MAX)
#   48|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libinput-1.30.1/src/filter-flat.c:152:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.30.1/src/filter-flat.c:144:1: enter_function: entry to ‘create_pointer_accelerator_filter_flat’
libinput-1.30.1/src/filter-flat.c:148:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_flat’
libinput-1.30.1/src/filter-flat.c:148:18: return_function: returning to ‘create_pointer_accelerator_filter_flat’ from ‘zalloc’
libinput-1.30.1/src/filter-flat.c:152:16: danger: ‘zalloc(32)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  150|   	filter->dpi = dpi;
#  151|   
#  152|-> 	return &filter->base;
#  153|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
libinput-1.30.1/src/filter-low-dpi.c:233:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/filter-low-dpi.c:226:1: enter_function: entry to ‘create_default_filter’
libinput-1.30.1/src/filter-low-dpi.c:230:18: call_function: calling ‘zalloc’ from ‘create_default_filter’
libinput-1.30.1/src/filter-low-dpi.c:230:18: return_function: returning to ‘create_default_filter’ from ‘zalloc’
libinput-1.30.1/src/filter-low-dpi.c:233:9: throw: if ‘trackers_init’ throws an exception...
libinput-1.30.1/src/filter-low-dpi.c:233:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  231|   	filter->last_velocity = 0.0;
#  232|   
#  233|-> 	trackers_init(&filter->trackers, use_velocity_averaging ? 16 : 2);
#  234|   
#  235|   	filter->threshold = DEFAULT_THRESHOLD;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libinput-1.30.1/src/filter-mouse.c:299:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/filter-mouse.c:292:1: enter_function: entry to ‘create_default_filter’
libinput-1.30.1/src/filter-mouse.c:296:18: call_function: calling ‘zalloc’ from ‘create_default_filter’
libinput-1.30.1/src/filter-mouse.c:296:18: return_function: returning to ‘create_default_filter’ from ‘zalloc’
libinput-1.30.1/src/filter-mouse.c:299:9: throw: if ‘trackers_init’ throws an exception...
libinput-1.30.1/src/filter-mouse.c:299:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  297|   	filter->last_velocity = 0.0;
#  298|   
#  299|-> 	trackers_init(&filter->trackers, use_velocity_averaging ? 16 : 2);
#  300|   
#  301|   	filter->threshold = DEFAULT_THRESHOLD;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libinput-1.30.1/src/filter-tablet.c:163:50: warning[-Wanalyzer-malloc-leak]: leak of ‘create_tablet_filter_flat(xres,  yres)’
libinput-1.30.1/src/filter-tablet.c:170:1: enter_function: entry to ‘create_pointer_accelerator_filter_tablet’
libinput-1.30.1/src/filter-tablet.c:174:18: call_function: calling ‘create_tablet_filter_flat’ from ‘create_pointer_accelerator_filter_tablet’
libinput-1.30.1/src/filter-tablet.c:174:18: return_function: returning to ‘create_pointer_accelerator_filter_tablet’ from ‘create_tablet_filter_flat’
libinput-1.30.1/src/filter-tablet.c:163:50: danger: ‘create_tablet_filter_flat(xres,  yres)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  161|   	filter->xres = xres;
#  162|   	filter->yres = yres;
#  163|-> 	filter->xres_scale = DEFAULT_MOUSE_DPI / (25.4 * xres);
#  164|   	filter->yres_scale = DEFAULT_MOUSE_DPI / (25.4 * yres);
#  165|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libinput-1.30.1/src/filter-touchpad-flat.c:155:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.30.1/src/filter-touchpad-flat.c:147:1: enter_function: entry to ‘create_pointer_accelerator_filter_touchpad_flat’
libinput-1.30.1/src/filter-touchpad-flat.c:151:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_touchpad_flat’
libinput-1.30.1/src/filter-touchpad-flat.c:151:18: return_function: returning to ‘create_pointer_accelerator_filter_touchpad_flat’ from ‘zalloc’
libinput-1.30.1/src/filter-touchpad-flat.c:155:16: danger: ‘zalloc(32)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  153|   	filter->dpi = dpi;
#  154|   
#  155|-> 	return &filter->base;
#  156|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libinput-1.30.1/src/filter-touchpad-x230.c:329:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/filter-touchpad-x230.c:320:1: enter_function: entry to ‘create_pointer_accelerator_filter_lenovo_x230’
libinput-1.30.1/src/filter-touchpad-x230.c:324:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_lenovo_x230’
libinput-1.30.1/src/filter-touchpad-x230.c:324:18: return_function: returning to ‘create_pointer_accelerator_filter_lenovo_x230’ from ‘zalloc’
libinput-1.30.1/src/filter-touchpad-x230.c:329:9: throw: if ‘trackers_init’ throws an exception...
libinput-1.30.1/src/filter-touchpad-x230.c:329:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  327|   	filter->last_velocity = 0.0;
#  328|   
#  329|-> 	trackers_init(&filter->trackers, use_velocity_averaging ? 16 : 2);
#  330|   
#  331|   	filter->threshold = X230_THRESHOLD;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libinput-1.30.1/src/filter-touchpad.c:313:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/filter-touchpad.c:303:1: enter_function: entry to ‘create_pointer_accelerator_filter_touchpad’
libinput-1.30.1/src/filter-touchpad.c:310:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_touchpad’
libinput-1.30.1/src/filter-touchpad.c:310:18: return_function: returning to ‘create_pointer_accelerator_filter_touchpad’ from ‘zalloc’
libinput-1.30.1/src/filter-touchpad.c:313:9: throw: if ‘trackers_init’ throws an exception...
libinput-1.30.1/src/filter-touchpad.c:313:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  311|   	filter->last_velocity = 0.0;
#  312|   
#  313|-> 	trackers_init(&filter->trackers, use_velocity_averaging ? 16 : 2);
#  314|   
#  315|   	filter->threshold = 130;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libinput-1.30.1/src/filter-trackpoint-flat.c:168:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.30.1/src/filter-trackpoint-flat.c:160:1: enter_function: entry to ‘create_pointer_accelerator_filter_trackpoint_flat’
libinput-1.30.1/src/filter-trackpoint-flat.c:164:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_trackpoint_flat’
libinput-1.30.1/src/filter-trackpoint-flat.c:164:18: return_function: returning to ‘create_pointer_accelerator_filter_trackpoint_flat’ from ‘zalloc’
libinput-1.30.1/src/filter-trackpoint-flat.c:168:16: danger: ‘zalloc(32)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  166|   	filter->multiplier = multiplier;
#  167|   
#  168|-> 	return &filter->base;
#  169|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libinput-1.30.1/src/filter-trackpoint.c:230:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(64)’
libinput-1.30.1/src/filter-trackpoint.c:205:1: enter_function: entry to ‘create_pointer_accelerator_filter_trackpoint’
libinput-1.30.1/src/filter-trackpoint.c:210:9: branch_true: following ‘true’ branch (when ‘multiplier > 0.0’)...
libinput-1.30.1/src/filter-trackpoint.c:224:18: branch_true: ...to here
libinput-1.30.1/src/filter-trackpoint.c:224:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_trackpoint’
libinput-1.30.1/src/filter-trackpoint.c:224:18: return_function: returning to ‘create_pointer_accelerator_filter_trackpoint’ from ‘zalloc’
libinput-1.30.1/src/filter-trackpoint.c:230:9: throw: if ‘trackers_init’ throws an exception...
libinput-1.30.1/src/filter-trackpoint.c:230:9: danger: ‘zalloc(64)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  228|   	filter->multiplier = multiplier;
#  229|   
#  230|-> 	trackers_init(&filter->trackers, use_velocity_averaging ? 16 : 2);
#  231|   
#  232|   	filter->base.interface = &accelerator_interface_trackpoint;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libinput-1.30.1/src/libinput-plugin-button-debounce.c:858:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.30.1/src/libinput-plugin-button-debounce.c:855:1: enter_function: entry to ‘libinput_debounce_plugin’
libinput-1.30.1/src/libinput-plugin-button-debounce.c:857:38: call_function: calling ‘zalloc’ from ‘libinput_debounce_plugin’
libinput-1.30.1/src/libinput-plugin-button-debounce.c:857:38: return_function: returning to ‘libinput_debounce_plugin’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-button-debounce.c:858:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/libinput-plugin-button-debounce.c:858:9: danger: ‘zalloc(24)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  856|   {
#  857|   	struct plugin_data *plugin = zalloc(sizeof(*plugin));
#  858|-> 	list_init(&plugin->devices);
#  859|   
#  860|   	_unref_(libinput_plugin) *p =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
libinput-1.30.1/src/libinput-plugin-lua.c:184:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/src/libinput-plugin-lua.c:156:1: enter_function: entry to ‘lua_push_evdev_device’
libinput-1.30.1/src/libinput-plugin-lua.c:175:16: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
libinput-1.30.1/src/libinput-plugin-lua.c:176:35: branch_true: ...to here
libinput-1.30.1/src/libinput-plugin-lua.c:177:21: call_function: calling ‘strstartswith’ from ‘lua_push_evdev_device’
libinput-1.30.1/src/libinput-plugin-lua.c:177:21: return_function: returning to ‘lua_push_evdev_device’ from ‘strstartswith’
libinput-1.30.1/src/libinput-plugin-lua.c:177:20: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput-plugin-lua.c:178:22: branch_true: ...to here
libinput-1.30.1/src/libinput-plugin-lua.c:177:21: branch_false: following ‘false’ branch...
libinput-1.30.1/src/libinput-plugin-lua.c:179:22: branch_false: ...to here
libinput-1.30.1/src/libinput-plugin-lua.c:177:21: branch_false: following ‘false’ branch...
libinput-1.30.1/src/libinput-plugin-lua.c:180:45: branch_false: ...to here
libinput-1.30.1/src/libinput-plugin-lua.c:181:28: branch_false: following ‘false’ branch...
libinput-1.30.1/src/libinput-plugin-lua.c:183:41: branch_false: ...to here
libinput-1.30.1/src/libinput-plugin-lua.c:183:41: call_function: calling ‘udev_property_new’ from ‘lua_push_evdev_device’
libinput-1.30.1/src/libinput-plugin-lua.c:183:41: return_function: returning to ‘lua_push_evdev_device’ from ‘udev_property_new’
libinput-1.30.1/src/libinput-plugin-lua.c:184:33: danger: ‘<unknown>’ leaks here; was allocated at [(35)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/34)
#  182|   				struct udev_property *prop =
#  183|   					udev_property_new(key, value);
#  184|-> 				list_insert(&lua_device->udev_properties_list,
#  185|   					    &prop->link);
#  186|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libinput-1.30.1/src/libinput-plugin-lua.c:184:33: warning[-Wanalyzer-malloc-leak]: leak of ‘udev_property_new(udev_list_entry_get_name(e), udev_list_entry_get_value(e))’
libinput-1.30.1/src/libinput-plugin-lua.c:156:1: enter_function: entry to ‘lua_push_evdev_device’
libinput-1.30.1/src/libinput-plugin-lua.c:175:16: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
libinput-1.30.1/src/libinput-plugin-lua.c:176:35: branch_true: ...to here
libinput-1.30.1/src/libinput-plugin-lua.c:177:21: call_function: calling ‘strstartswith’ from ‘lua_push_evdev_device’
libinput-1.30.1/src/libinput-plugin-lua.c:177:21: return_function: returning to ‘lua_push_evdev_device’ from ‘strstartswith’
libinput-1.30.1/src/libinput-plugin-lua.c:177:20: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput-plugin-lua.c:178:22: branch_true: ...to here
libinput-1.30.1/src/libinput-plugin-lua.c:177:21: branch_false: following ‘false’ branch...
libinput-1.30.1/src/libinput-plugin-lua.c:179:22: branch_false: ...to here
libinput-1.30.1/src/libinput-plugin-lua.c:177:21: branch_false: following ‘false’ branch...
libinput-1.30.1/src/libinput-plugin-lua.c:180:45: branch_false: ...to here
libinput-1.30.1/src/libinput-plugin-lua.c:181:28: branch_false: following ‘false’ branch...
libinput-1.30.1/src/libinput-plugin-lua.c:183:41: branch_false: ...to here
libinput-1.30.1/src/libinput-plugin-lua.c:183:41: call_function: calling ‘udev_property_new’ from ‘lua_push_evdev_device’
libinput-1.30.1/src/libinput-plugin-lua.c:183:41: return_function: returning to ‘lua_push_evdev_device’ from ‘udev_property_new’
libinput-1.30.1/src/libinput-plugin-lua.c:184:33: danger: ‘udev_property_new(udev_list_entry_get_name(e), udev_list_entry_get_value(e))’ leaks here; was allocated at [(28)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/27)
#  182|   				struct udev_property *prop =
#  183|   					udev_property_new(key, value);
#  184|-> 				list_insert(&lua_device->udev_properties_list,
#  185|   					    &prop->link);
#  186|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libinput-1.30.1/src/libinput-plugin-lua.c:944:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(544)’
libinput-1.30.1/src/libinput-plugin-lua.c:941:1: enter_function: entry to ‘evdevdevice_frame’
libinput-1.30.1/src/libinput-plugin-lua.c:943:22: call_function: inlined call to ‘evdev_frame_new’ from ‘evdevdevice_frame’
libinput-1.30.1/src/libinput-plugin-lua.c:943:22: call_function: inlined call to ‘evdev_frame_new’ from ‘evdevdevice_frame’
libinput-1.30.1/src/libinput-plugin-lua.c:944:9: call_function: calling ‘lua_pop_evdev_frame’ from ‘evdevdevice_frame’
#  942|   {
#  943|   	auto frame = evdev_frame_new(64);
#  944|-> 	lua_pop_evdev_frame(plugin, device->evdev, frame);
#  945|   
#  946|   	struct libinput *libinput = lua_get_libinput(L);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def32]
libinput-1.30.1/src/libinput-plugin-lua.c:1096:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘plugin’
libinput-1.30.1/src/libinput-plugin-lua.c:1285:1: enter_function: entry to ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1287:50: call_function: calling ‘zalloc’ from ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1287:50: return_function: returning to ‘libinput_lua_plugin_new_from_path’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-lua.c:1288:33: call_function: calling ‘safe_strdup’ from ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1288:33: return_function: returning to ‘libinput_lua_plugin_new_from_path’ from ‘safe_strdup’
libinput-1.30.1/src/libinput-plugin-lua.c:1294:17: throw: if ‘libinput_plugin_new’ throws an exception...
libinput-1.30.1/src/libinput-plugin-lua.c:1287:41: call_function: inlined call to ‘libinput_lua_plugin_destroyp’ from ‘libinput_lua_plugin_new_from_path’
# 1094|   }
# 1095|   
# 1096|-> DEFINE_DESTROY_CLEANUP_FUNC(libinput_lua_plugin);
# 1097|   
# 1098|   static void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
libinput-1.30.1/src/libinput-plugin-lua.c:1288:33: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.30.1/src/libinput-plugin-lua.c:1285:1: enter_function: entry to ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1287:50: call_function: calling ‘zalloc’ from ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1287:50: return_function: returning to ‘libinput_lua_plugin_new_from_path’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-lua.c:1288:33: throw: if ‘safe_basename’ throws an exception...
libinput-1.30.1/src/libinput-plugin-lua.c:1288:33: danger: ‘zalloc(72)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/5)
# 1286|   {
# 1287|   	_destroy_(libinput_lua_plugin) *plugin = zalloc(sizeof(*plugin));
# 1288|-> 	_autofree_ char *name = safe_strdup(safe_basename(path));
# 1289|   
# 1290|   	/* libinput's plugin system keeps a ref, we don't need

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
libinput-1.30.1/src/libinput-plugin-lua.c:1294:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.30.1/src/libinput-plugin-lua.c:1285:1: enter_function: entry to ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1287:50: call_function: calling ‘zalloc’ from ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1287:50: return_function: returning to ‘libinput_lua_plugin_new_from_path’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-lua.c:1288:33: call_function: calling ‘safe_strdup’ from ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1288:33: return_function: returning to ‘libinput_lua_plugin_new_from_path’ from ‘safe_strdup’
libinput-1.30.1/src/libinput-plugin-lua.c:1294:17: throw: if ‘libinput_plugin_new’ throws an exception...
libinput-1.30.1/src/libinput-plugin-lua.c:1294:17: danger: ‘zalloc(72)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/5)
# 1292|   	 */
# 1293|   	_unref_(libinput_plugin) *p =
# 1294|-> 		libinput_plugin_new(libinput, name, &interface, NULL);
# 1295|   
# 1296|   	plugin->parent = p;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
libinput-1.30.1/src/libinput-plugin-lua.c:1301:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.30.1/src/libinput-plugin-lua.c:1285:1: enter_function: entry to ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1287:50: call_function: calling ‘zalloc’ from ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1287:50: return_function: returning to ‘libinput_lua_plugin_new_from_path’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-lua.c:1288:33: call_function: calling ‘safe_strdup’ from ‘libinput_lua_plugin_new_from_path’
libinput-1.30.1/src/libinput-plugin-lua.c:1288:33: return_function: returning to ‘libinput_lua_plugin_new_from_path’ from ‘safe_strdup’
libinput-1.30.1/src/libinput-plugin-lua.c:1301:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/libinput-plugin-lua.c:1301:9: danger: ‘zalloc(72)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/5)
# 1299|   	plugin->device_new_refid = LUA_NOREF;
# 1300|   	plugin->timer_expired_refid = LUA_NOREF;
# 1301|-> 	list_init(&plugin->evdev_devices);
# 1302|   
# 1303|   	_cleanup_(lua_closep) lua_State *L =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
libinput-1.30.1/src/libinput-plugin-mouse-wheel.c:648:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.30.1/src/libinput-plugin-mouse-wheel.c:645:1: enter_function: entry to ‘libinput_mouse_plugin_wheel’
libinput-1.30.1/src/libinput-plugin-mouse-wheel.c:647:38: call_function: calling ‘zalloc’ from ‘libinput_mouse_plugin_wheel’
libinput-1.30.1/src/libinput-plugin-mouse-wheel.c:647:38: return_function: returning to ‘libinput_mouse_plugin_wheel’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-mouse-wheel.c:648:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/libinput-plugin-mouse-wheel.c:648:9: danger: ‘zalloc(24)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  646|   {
#  647|   	struct plugin_data *plugin = zalloc(sizeof(*plugin));
#  648|-> 	list_init(&plugin->devices);
#  649|   
#  650|   	_unref_(libinput_plugin) *p =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
libinput-1.30.1/src/libinput-plugin-mtdev.c:57:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.30.1/src/libinput-plugin-mtdev.c:145:1: enter_function: entry to ‘mtdev_plugin_device_new’
libinput-1.30.1/src/libinput-plugin-mtdev.c:150:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/libinput-plugin-mtdev.c:153:9: branch_false: ...to here
libinput-1.30.1/src/libinput-plugin-mtdev.c:156:40: call_function: calling ‘zalloc’ from ‘mtdev_plugin_device_new’
libinput-1.30.1/src/libinput-plugin-mtdev.c:156:40: return_function: returning to ‘mtdev_plugin_device_new’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-mtdev.c:157:22: throw: if ‘libinput_device_ref’ throws an exception...
libinput-1.30.1/src/libinput-plugin-mtdev.c:156:35: call_function: inlined call to ‘plugin_device_destroyp’ from ‘mtdev_plugin_device_new’
#   55|   plugin_device_destroy(struct plugin_device *device)
#   56|   {
#   57|-> 	libinput_device_unref(device->device);
#   58|   	list_remove(&device->link);
#   59|   	mtdev_close_delete(device->mtdev);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
libinput-1.30.1/src/libinput-plugin-mtdev.c:57:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘device’
libinput-1.30.1/src/libinput-plugin-mtdev.c:227:1: enter_function: entry to ‘libinput_mtdev_plugin’
libinput-1.30.1/src/libinput-plugin-mtdev.c:229:42: call_function: calling ‘zalloc’ from ‘libinput_mtdev_plugin’
libinput-1.30.1/src/libinput-plugin-mtdev.c:229:42: return_function: returning to ‘libinput_mtdev_plugin’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-mtdev.c:230:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/libinput-plugin-mtdev.c:229:33: call_function: inlined call to ‘plugin_data_destroyp’ from ‘libinput_mtdev_plugin’
#   55|   plugin_device_destroy(struct plugin_device *device)
#   56|   {
#   57|-> 	libinput_device_unref(device->device);
#   58|   	list_remove(&device->link);
#   59|   	mtdev_close_delete(device->mtdev);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:72:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘device’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:379:1: enter_function: entry to ‘libinput_tablet_plugin_double_tool’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:381:42: call_function: calling ‘zalloc’ from ‘libinput_tablet_plugin_double_tool’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:381:42: return_function: returning to ‘libinput_tablet_plugin_double_tool’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:382:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:381:33: call_function: inlined call to ‘plugin_data_destroyp’ from ‘libinput_tablet_plugin_double_tool’
#   70|   plugin_device_destroy(struct plugin_device *device)
#   71|   {
#   72|-> 	libinput_device_unref(device->device);
#   73|   	list_remove(&device->link);
#   74|   	free(device);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:350:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:338:1: enter_function: entry to ‘double_tool_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:349:36: call_function: calling ‘zalloc’ from ‘double_tool_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:349:36: return_function: returning to ‘double_tool_plugin_device_added’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:350:22: throw: if ‘libinput_device_ref’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:350:22: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  348|   	struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin);
#  349|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  350|-> 	pd->device = libinput_device_ref(device);
#  351|   	list_take_append(&plugin->devices, pd, link);
#  352|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:351:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:338:1: enter_function: entry to ‘double_tool_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:349:36: call_function: calling ‘zalloc’ from ‘double_tool_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:349:36: return_function: returning to ‘double_tool_plugin_device_added’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-double-tool.c:351:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  349|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  350|   	pd->device = libinput_device_ref(device);
#  351|-> 	list_take_append(&plugin->devices, pd, link);
#  352|   }
#  353|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def42]
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:110:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘device’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:607:1: enter_function: entry to ‘libinput_tablet_plugin_eraser_button’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:612:42: call_function: calling ‘zalloc’ from ‘libinput_tablet_plugin_eraser_button’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:612:42: return_function: returning to ‘libinput_tablet_plugin_eraser_button’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:613:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:612:33: call_function: inlined call to ‘plugin_data_destroyp’ from ‘libinput_tablet_plugin_eraser_button’
#  108|   plugin_device_destroy(struct plugin_device *device)
#  109|   {
#  110|-> 	libinput_plugin_timer_cancel(device->timer);
#  111|   	libinput_plugin_timer_unref(device->timer);
#  112|   	libinput_device_unref(device->device);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:554:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:537:1: enter_function: entry to ‘eraser_button_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:553:36: call_function: calling ‘zalloc’ from ‘eraser_button_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:553:36: return_function: returning to ‘eraser_button_plugin_device_added’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:554:22: throw: if ‘libinput_device_ref’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:554:22: danger: ‘zalloc(72)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  552|   	struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin);
#  553|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  554|-> 	pd->device = libinput_device_ref(device);
#  555|   	pd->parent = plugin;
#  556|   	pd->last_frame = evdev_frame_new(64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:557:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:537:1: enter_function: entry to ‘eraser_button_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:553:36: call_function: calling ‘zalloc’ from ‘eraser_button_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:553:36: return_function: returning to ‘eraser_button_plugin_device_added’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:556:26: call_function: inlined call to ‘evdev_frame_new’ from ‘eraser_button_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:556:26: call_function: inlined call to ‘evdev_frame_new’ from ‘eraser_button_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:557:21: throw: if ‘libinput_device_get_sysname’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:557:21: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/13)
#  555|   	pd->parent = plugin;
#  556|   	pd->last_frame = evdev_frame_new(64);
#  557|-> 	pd->timer = libinput_plugin_timer_new(libinput_plugin,
#  558|   					      libinput_device_get_sysname(device),
#  559|   					      eraser_button_timer_func,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:557:21: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:537:1: enter_function: entry to ‘eraser_button_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:553:36: call_function: calling ‘zalloc’ from ‘eraser_button_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:553:36: return_function: returning to ‘eraser_button_plugin_device_added’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:556:26: call_function: inlined call to ‘evdev_frame_new’ from ‘eraser_button_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:556:26: call_function: inlined call to ‘evdev_frame_new’ from ‘eraser_button_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:557:21: throw: if ‘libinput_device_get_sysname’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-eraser-button.c:557:21: danger: ‘zalloc(72)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  555|   	pd->parent = plugin;
#  556|   	pd->last_frame = evdev_frame_new(64);
#  557|-> 	pd->timer = libinput_plugin_timer_new(libinput_plugin,
#  558|   					      libinput_device_get_sysname(device),
#  559|   					      eraser_button_timer_func,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def46]
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:67:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘device’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:263:1: enter_function: entry to ‘libinput_tablet_plugin_forced_tool’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:265:42: call_function: calling ‘zalloc’ from ‘libinput_tablet_plugin_forced_tool’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:265:42: return_function: returning to ‘libinput_tablet_plugin_forced_tool’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:266:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:265:33: call_function: inlined call to ‘plugin_data_destroyp’ from ‘libinput_tablet_plugin_forced_tool’
#   65|   plugin_device_destroy(struct plugin_device *device)
#   66|   {
#   67|-> 	libinput_device_unref(device->device);
#   68|   	list_remove(&device->link);
#   69|   	free(device);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:234:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:224:1: enter_function: entry to ‘forced_tool_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:233:36: call_function: calling ‘zalloc’ from ‘forced_tool_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:233:36: return_function: returning to ‘forced_tool_plugin_device_added’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:234:22: throw: if ‘libinput_device_ref’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:234:22: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  232|   	struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin);
#  233|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  234|-> 	pd->device = libinput_device_ref(device);
#  235|   	list_take_append(&plugin->devices, pd, link);
#  236|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:235:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:224:1: enter_function: entry to ‘forced_tool_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:233:36: call_function: calling ‘zalloc’ from ‘forced_tool_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:233:36: return_function: returning to ‘forced_tool_plugin_device_added’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-forced-tool.c:235:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  233|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  234|   	pd->device = libinput_device_ref(device);
#  235|-> 	list_take_append(&plugin->devices, pd, link);
#  236|   }
#  237|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:256:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(64)’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:246:1: enter_function: entry to ‘proximity_timer_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:255:36: call_function: calling ‘zalloc’ from ‘proximity_timer_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:255:36: return_function: returning to ‘proximity_timer_plugin_device_added’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:256:22: throw: if ‘libinput_device_ref’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:256:22: danger: ‘zalloc(64)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  254|   	struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin);
#  255|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  256|-> 	pd->device = libinput_device_ref(device);
#  257|   	pd->parent = plugin;
#  258|   	pd->prox_out_timer =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:259:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(64)’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:246:1: enter_function: entry to ‘proximity_timer_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:255:36: call_function: calling ‘zalloc’ from ‘proximity_timer_plugin_device_added’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:255:36: return_function: returning to ‘proximity_timer_plugin_device_added’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:259:17: throw: if ‘libinput_device_get_sysname’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:259:17: danger: ‘zalloc(64)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  257|   	pd->parent = plugin;
#  258|   	pd->prox_out_timer =
#  259|-> 		libinput_plugin_timer_new(libinput_plugin,
#  260|   					  libinput_device_get_sysname(device),
#  261|   					  tablet_proximity_out_quirk_timer_func,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:302:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:299:1: enter_function: entry to ‘libinput_tablet_plugin_proximity_timer’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:301:38: call_function: calling ‘zalloc’ from ‘libinput_tablet_plugin_proximity_timer’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:301:38: return_function: returning to ‘libinput_tablet_plugin_proximity_timer’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:302:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/libinput-plugin-tablet-proximity-timer.c:302:9: danger: ‘zalloc(24)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  300|   {
#  301|   	struct plugin_data *plugin = zalloc(sizeof(*plugin));
#  302|-> 	list_init(&plugin->devices);
#  303|   
#  304|   	/* Stop false positives caused by the forced proximity code */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
libinput-1.30.1/src/libinput-plugin.c:891:39: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/libinput-plugin.c:882:1: enter_function: entry to ‘libinput_plugin_timer_new’
libinput-1.30.1/src/libinput-plugin.c:889:47: call_function: calling ‘zalloc’ from ‘libinput_plugin_timer_new’
libinput-1.30.1/src/libinput-plugin.c:889:47: return_function: returning to ‘libinput_plugin_timer_new’ from ‘zalloc’
libinput-1.30.1/src/libinput-plugin.c:891:39: call_function: calling ‘strdup_printf’ from ‘libinput_plugin_timer_new’
libinput-1.30.1/src/libinput-plugin.c:891:39: return_function: returning to ‘libinput_plugin_timer_new’ from ‘strdup_printf’
libinput-1.30.1/src/libinput-plugin.c:898:9: throw: if ‘libinput_timer_init’ throws an exception...
libinput-1.30.1/src/libinput-plugin.c:891:39: danger: ‘zalloc(104)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  889|   	struct libinput_plugin_timer *timer = zalloc(sizeof(*timer));
#  890|   
#  891|-> 	_autofree_ char *timer_name = strdup_printf("%s-%s", plugin->name, name);
#  892|   
#  893|   	timer->plugin = plugin;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
libinput-1.30.1/src/libinput-util.h:76:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/tools/shared.c:772:1: enter_function: entry to ‘find_device’
libinput-1.30.1/tools/shared.c:775:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/shared.c:778:38: branch_false: ...to here
libinput-1.30.1/tools/shared.c:783:9: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
libinput-1.30.1/tools/shared.c:784:36: branch_true: ...to here
libinput-1.30.1/tools/shared.c:790:22: call_function: calling ‘strstartswith’ from ‘find_device’
libinput-1.30.1/tools/shared.c:790:22: return_function: returning to ‘find_device’ from ‘strstartswith’
libinput-1.30.1/tools/shared.c:796:33: call_function: calling ‘safe_strdup’ from ‘find_device’
libinput-1.30.1/tools/shared.c:796:33: return_function: returning to ‘find_device’ from ‘safe_strdup’
libinput-1.30.1/tools/shared.c:797:28: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/shared.c:785:39: call_function: inlined call to ‘udev_device_unrefp’ from ‘find_device’
libinput-1.30.1/tools/shared.c:774:24: call_function: inlined call to ‘udev_unrefp’ from ‘find_device’
#   74|   /* Commonly-used cleanup  */
#   75|   #ifdef udev_list_entry_foreach
#   76|-> DEFINE_UNREF_CLEANUP_FUNC(udev);
#   77|   DEFINE_UNREF_CLEANUP_FUNC(udev_device);
#   78|   DEFINE_UNREF_CLEANUP_FUNC(udev_enumerate);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
libinput-1.30.1/src/libinput-util.h:76:1: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(modalias)’
libinput-1.30.1/src/quirks.c:1245:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1253:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.30.1/src/quirks.c:1255:9: branch_true: ...to here
libinput-1.30.1/src/quirks.c:1262:9: call_function: calling ‘quirk_log_msg’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1262:9: return_function: returning to ‘quirks_init_subsystem’ from ‘quirk_log_msg’
libinput-1.30.1/src/quirks.c:1264:20: call_function: calling ‘init_dmi’ from ‘quirks_init_subsystem’
#   74|   /* Commonly-used cleanup  */
#   75|   #ifdef udev_list_entry_foreach
#   76|-> DEFINE_UNREF_CLEANUP_FUNC(udev);
#   77|   DEFINE_UNREF_CLEANUP_FUNC(udev_device);
#   78|   DEFINE_UNREF_CLEANUP_FUNC(udev_enumerate);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
libinput-1.30.1/src/libinput-util.h:77:1: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(modalias)’
libinput-1.30.1/src/quirks.c:1245:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1253:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.30.1/src/quirks.c:1255:9: branch_true: ...to here
libinput-1.30.1/src/quirks.c:1262:9: call_function: calling ‘quirk_log_msg’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1262:9: return_function: returning to ‘quirks_init_subsystem’ from ‘quirk_log_msg’
libinput-1.30.1/src/quirks.c:1264:20: call_function: calling ‘init_dmi’ from ‘quirks_init_subsystem’
#   75|   #ifdef udev_list_entry_foreach
#   76|   DEFINE_UNREF_CLEANUP_FUNC(udev);
#   77|-> DEFINE_UNREF_CLEANUP_FUNC(udev_device);
#   78|   DEFINE_UNREF_CLEANUP_FUNC(udev_enumerate);
#   79|   DEFINE_UNREF_CLEANUP_FUNC(udev_monitor);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
libinput-1.30.1/src/libinput-util.h:77:1: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(udev_device_get_devnode(udev_device_new_from_syspath(udev_new(), udev_list_entry_get_name(entry))))’
libinput-1.30.1/tools/shared.c:772:1: enter_function: entry to ‘find_device’
libinput-1.30.1/tools/shared.c:775:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/shared.c:778:38: branch_false: ...to here
libinput-1.30.1/tools/shared.c:783:9: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
libinput-1.30.1/tools/shared.c:784:36: branch_true: ...to here
libinput-1.30.1/tools/shared.c:790:22: call_function: calling ‘strstartswith’ from ‘find_device’
libinput-1.30.1/tools/shared.c:790:22: return_function: returning to ‘find_device’ from ‘strstartswith’
libinput-1.30.1/tools/shared.c:796:33: call_function: calling ‘safe_strdup’ from ‘find_device’
libinput-1.30.1/tools/shared.c:796:33: return_function: returning to ‘find_device’ from ‘safe_strdup’
libinput-1.30.1/tools/shared.c:797:28: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/shared.c:785:39: call_function: inlined call to ‘udev_device_unrefp’ from ‘find_device’
#   75|   #ifdef udev_list_entry_foreach
#   76|   DEFINE_UNREF_CLEANUP_FUNC(udev);
#   77|-> DEFINE_UNREF_CLEANUP_FUNC(udev_device);
#   78|   DEFINE_UNREF_CLEANUP_FUNC(udev_enumerate);
#   79|   DEFINE_UNREF_CLEANUP_FUNC(udev_monitor);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
libinput-1.30.1/src/libinput-util.h:78:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/tools/shared.c:772:1: enter_function: entry to ‘find_device’
libinput-1.30.1/tools/shared.c:775:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/shared.c:778:38: branch_false: ...to here
libinput-1.30.1/tools/shared.c:783:9: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
libinput-1.30.1/tools/shared.c:784:36: branch_true: ...to here
libinput-1.30.1/tools/shared.c:790:22: call_function: calling ‘strstartswith’ from ‘find_device’
libinput-1.30.1/tools/shared.c:790:22: return_function: returning to ‘find_device’ from ‘strstartswith’
libinput-1.30.1/tools/shared.c:796:33: call_function: calling ‘safe_strdup’ from ‘find_device’
libinput-1.30.1/tools/shared.c:796:33: return_function: returning to ‘find_device’ from ‘safe_strdup’
libinput-1.30.1/tools/shared.c:797:28: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/shared.c:785:39: call_function: inlined call to ‘udev_device_unrefp’ from ‘find_device’
libinput-1.30.1/tools/shared.c:778:34: call_function: inlined call to ‘udev_enumerate_unrefp’ from ‘find_device’
#   76|   DEFINE_UNREF_CLEANUP_FUNC(udev);
#   77|   DEFINE_UNREF_CLEANUP_FUNC(udev_device);
#   78|-> DEFINE_UNREF_CLEANUP_FUNC(udev_enumerate);
#   79|   DEFINE_UNREF_CLEANUP_FUNC(udev_monitor);
#   80|   #endif

Error: GCC_ANALYZER_WARNING (CWE-457): [#def58]
libinput-1.30.1/src/libinput-util.h:82:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘evdev’
libinput-1.30.1/test/test-switch.c:762:9: throw: if ‘litest_grab_device’ throws an exception...
libinput-1.30.1/test/test-switch.c:758:28: call_function: inlined call to ‘libevdev_freep’ from ‘lid_update_hw_on_key_closed_on_init’
#   80|   #endif
#   81|   #ifdef LIBEVDEV_ATTRIBUTE_PRINTF
#   82|-> DEFINE_FREE_CLEANUP_FUNC(libevdev);
#   83|   #endif
#   84|   DEFINE_UNREF_CLEANUP_FUNC(libinput);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def59]
libinput-1.30.1/src/libinput-util.h:84:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘li’
libinput-1.30.1/test/test-udev.c:58:9: branch_true: following ‘true’ branch...
libinput-1.30.1/test/test-udev.c:58:9: branch_true: ...to here
libinput-1.30.1/test/test-udev.c:58:9: throw: if ‘litest_fail_condition’ throws an exception...
libinput-1.30.1/test/test-udev.c:57:28: call_function: inlined call to ‘libinput_unrefp’ from ‘udev_create_NULL’
#   82|   DEFINE_FREE_CLEANUP_FUNC(libevdev);
#   83|   #endif
#   84|-> DEFINE_UNREF_CLEANUP_FUNC(libinput);
#   85|   DEFINE_UNREF_CLEANUP_FUNC(libinput_device);
#   86|   DEFINE_UNREF_CLEANUP_FUNC(libinput_tablet_tool);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def60]
libinput-1.30.1/src/libinput-util.h:88:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘<unknown>’
libinput-1.30.1/test/litest.c:4563:1: enter_function: entry to ‘litest_assert_axis_end_sequence’
libinput-1.30.1/test/litest.c:4573:9: branch_false: following ‘false’ branch...
libinput-1.30.1/test/litest.c:4573:9: branch_false: ...to here
libinput-1.30.1/test/litest.c:4581:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
libinput-1.30.1/test/litest.c:4582:52: branch_true: ...to here
libinput-1.30.1/test/litest.c:4583:25: call_function: calling ‘litest_is_axis_event’ from ‘litest_assert_axis_end_sequence’
libinput-1.30.1/test/litest.c:4582:44: call_function: inlined call to ‘libinput_event_destroyp’ from ‘litest_assert_axis_end_sequence’
#   86|   DEFINE_UNREF_CLEANUP_FUNC(libinput_tablet_tool);
#   87|   DEFINE_UNREF_CLEANUP_FUNC(libinput_seat);
#   88|-> DEFINE_DESTROY_CLEANUP_FUNC(libinput_event);
#   89|   DEFINE_DESTROY_CLEANUP_FUNC(libinput_config_accel);
#   90|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def61]
libinput-1.30.1/src/libinput.c:311:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.30.1/src/libinput.c:5165:1: enter_function: entry to ‘libinput_libwacom_ref’
libinput-1.30.1/src/libinput.c:5168:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:5169:22: branch_true: ...to here
libinput-1.30.1/src/libinput.c:5170:20: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:5171:25: branch_true: ...to here
libinput-1.30.1/src/libinput.c:5171:25: call_function: calling ‘log_msg’ from ‘libinput_libwacom_ref’
#  309|   {
#  310|   	if (log_is_logged(libinput, priority))
#  311|-> 		libinput->log_handler(libinput, priority, format, args);
#  312|   }
#  313|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
libinput-1.30.1/src/libinput.c:1724:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(216)’
libinput-1.30.1/src/libinput.c:2816:1: enter_function: entry to ‘tablet_notify_proximity’
libinput-1.30.1/src/libinput.c:2827:27: call_function: calling ‘zalloc’ from ‘tablet_notify_proximity’
libinput-1.30.1/src/libinput.c:2827:27: return_function: returning to ‘tablet_notify_proximity’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:1724:9: danger: ‘zalloc(216)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
# 1722|   libinput_tablet_tool_ref(struct libinput_tablet_tool *tool)
# 1723|   {
# 1724|-> 	tool->refcount++;
# 1725|   	return tool;
# 1726|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
libinput-1.30.1/src/libinput.c:2362:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(16)’
libinput-1.30.1/src/libinput.c:2353:1: enter_function: entry to ‘notify_added_device’
libinput-1.30.1/src/libinput.c:2360:30: call_function: calling ‘zalloc’ from ‘notify_added_device’
libinput-1.30.1/src/libinput.c:2360:30: return_function: returning to ‘notify_added_device’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2362:9: danger: ‘zalloc(16)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
# 2360|   	added_device_event = zalloc(sizeof *added_device_event);
# 2361|   
# 2362|-> 	post_base_event(device, LIBINPUT_EVENT_DEVICE_ADDED, &added_device_event->base);
# 2363|   
# 2364|   #ifdef __clang_analyzer__

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
libinput-1.30.1/src/libinput.c:2381:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(16)’
libinput-1.30.1/src/libinput.c:2372:1: enter_function: entry to ‘notify_removed_device’
libinput-1.30.1/src/libinput.c:2379:32: call_function: calling ‘zalloc’ from ‘notify_removed_device’
libinput-1.30.1/src/libinput.c:2379:32: return_function: returning to ‘notify_removed_device’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2381:9: danger: ‘zalloc(16)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
# 2379|   	removed_device_event = zalloc(sizeof *removed_device_event);
# 2380|   
# 2381|-> 	post_base_event(device,
# 2382|   			LIBINPUT_EVENT_DEVICE_REMOVED,
# 2383|   			&removed_device_event->base);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
libinput-1.30.1/src/libinput.c:2446:26: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput.c:2433:1: enter_function: entry to ‘keyboard_notify_key’
libinput-1.30.1/src/libinput.c:2441:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2444:21: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2444:21: call_function: calling ‘zalloc’ from ‘keyboard_notify_key’
libinput-1.30.1/src/libinput.c:2444:21: return_function: returning to ‘keyboard_notify_key’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2446:26: call_function: calling ‘update_seat_key_count’ from ‘keyboard_notify_key’
libinput-1.30.1/src/libinput.c:2446:26: return_function: returning to ‘keyboard_notify_key’ from ‘update_seat_key_count’
libinput-1.30.1/src/libinput.c:2446:26: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/7)
# 2444|   	key_event = zalloc(sizeof *key_event);
# 2445|   
# 2446|-> 	seat_key_count = update_seat_key_count(device->seat, keycode, state);
# 2447|   
# 2448|   	*key_event = (struct libinput_event_keyboard){

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
libinput-1.30.1/src/libinput.c:2477:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/libinput.c:2459:1: enter_function: entry to ‘pointer_notify_motion’
libinput-1.30.1/src/libinput.c:2466:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2469:24: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2469:24: call_function: calling ‘zalloc’ from ‘pointer_notify_motion’
libinput-1.30.1/src/libinput.c:2469:24: return_function: returning to ‘pointer_notify_motion’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2477:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/7)
# 2475|   	};
# 2476|   
# 2477|-> 	post_device_event(device,
# 2478|   			  time,
# 2479|   			  LIBINPUT_EVENT_POINTER_MOTION,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
libinput-1.30.1/src/libinput.c:2500:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/libinput.c:2484:1: enter_function: entry to ‘pointer_notify_motion_absolute’
libinput-1.30.1/src/libinput.c:2490:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2493:33: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2493:33: call_function: calling ‘zalloc’ from ‘pointer_notify_motion_absolute’
libinput-1.30.1/src/libinput.c:2493:33: return_function: returning to ‘pointer_notify_motion_absolute’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2500:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/7)
# 2498|   	};
# 2499|   
# 2500|-> 	post_device_event(device,
# 2501|   			  time,
# 2502|   			  LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
libinput-1.30.1/src/libinput.c:2520:29: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/libinput.c:2507:1: enter_function: entry to ‘pointer_notify_button’
libinput-1.30.1/src/libinput.c:2515:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2518:24: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2518:24: call_function: calling ‘zalloc’ from ‘pointer_notify_button’
libinput-1.30.1/src/libinput.c:2518:24: return_function: returning to ‘pointer_notify_button’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2520:29: call_function: calling ‘update_seat_button_count’ from ‘pointer_notify_button’
libinput-1.30.1/src/libinput.c:2520:29: return_function: returning to ‘pointer_notify_button’ from ‘update_seat_button_count’
libinput-1.30.1/src/libinput.c:2520:29: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/7)
# 2518|   	button_event = zalloc(sizeof *button_event);
# 2519|   
# 2520|-> 	seat_button_count = update_seat_button_count(device->seat, button, state);
# 2521|   
# 2522|   	*button_event = (struct libinput_event_pointer){

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
libinput-1.30.1/src/libinput.c:2561:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/libinput.c:2536:1: enter_function: entry to ‘pointer_notify_axis_finger’
libinput-1.30.1/src/libinput.c:2545:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2548:22: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2548:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_finger’
libinput-1.30.1/src/libinput.c:2548:22: return_function: returning to ‘pointer_notify_axis_finger’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2549:29: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_finger’
libinput-1.30.1/src/libinput.c:2549:29: return_function: returning to ‘pointer_notify_axis_finger’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2561:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/7)
# 2559|   	*axis_event_legacy = *axis_event;
# 2560|   
# 2561|-> 	post_device_event(device,
# 2562|   			  time,
# 2563|   			  LIBINPUT_EVENT_POINTER_SCROLL_FINGER,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
libinput-1.30.1/src/libinput.c:2597:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/libinput.c:2572:1: enter_function: entry to ‘pointer_notify_axis_continuous’
libinput-1.30.1/src/libinput.c:2581:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2584:22: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2584:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_continuous’
libinput-1.30.1/src/libinput.c:2584:22: return_function: returning to ‘pointer_notify_axis_continuous’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2585:29: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_continuous’
libinput-1.30.1/src/libinput.c:2585:29: return_function: returning to ‘pointer_notify_axis_continuous’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2597:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/7)
# 2595|   	*axis_event_legacy = *axis_event;
# 2596|   
# 2597|-> 	post_device_event(device,
# 2598|   			  time,
# 2599|   			  LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
libinput-1.30.1/src/libinput.c:2631:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/libinput.c:2608:1: enter_function: entry to ‘pointer_notify_axis_legacy_wheel’
libinput-1.30.1/src/libinput.c:2617:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2620:22: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2620:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_legacy_wheel’
libinput-1.30.1/src/libinput.c:2620:22: return_function: returning to ‘pointer_notify_axis_legacy_wheel’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2631:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/7)
# 2629|   	};
# 2630|   
# 2631|-> 	post_device_event(device, time, LIBINPUT_EVENT_POINTER_AXIS, &axis_event->base);
# 2632|   }
# 2633|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
libinput-1.30.1/src/libinput.c:2658:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.30.1/src/libinput.c:2635:1: enter_function: entry to ‘pointer_notify_axis_wheel’
libinput-1.30.1/src/libinput.c:2643:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2646:22: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2646:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_wheel’
libinput-1.30.1/src/libinput.c:2646:22: return_function: returning to ‘pointer_notify_axis_wheel’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2658:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/7)
# 2656|   	};
# 2657|   
# 2658|-> 	post_device_event(device,
# 2659|   			  time,
# 2660|   			  LIBINPUT_EVENT_POINTER_SCROLL_WHEEL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
libinput-1.30.1/src/libinput.c:2687:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput.c:2667:1: enter_function: entry to ‘touch_notify_touch_down’
libinput-1.30.1/src/libinput.c:2675:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2678:23: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2678:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_down’
libinput-1.30.1/src/libinput.c:2678:23: return_function: returning to ‘touch_notify_touch_down’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2687:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
# 2685|   	};
# 2686|   
# 2687|-> 	post_device_event(device, time, LIBINPUT_EVENT_TOUCH_DOWN, &touch_event->base);
# 2688|   }
# 2689|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
libinput-1.30.1/src/libinput.c:2711:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput.c:2691:1: enter_function: entry to ‘touch_notify_touch_motion’
libinput-1.30.1/src/libinput.c:2699:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2702:23: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2702:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_motion’
libinput-1.30.1/src/libinput.c:2702:23: return_function: returning to ‘touch_notify_touch_motion’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2711:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/7)
# 2709|   	};
# 2710|   
# 2711|-> 	post_device_event(device,
# 2712|   			  time,
# 2713|   			  LIBINPUT_EVENT_TOUCH_MOTION,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
libinput-1.30.1/src/libinput.c:2736:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput.c:2718:1: enter_function: entry to ‘touch_notify_touch_up’
libinput-1.30.1/src/libinput.c:2725:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2728:23: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2728:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_up’
libinput-1.30.1/src/libinput.c:2728:23: return_function: returning to ‘touch_notify_touch_up’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2736:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/7)
# 2734|   	};
# 2735|   
# 2736|-> 	post_device_event(device, time, LIBINPUT_EVENT_TOUCH_UP, &touch_event->base);
# 2737|   }
# 2738|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
libinput-1.30.1/src/libinput.c:2758:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput.c:2740:1: enter_function: entry to ‘touch_notify_touch_cancel’
libinput-1.30.1/src/libinput.c:2747:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2750:23: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2750:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_cancel’
libinput-1.30.1/src/libinput.c:2750:23: return_function: returning to ‘touch_notify_touch_cancel’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2758:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/7)
# 2756|   	};
# 2757|   
# 2758|-> 	post_device_event(device,
# 2759|   			  time,
# 2760|   			  LIBINPUT_EVENT_TOUCH_CANCEL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
libinput-1.30.1/src/libinput.c:2778:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput.c:2765:1: enter_function: entry to ‘touch_notify_frame’
libinput-1.30.1/src/libinput.c:2769:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:2772:23: branch_true: ...to here
libinput-1.30.1/src/libinput.c:2772:23: call_function: calling ‘zalloc’ from ‘touch_notify_frame’
libinput-1.30.1/src/libinput.c:2772:23: return_function: returning to ‘touch_notify_frame’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2778:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/7)
# 2776|   	};
# 2777|   
# 2778|-> 	post_device_event(device, time, LIBINPUT_EVENT_TOUCH_FRAME, &touch_event->base);
# 2779|   }
# 2780|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
libinput-1.30.1/src/libinput.c:2895:29: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(216)’
libinput-1.30.1/src/libinput.c:2880:1: enter_function: entry to ‘tablet_notify_button’
libinput-1.30.1/src/libinput.c:2893:24: call_function: calling ‘zalloc’ from ‘tablet_notify_button’
libinput-1.30.1/src/libinput.c:2893:24: return_function: returning to ‘tablet_notify_button’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:2895:29: call_function: calling ‘update_seat_button_count’ from ‘tablet_notify_button’
libinput-1.30.1/src/libinput.c:2895:29: return_function: returning to ‘tablet_notify_button’ from ‘update_seat_button_count’
libinput-1.30.1/src/libinput.c:2895:29: danger: ‘zalloc(216)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/5)
# 2893|   	button_event = zalloc(sizeof *button_event);
# 2894|   
# 2895|-> 	seat_button_count = update_seat_button_count(device->seat, button, state);
# 2896|   
# 2897|   	*button_event = (struct libinput_event_tablet_tool){

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
libinput-1.30.1/src/libinput.c:3042:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(120)’
libinput-1.30.1/src/libinput.c:3033:1: enter_function: entry to ‘tablet_pad_notify_key’
libinput-1.30.1/src/libinput.c:3040:21: call_function: calling ‘zalloc’ from ‘tablet_pad_notify_key’
libinput-1.30.1/src/libinput.c:3040:21: return_function: returning to ‘tablet_pad_notify_key’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:3042:9: danger: ‘zalloc(120)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/5)
# 3040|   	key_event = zalloc(sizeof *key_event);
# 3041|   
# 3042|-> 	*key_event = (struct libinput_event_tablet_pad){
# 3043|   		.time = time,
# 3044|   		.key.code = key,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
libinput-1.30.1/src/libinput.c:3072:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(80)’
libinput-1.30.1/src/libinput.c:3055:1: enter_function: entry to ‘gesture_notify’
libinput-1.30.1/src/libinput.c:3070:25: call_function: calling ‘zalloc’ from ‘gesture_notify’
libinput-1.30.1/src/libinput.c:3070:25: return_function: returning to ‘gesture_notify’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:3072:9: danger: ‘zalloc(80)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/5)
# 3070|   	gesture_event = zalloc(sizeof *gesture_event);
# 3071|   
# 3072|-> 	*gesture_event = (struct libinput_event_gesture){
# 3073|   		.time = time,
# 3074|   		.finger_count = finger_count,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
libinput-1.30.1/src/libinput.c:3212:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.30.1/src/libinput.c:3194:1: enter_function: entry to ‘switch_notify_toggle’
libinput-1.30.1/src/libinput.c:3201:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/libinput.c:3204:24: branch_true: ...to here
libinput-1.30.1/src/libinput.c:3204:24: call_function: calling ‘zalloc’ from ‘switch_notify_toggle’
libinput-1.30.1/src/libinput.c:3204:24: return_function: returning to ‘switch_notify_toggle’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:3212:9: danger: ‘zalloc(32)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/7)
# 3210|   	};
# 3211|   
# 3212|-> 	post_device_event(device,
# 3213|   			  time,
# 3214|   			  LIBINPUT_EVENT_SWITCH_TOGGLE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
libinput-1.30.1/src/libinput.c:3521:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(120)’
libinput-1.30.1/src/libinput.c:2917:1: enter_function: entry to ‘tablet_pad_notify_button’
libinput-1.30.1/src/libinput.c:2926:24: call_function: calling ‘zalloc’ from ‘tablet_pad_notify_button’
libinput-1.30.1/src/libinput.c:2926:24: return_function: returning to ‘tablet_pad_notify_button’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:3521:16: danger: ‘zalloc(120)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/5)
# 3519|   libinput_tablet_pad_mode_group_get_mode(struct libinput_tablet_pad_mode_group *group)
# 3520|   {
# 3521|-> 	return group->current_mode;
# 3522|   }
# 3523|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
libinput-1.30.1/src/libinput.c:3925:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/src/libinput.c:3917:1: enter_function: entry to ‘libinput_device_group_create’
libinput-1.30.1/src/libinput.c:3921:17: call_function: calling ‘zalloc’ from ‘libinput_device_group_create’
libinput-1.30.1/src/libinput.c:3921:17: return_function: returning to ‘libinput_device_group_create’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:3923:29: call_function: calling ‘safe_strdup’ from ‘libinput_device_group_create’
libinput-1.30.1/src/libinput.c:3923:29: return_function: returning to ‘libinput_device_group_create’ from ‘safe_strdup’
libinput-1.30.1/src/libinput.c:3925:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/libinput.c:3925:9: danger: ‘<unknown>’ leaks here; was allocated at [(13)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/12)
# 3923|   	group->identifier = safe_strdup(identifier);
# 3924|   
# 3925|-> 	list_init(&group->link);
# 3926|   	list_insert(&libinput->device_group_list, &group->link);
# 3927|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
libinput-1.30.1/src/libinput.c:3925:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/src/libinput.c:3917:1: enter_function: entry to ‘libinput_device_group_create’
libinput-1.30.1/src/libinput.c:3921:17: call_function: calling ‘zalloc’ from ‘libinput_device_group_create’
libinput-1.30.1/src/libinput.c:3921:17: return_function: returning to ‘libinput_device_group_create’ from ‘zalloc’
libinput-1.30.1/src/libinput.c:3923:29: call_function: calling ‘safe_strdup’ from ‘libinput_device_group_create’
libinput-1.30.1/src/libinput.c:3923:29: return_function: returning to ‘libinput_device_group_create’ from ‘safe_strdup’
libinput-1.30.1/src/libinput.c:3925:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/libinput.c:3925:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/5)
# 3923|   	group->identifier = safe_strdup(identifier);
# 3924|   
# 3925|-> 	list_init(&group->link);
# 3926|   	list_insert(&libinput->device_group_list, &group->link);
# 3927|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
libinput-1.30.1/src/path-seat.c:112:9: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(<unknown>)’
libinput-1.30.1/src/path-seat.c:254:1: enter_function: entry to ‘path_create_device’
libinput-1.30.1/src/path-seat.c:262:15: call_function: calling ‘zalloc’ from ‘path_create_device’
libinput-1.30.1/src/path-seat.c:262:15: return_function: returning to ‘path_create_device’ from ‘zalloc’
libinput-1.30.1/src/path-seat.c:267:18: call_function: calling ‘path_device_enable’ from ‘path_create_device’
#  110|   	struct path_seat *seat;
#  111|   
#  112|-> 	list_for_each(seat, &input->base.seat_list, base.link) {
#  113|   		if (streq(seat->base.physical_name, seat_name_physical) &&
#  114|   		    streq(seat->base.logical_name, seat_name_logical))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
libinput-1.30.1/src/path-seat.c:141:29: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(<unknown>)’
libinput-1.30.1/src/path-seat.c:218:1: enter_function: entry to ‘path_input_enable’
libinput-1.30.1/src/path-seat.c:223:9: branch_true: following ‘true’ branch...
libinput-1.30.1/src/path-seat.c:224:21: branch_true: ...to here
libinput-1.30.1/src/path-seat.c:224:21: call_function: calling ‘path_device_enable’ from ‘path_input_enable’
#  139|   		seat_logical_name = safe_strdup(seat_logical_name_override);
#  140|   	} else {
#  141|-> 		seat_prop = udev_device_get_property_value(udev_device, "WL_SEAT");
#  142|   		seat_logical_name =
#  143|   			safe_strdup(seat_prop ? seat_prop : default_seat_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
libinput-1.30.1/src/path-seat.c:166:9: warning[-Wanalyzer-malloc-leak]: leak of ‘seat_logical_name’
libinput-1.30.1/src/path-seat.c:254:1: enter_function: entry to ‘path_create_device’
libinput-1.30.1/src/path-seat.c:262:15: call_function: calling ‘zalloc’ from ‘path_create_device’
libinput-1.30.1/src/path-seat.c:262:15: return_function: returning to ‘path_create_device’ from ‘zalloc’
libinput-1.30.1/src/path-seat.c:267:18: call_function: calling ‘path_device_enable’ from ‘path_create_device’
#  164|   	}
#  165|   
#  166|-> 	libinput_seat_ref(&seat->base);
#  167|   out:
#  168|   	free(seat_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
libinput-1.30.1/src/path-seat.c:263:28: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.30.1/src/path-seat.c:254:1: enter_function: entry to ‘path_create_device’
libinput-1.30.1/src/path-seat.c:262:15: call_function: calling ‘zalloc’ from ‘path_create_device’
libinput-1.30.1/src/path-seat.c:262:15: return_function: returning to ‘path_create_device’ from ‘zalloc’
libinput-1.30.1/src/path-seat.c:263:28: throw: if ‘udev_device_ref’ throws an exception...
libinput-1.30.1/src/path-seat.c:263:28: danger: ‘zalloc(24)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  261|   
#  262|   	dev = zalloc(sizeof *dev);
#  263|-> 	dev->udev_device = udev_device_ref(udev_device);
#  264|   
#  265|   	list_insert(&input->path_list, &dev->link);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
libinput-1.30.1/src/path-seat.c:265:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.30.1/src/path-seat.c:254:1: enter_function: entry to ‘path_create_device’
libinput-1.30.1/src/path-seat.c:262:15: call_function: calling ‘zalloc’ from ‘path_create_device’
libinput-1.30.1/src/path-seat.c:262:15: return_function: returning to ‘path_create_device’ from ‘zalloc’
libinput-1.30.1/src/path-seat.c:265:9: throw: if ‘list_insert’ throws an exception...
libinput-1.30.1/src/path-seat.c:265:9: danger: ‘zalloc(24)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
#  263|   	dev->udev_device = udev_device_ref(udev_device);
#  264|   
#  265|-> 	list_insert(&input->path_list, &dev->link);
#  266|   
#  267|   	device = path_device_enable(input, udev_device, seat_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
libinput-1.30.1/src/path-seat.c:314:13: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(352)’
libinput-1.30.1/src/path-seat.c:301:1: enter_function: entry to ‘libinput_path_create_context’
libinput-1.30.1/src/path-seat.c:306:12: branch_false: following ‘false’ branch (when ‘interface’ is non-NULL)...
libinput-1.30.1/src/path-seat.c:309:31: branch_false: ...to here
libinput-1.30.1/src/path-seat.c:310:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/path-seat.c:313:17: branch_false: ...to here
libinput-1.30.1/src/path-seat.c:313:17: call_function: calling ‘zalloc’ from ‘libinput_path_create_context’
libinput-1.30.1/src/path-seat.c:313:17: return_function: returning to ‘libinput_path_create_context’ from ‘zalloc’
libinput-1.30.1/src/path-seat.c:314:13: throw: if ‘libinput_init’ throws an exception...
libinput-1.30.1/src/path-seat.c:314:13: danger: ‘zalloc(352)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/9)
#  312|   
#  313|   	input = zalloc(sizeof *input);
#  314|-> 	if (libinput_init(&input->base, interface, &interface_backend, user_data) !=
#  315|   	    0) {
#  316|   		free(input);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def91]
libinput-1.30.1/src/quirks.c:216:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.30.1/src/quirks.c:1245:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1253:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.30.1/src/quirks.c:1255:9: branch_true: ...to here
libinput-1.30.1/src/quirks.c:1262:9: call_function: calling ‘quirk_log_msg’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1262:9: return_function: returning to ‘quirks_init_subsystem’ from ‘quirk_log_msg’
libinput-1.30.1/src/quirks.c:1264:20: call_function: calling ‘init_dmi’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1264:20: return_function: returning to ‘quirks_init_subsystem’ from ‘init_dmi’
libinput-1.30.1/src/quirks.c:1265:19: call_function: calling ‘init_dt’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1265:19: return_function: returning to ‘quirks_init_subsystem’ from ‘init_dt’
libinput-1.30.1/src/quirks.c:1266:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/quirks.c:1269:14: branch_false: ...to here
libinput-1.30.1/src/quirks.c:1269:14: call_function: calling ‘parse_files’ from ‘quirks_init_subsystem’
#  214|   	case QLOG_NOISE:
#  215|   	case QLOG_PARSER_ERROR:
#  216|-> 		if (ctx->log_type == QLOG_LIBINPUT_LOGGING)
#  217|   			return;
#  218|   		break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
libinput-1.30.1/src/quirks.c:216:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.30.1/src/quirks.c:1245:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1253:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.30.1/src/quirks.c:1255:9: branch_true: ...to here
libinput-1.30.1/src/quirks.c:1262:9: call_function: calling ‘quirk_log_msg’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1262:9: return_function: returning to ‘quirks_init_subsystem’ from ‘quirk_log_msg’
libinput-1.30.1/src/quirks.c:1264:20: call_function: calling ‘init_dmi’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1264:20: return_function: returning to ‘quirks_init_subsystem’ from ‘init_dmi’
libinput-1.30.1/src/quirks.c:1265:19: call_function: calling ‘init_dt’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1265:19: return_function: returning to ‘quirks_init_subsystem’ from ‘init_dt’
libinput-1.30.1/src/quirks.c:1266:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/quirks.c:1269:14: branch_false: ...to here
libinput-1.30.1/src/quirks.c:1269:14: call_function: calling ‘parse_files’ from ‘quirks_init_subsystem’
#  214|   	case QLOG_NOISE:
#  215|   	case QLOG_PARSER_ERROR:
#  216|-> 		if (ctx->log_type == QLOG_LIBINPUT_LOGGING)
#  217|   			return;
#  218|   		break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def93]
libinput-1.30.1/src/quirks.c:225:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.30.1/src/quirks.c:1211:1: enter_function: entry to ‘parse_files’
libinput-1.30.1/src/quirks.c:1224:17: call_function: calling ‘quirk_log_msg’ from ‘parse_files’
#  223|   	}
#  224|   
#  225|-> 	ctx->log_handler(ctx->libinput,
#  226|   			 (enum libinput_log_priority)priority,
#  227|   			 format,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
libinput-1.30.1/src/quirks.c:388:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(424)’
libinput-1.30.1/src/quirks.c:1540:1: enter_function: entry to ‘quirk_merge_event_codes’
libinput-1.30.1/src/quirks.c:1566:36: call_function: calling ‘property_new’ from ‘quirk_merge_event_codes’
#  386|   	p = zalloc(sizeof *p);
#  387|   	p->refcount = 1;
#  388|-> 	list_init(&p->link);
#  389|   
#  390|   	return p;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def95]
libinput-1.30.1/src/quirks.c:1058:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.30.1/src/quirks.c:1245:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1253:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.30.1/src/quirks.c:1255:9: branch_true: ...to here
libinput-1.30.1/src/quirks.c:1262:9: call_function: calling ‘quirk_log_msg’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1262:9: return_function: returning to ‘quirks_init_subsystem’ from ‘quirk_log_msg’
libinput-1.30.1/src/quirks.c:1264:20: call_function: calling ‘init_dmi’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1264:20: return_function: returning to ‘quirks_init_subsystem’ from ‘init_dmi’
libinput-1.30.1/src/quirks.c:1265:19: call_function: calling ‘init_dt’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1265:19: return_function: returning to ‘quirks_init_subsystem’ from ‘init_dt’
libinput-1.30.1/src/quirks.c:1266:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/quirks.c:1269:14: branch_false: ...to here
libinput-1.30.1/src/quirks.c:1269:14: call_function: calling ‘parse_files’ from ‘quirks_init_subsystem’
# 1056|   				*comment = '\0';
# 1057|   		}
# 1058|-> 		if (strlen(line) == 0)
# 1059|   			continue;
# 1060|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
libinput-1.30.1/src/quirks.c:1058:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.30.1/src/quirks.c:1245:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1251:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1253:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.30.1/src/quirks.c:1255:9: branch_true: ...to here
libinput-1.30.1/src/quirks.c:1262:9: call_function: calling ‘quirk_log_msg’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1262:9: return_function: returning to ‘quirks_init_subsystem’ from ‘quirk_log_msg’
libinput-1.30.1/src/quirks.c:1264:20: call_function: calling ‘init_dmi’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1264:20: return_function: returning to ‘quirks_init_subsystem’ from ‘init_dmi’
libinput-1.30.1/src/quirks.c:1265:19: call_function: calling ‘init_dt’ from ‘quirks_init_subsystem’
libinput-1.30.1/src/quirks.c:1265:19: return_function: returning to ‘quirks_init_subsystem’ from ‘init_dt’
libinput-1.30.1/src/quirks.c:1266:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/quirks.c:1269:14: branch_false: ...to here
libinput-1.30.1/src/quirks.c:1269:14: call_function: calling ‘parse_files’ from ‘quirks_init_subsystem’
# 1056|   				*comment = '\0';
# 1057|   		}
# 1058|-> 		if (strlen(line) == 0)
# 1059|   			continue;
# 1060|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
libinput-1.30.1/src/quirks.c:1332:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(56)’
libinput-1.30.1/src/quirks.c:1325:1: enter_function: entry to ‘quirks_new’
libinput-1.30.1/src/quirks.c:1329:13: call_function: calling ‘zalloc’ from ‘quirks_new’
libinput-1.30.1/src/quirks.c:1329:13: return_function: returning to ‘quirks_new’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1332:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/src/quirks.c:1332:9: danger: ‘zalloc(56)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/5)
# 1330|   	q->refcount = 1;
# 1331|   	q->nproperties = 0;
# 1332|-> 	list_init(&q->link);
# 1333|   	list_init(&q->floating_properties);
# 1334|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
libinput-1.30.1/src/quirks.c:1378:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/src/quirks.c:1516:1: enter_function: entry to ‘match_new’
libinput-1.30.1/src/quirks.c:1518:27: call_function: calling ‘zalloc’ from ‘match_new’
libinput-1.30.1/src/quirks.c:1518:27: return_function: returning to ‘match_new’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1520:9: call_function: calling ‘match_fill_name’ from ‘match_new’
libinput-1.30.1/src/quirks.c:1520:9: return_function: returning to ‘match_new’ from ‘match_fill_name’
libinput-1.30.1/src/quirks.c:1521:9: call_function: calling ‘match_fill_uniq’ from ‘match_new’
# 1376|   
# 1377|   	do {
# 1378|-> 		value = udev_device_get_property_value(d, prop);
# 1379|   		d = udev_device_get_parent(d);
# 1380|   	} while (value == NULL && d != NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
libinput-1.30.1/src/quirks.c:1378:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(320)’
libinput-1.30.1/src/quirks.c:1516:1: enter_function: entry to ‘match_new’
libinput-1.30.1/src/quirks.c:1518:27: call_function: calling ‘zalloc’ from ‘match_new’
libinput-1.30.1/src/quirks.c:1518:27: return_function: returning to ‘match_new’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1520:9: call_function: calling ‘match_fill_name’ from ‘match_new’
# 1376|   
# 1377|   	do {
# 1378|-> 		value = udev_device_get_property_value(d, prop);
# 1379|   		d = udev_device_get_parent(d);
# 1380|   	} while (value == NULL && d != NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
libinput-1.30.1/src/quirks.c:1379:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/src/quirks.c:1516:1: enter_function: entry to ‘match_new’
libinput-1.30.1/src/quirks.c:1518:27: call_function: calling ‘zalloc’ from ‘match_new’
libinput-1.30.1/src/quirks.c:1518:27: return_function: returning to ‘match_new’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1520:9: call_function: calling ‘match_fill_name’ from ‘match_new’
libinput-1.30.1/src/quirks.c:1520:9: return_function: returning to ‘match_new’ from ‘match_fill_name’
libinput-1.30.1/src/quirks.c:1521:9: call_function: calling ‘match_fill_uniq’ from ‘match_new’
# 1377|   	do {
# 1378|   		value = udev_device_get_property_value(d, prop);
# 1379|-> 		d = udev_device_get_parent(d);
# 1380|   	} while (value == NULL && d != NULL);
# 1381|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
libinput-1.30.1/src/quirks.c:1379:21: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(320)’
libinput-1.30.1/src/quirks.c:1516:1: enter_function: entry to ‘match_new’
libinput-1.30.1/src/quirks.c:1518:27: call_function: calling ‘zalloc’ from ‘match_new’
libinput-1.30.1/src/quirks.c:1518:27: return_function: returning to ‘match_new’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1520:9: call_function: calling ‘match_fill_name’ from ‘match_new’
# 1377|   	do {
# 1378|   		value = udev_device_get_property_value(d, prop);
# 1379|-> 		d = udev_device_get_parent(d);
# 1380|   	} while (value == NULL && d != NULL);
# 1381|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
libinput-1.30.1/src/quirks.c:1380:18: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(320)’
libinput-1.30.1/src/quirks.c:1516:1: enter_function: entry to ‘match_new’
libinput-1.30.1/src/quirks.c:1518:27: call_function: calling ‘zalloc’ from ‘match_new’
libinput-1.30.1/src/quirks.c:1518:27: return_function: returning to ‘match_new’ from ‘zalloc’
libinput-1.30.1/src/quirks.c:1520:9: call_function: calling ‘match_fill_name’ from ‘match_new’
# 1378|   		value = udev_device_get_property_value(d, prop);
# 1379|   		d = udev_device_get_parent(d);
# 1380|-> 	} while (value == NULL && d != NULL);
# 1381|   
# 1382|   	return value;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
libinput-1.30.1/src/udev-seat.c:327:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(3160)’
libinput-1.30.1/src/udev-seat.c:319:1: enter_function: entry to ‘udev_seat_create’
libinput-1.30.1/src/udev-seat.c:325:16: call_function: calling ‘zalloc’ from ‘udev_seat_create’
libinput-1.30.1/src/udev-seat.c:325:16: return_function: returning to ‘udev_seat_create’ from ‘zalloc’
libinput-1.30.1/src/udev-seat.c:327:9: throw: if ‘libinput_seat_init’ throws an exception...
libinput-1.30.1/src/udev-seat.c:327:9: danger: ‘zalloc(3160)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  325|   	seat = zalloc(sizeof *seat);
#  326|   
#  327|-> 	libinput_seat_init(&seat->base,
#  328|   			   &input->base,
#  329|   			   device_seat,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
libinput-1.30.1/src/udev-seat.c:385:13: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(360)’
libinput-1.30.1/src/udev-seat.c:374:1: enter_function: entry to ‘libinput_udev_create_context’
libinput-1.30.1/src/udev-seat.c:380:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/udev-seat.c:383:17: branch_false: ...to here
libinput-1.30.1/src/udev-seat.c:383:17: call_function: calling ‘zalloc’ from ‘libinput_udev_create_context’
libinput-1.30.1/src/udev-seat.c:383:17: return_function: returning to ‘libinput_udev_create_context’ from ‘zalloc’
libinput-1.30.1/src/udev-seat.c:385:13: throw: if ‘libinput_init’ throws an exception...
libinput-1.30.1/src/udev-seat.c:385:13: danger: ‘zalloc(360)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  383|   	input = zalloc(sizeof *input);
#  384|   
#  385|-> 	if (libinput_init(&input->base, interface, &interface_backend, user_data) !=
#  386|   	    0) {
#  387|   		libinput_unref(&input->base);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def105]
libinput-1.30.1/src/util-files.c:43:14: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.30.1/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.30.1/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.30.1/src/util-files.c:89:12: branch_false: ...to here
libinput-1.30.1/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:97:29: branch_true: ...to here
libinput-1.30.1/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.30.1/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.30.1/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:103:25: branch_true: ...to here
libinput-1.30.1/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:104:59: branch_true: ...to here
libinput-1.30.1/src/util-files.c:105:41: call_function: calling ‘file_destroy’ from ‘list_files’
#   41|   {
#   42|   	list_remove(&f->link);
#   43|-> 	free(f->name);
#   44|   	free(f->directory);
#   45|   	free(f);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def106]
libinput-1.30.1/src/util-files.c:44:14: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.30.1/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.30.1/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.30.1/src/util-files.c:89:12: branch_false: ...to here
libinput-1.30.1/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:97:29: branch_true: ...to here
libinput-1.30.1/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.30.1/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.30.1/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:103:25: branch_true: ...to here
libinput-1.30.1/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:104:59: branch_true: ...to here
libinput-1.30.1/src/util-files.c:105:41: call_function: calling ‘file_destroy’ from ‘list_files’
#   42|   	list_remove(&f->link);
#   43|   	free(f->name);
#   44|-> 	free(f->directory);
#   45|   	free(f);
#   46|   }

Error: GCC_ANALYZER_WARNING (CWE-590): [#def107]
libinput-1.30.1/src/util-files.c:45:9: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘f’ which points to memory on the stack
libinput-1.30.1/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.30.1/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.30.1/src/util-files.c:89:12: branch_false: ...to here
libinput-1.30.1/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:97:29: branch_true: ...to here
libinput-1.30.1/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.30.1/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.30.1/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:103:25: branch_true: ...to here
libinput-1.30.1/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:104:59: branch_true: ...to here
libinput-1.30.1/src/util-files.c:105:41: call_function: calling ‘file_destroy’ from ‘list_files’
#   43|   	free(f->name);
#   44|   	free(f->directory);
#   45|-> 	free(f);
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
libinput-1.30.1/src/util-files.c:71:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.30.1/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.30.1/src/util-files.c:89:12: branch_false: ...to here
libinput-1.30.1/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:97:29: branch_true: ...to here
libinput-1.30.1/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
#   69|   		f->name = safe_strdup(entry->d_name);
#   70|   		f->directory = safe_strdup(directory);
#   71|-> 		list_append(list, &f->link);
#   72|   	}
#   73|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
libinput-1.30.1/src/util-files.c:71:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.30.1/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.30.1/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.30.1/src/util-files.c:89:12: branch_false: ...to here
libinput-1.30.1/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:97:29: branch_true: ...to here
libinput-1.30.1/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
#   69|   		f->name = safe_strdup(entry->d_name);
#   70|   		f->directory = safe_strdup(directory);
#   71|-> 		list_append(list, &f->link);
#   72|   	}
#   73|   }

Error: GCC_ANALYZER_WARNING (CWE-126): [#def110]
libinput-1.30.1/src/util-files.c:104:43: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.30.1/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.30.1/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.30.1/src/util-files.c:89:12: branch_false: ...to here
libinput-1.30.1/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:97:29: branch_true: ...to here
libinput-1.30.1/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.30.1/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.30.1/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:103:25: branch_true: ...to here
libinput-1.30.1/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:104:59: branch_true: ...to here
libinput-1.30.1/src/util-files.c:104:43: danger: out-of-bounds read from byte 16 till byte 23 but ‘files’ ends at byte 16
#  102|   			struct file *new_file;
#  103|   			list_for_each_safe(new_file, &new_files, link) {
#  104|-> 				if (streq(old_file->name, new_file->name)) {
#  105|   					file_destroy(new_file);
#  106|   					break;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def111]
libinput-1.30.1/src/util-files.c:104:59: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.30.1/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.30.1/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
libinput-1.30.1/src/util-files.c:89:12: branch_false: ...to here
libinput-1.30.1/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:97:29: branch_true: ...to here
libinput-1.30.1/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.30.1/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.30.1/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:103:25: branch_true: ...to here
libinput-1.30.1/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-files.c:104:59: branch_true: ...to here
libinput-1.30.1/src/util-files.c:104:59: danger: out-of-bounds read from byte 16 till byte 23 but ‘new_files’ ends at byte 16
#  102|   			struct file *new_file;
#  103|   			list_for_each_safe(new_file, &new_files, link) {
#  104|-> 				if (streq(old_file->name, new_file->name)) {
#  105|   					file_destroy(new_file);
#  106|   					break;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def112]
libinput-1.30.1/src/util-files.c:120:9: warning[-Wanalyzer-infinite-loop]: infinite loop
libinput-1.30.1/src/util-files.c:120:9: danger: infinite loop here
libinput-1.30.1/src/util-files.c:120:9: branch_true: if it ever follows ‘true’ branch, it will always do so...
libinput-1.30.1/src/util-files.c:121:17: branch_true: ...to here
#  118|   	size_t nfiles = 0;
#  119|   	struct file *f;
#  120|-> 	list_for_each(f, &files, link) {
#  121|   		nfiles++;
#  122|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
libinput-1.30.1/src/util-files.h:58:1: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dir)’
libinput-1.30.1/test/test-plugins-lua.c:888:1: enter_function: entry to ‘lua_ignore_unsupported_codes’
libinput-1.30.1/test/test-plugins-lua.c:890:37: call_function: calling ‘tmpdir_create’ from ‘lua_ignore_unsupported_codes’
#   56|   }
#   57|   
#   58|-> DEFINE_TRIVIAL_CLEANUP_FUNC(DIR *, closedir);
#   59|   
#   60|   static inline int

Error: GCC_ANALYZER_WARNING (CWE-775): [#def114]
libinput-1.30.1/src/util-files.h:94:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
libinput-1.30.1/tools/libinput-record.c:2628:1: enter_function: entry to ‘main’
libinput-1.30.1/tools/libinput-record.c:2732:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-record.c:2738:32: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2738:32: call_function: calling ‘safe_strdup’ from ‘main’
libinput-1.30.1/tools/libinput-record.c:2738:32: return_function: returning to ‘main’ from ‘safe_strdup’
libinput-1.30.1/tools/libinput-record.c:2740:12: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-record.c:2740:43: branch_true: ...to here
libinput-1.30.1/tools/libinput-record.c:2740:13: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-record.c:2749:19: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2749:19: branch_false: following ‘false’ branch (when ‘ndevices <= 0’)...
libinput-1.30.1/tools/libinput-record.c:2752:41: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2752:41: call_function: calling ‘select_device’ from ‘main’
#   92|   {
#   93|   	if (*fd > -1) {
#   94|-> 		close(*fd);
#   95|   		*fd = -1;
#   96|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/tools/libinput-record.c:2363:1: enter_function: entry to ‘init_device’
libinput-1.30.1/tools/libinput-record.c:2365:46: call_function: calling ‘zalloc’ from ‘init_device’
libinput-1.30.1/tools/libinput-record.c:2365:46: return_function: returning to ‘init_device’ from ‘zalloc’
libinput-1.30.1/tools/libinput-record.c:2367:22: call_function: calling ‘safe_strdup’ from ‘init_device’
libinput-1.30.1/tools/libinput-record.c:2367:22: return_function: returning to ‘init_device’ from ‘safe_strdup’
libinput-1.30.1/tools/libinput-record.c:2369:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/tools/libinput-record.c:2365:42: call_function: inlined call to ‘_free_ptr_’ from ‘init_device’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def116]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*(void **)&namelist’
libinput-1.30.1/tools/libinput-record.c:2628:1: enter_function: entry to ‘main’
libinput-1.30.1/tools/libinput-record.c:2732:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-record.c:2738:32: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2738:32: call_function: calling ‘safe_strdup’ from ‘main’
libinput-1.30.1/tools/libinput-record.c:2738:32: return_function: returning to ‘main’ from ‘safe_strdup’
libinput-1.30.1/tools/libinput-record.c:2740:12: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-record.c:2740:43: branch_true: ...to here
libinput-1.30.1/tools/libinput-record.c:2740:13: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-record.c:2749:19: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2749:19: branch_false: following ‘false’ branch (when ‘ndevices <= 0’)...
libinput-1.30.1/tools/libinput-record.c:2752:41: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2752:41: call_function: calling ‘select_device’ from ‘main’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def117]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘<unknown>’
libinput-1.30.1/tools/libinput-record.c:2628:1: enter_function: entry to ‘main’
libinput-1.30.1/tools/libinput-record.c:2738:32: call_function: calling ‘safe_strdup’ from ‘main’
libinput-1.30.1/tools/libinput-record.c:2738:32: return_function: returning to ‘main’ from ‘safe_strdup’
libinput-1.30.1/tools/libinput-record.c:2740:13: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-record.c:2749:19: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2749:19: branch_false: following ‘false’ branch (when ‘ndevices <= 0’)...
libinput-1.30.1/tools/libinput-record.c:2752:41: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2752:41: call_function: calling ‘select_device’ from ‘main’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def118]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘options’
libinput-1.30.1/src/util-libinput.c:989:1: enter_function: entry to ‘libinput_event_to_str’
libinput-1.30.1/src/util-libinput.c:994:41: call_function: calling ‘print_event_header’ from ‘libinput_event_to_str’
libinput-1.30.1/src/util-libinput.c:994:41: return_function: returning to ‘libinput_event_to_str’ from ‘print_event_header’
libinput-1.30.1/src/util-libinput.c:1013:29: call_function: calling ‘print_device_notify’ from ‘libinput_event_to_str’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def119]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pad’
libinput-1.30.1/src/util-libinput.c:989:1: enter_function: entry to ‘libinput_event_to_str’
libinput-1.30.1/src/util-libinput.c:994:41: call_function: calling ‘print_event_header’ from ‘libinput_event_to_str’
libinput-1.30.1/src/util-libinput.c:994:41: return_function: returning to ‘libinput_event_to_str’ from ‘print_event_header’
libinput-1.30.1/src/util-libinput.c:1013:29: call_function: calling ‘print_device_notify’ from ‘libinput_event_to_str’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def120]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pinch’
libinput-1.30.1/src/util-libinput.c:989:1: enter_function: entry to ‘libinput_event_to_str’
libinput-1.30.1/src/util-libinput.c:994:41: call_function: calling ‘print_event_header’ from ‘libinput_event_to_str’
libinput-1.30.1/src/util-libinput.c:994:41: return_function: returning to ‘libinput_event_to_str’ from ‘print_event_header’
libinput-1.30.1/src/util-libinput.c:1051:29: call_function: calling ‘print_gesture_event_with_coords’ from ‘libinput_event_to_str’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def121]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘seat1_name’
libinput-1.30.1/test/test-udev.c:222:17: throw: if ‘_litest_wait_for_event_of_type’ throws an exception...
libinput-1.30.1/test/test-udev.c:220:26: call_function: inlined call to ‘_free_ptr_’ from ‘udev_change_seat’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def122]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘size’
libinput-1.30.1/src/util-libinput.c:989:1: enter_function: entry to ‘libinput_event_to_str’
libinput-1.30.1/src/util-libinput.c:994:41: call_function: calling ‘print_event_header’ from ‘libinput_event_to_str’
libinput-1.30.1/src/util-libinput.c:994:41: return_function: returning to ‘libinput_event_to_str’ from ‘print_event_header’
libinput-1.30.1/src/util-libinput.c:1072:29: call_function: calling ‘print_tablet_axis_event’ from ‘libinput_event_to_str’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def123]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘slot’
libinput-1.30.1/src/util-libinput.c:989:1: enter_function: entry to ‘libinput_event_to_str’
libinput-1.30.1/src/util-libinput.c:994:41: call_function: calling ‘print_event_header’ from ‘libinput_event_to_str’
libinput-1.30.1/src/util-libinput.c:994:41: return_function: returning to ‘libinput_event_to_str’ from ‘print_event_header’
libinput-1.30.1/src/util-libinput.c:1042:29: call_function: calling ‘print_touch_event’ from ‘libinput_event_to_str’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def124]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘sysname’
libinput-1.30.1/src/evdev.c:2241:1: enter_function: entry to ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: call_function: calling ‘str_sanitize’ from ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: return_function: returning to ‘evdev_device_create’ from ‘str_sanitize’
libinput-1.30.1/src/evdev.c:2251:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/evdev.c:2252:17: branch_true: ...to here
libinput-1.30.1/src/evdev.c:2252:17: throw: if ‘log_msg’ throws an exception...
libinput-1.30.1/src/evdev.c:2249:26: call_function: inlined call to ‘_free_ptr_’ from ‘evdev_device_create’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: COMPILER_WARNING (CWE-457): [#def125]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wmaybe-uninitialized]: ‘abs’ may be used uninitialized
#   80 |         free(*(void **)p);
#      |         ^~~~~~~~~~~~~~~~~
libinput-1.30.1/test/litest.c: scope_hint: In function ‘litest_create’
libinput-1.30.1/test/litest.c:2069:42: note: ‘abs’ was declared here
# 2069 |         _autofree_ struct input_absinfo *abs;
#      |                                          ^~~
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: COMPILER_WARNING (CWE-457): [#def126]
libinput-1.30.1/src/util-mem.h:80:9: warning[-Wmaybe-uninitialized]: ‘events’ may be used uninitialized
#   80 |         free(*(void **)p);
#      |         ^~~~~~~~~~~~~~~~~
libinput-1.30.1/test/litest.c: scope_hint: In function ‘litest_create’
libinput-1.30.1/test/litest.c:2070:25: note: ‘events’ was declared here
# 2070 |         _autofree_ int *events;
#      |                         ^~~~~~
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
libinput-1.30.1/src/util-mem.h:91:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(libevdev_uinput_get_devnode(*<unknown>.uinput), 2048)’
libinput-1.30.1/test/test-switch.c:754:1: enter_function: entry to ‘lid_update_hw_on_key_closed_on_init’
libinput-1.30.1/test/test-switch.c:769:17: acquire_resource: opened here
libinput-1.30.1/test/test-switch.c:770:9: branch_false: following ‘false’ branch...
libinput-1.30.1/test/test-switch.c:771:9: branch_false: ...to here
libinput-1.30.1/test/test-switch.c:771:9: throw: if ‘libevdev_new_from_fd’ throws an exception...
libinput-1.30.1/test/test-switch.c:768:25: call_function: inlined call to ‘_close_fd_’ from ‘lid_update_hw_on_key_closed_on_init’
#   89|   {
#   90|   	if (*fd != -1)
#   91|-> 		close(*fd);
#   92|   }
#   93|   

Error: COMPILER_WARNING (CWE-457): [#def128]
libinput-1.30.1/src/util-mem.h:131:20: warning[-Wmaybe-uninitialized]: ‘udev_device’ may be used uninitialized
#  131 |                 if (*_p)                                        \
#      |                    ^
libinput-1.30.1/test/litest.c: scope_hint: In function ‘grab_device’
libinput-1.30.1/test/litest.c:672:32: note: ‘udev_device’ was declared here
#  672 |         _unref_(udev_device) * udev_device;
#      |                                ^~~~~~~~~~~
#  129|   #define DEFINE_UNREF_CLEANUP_FUNC(_type)		\
#  130|   	static inline void _type##_unrefp(struct _type **_p) {	\
#  131|-> 		if (*_p)					\
#  132|   			_type##_unref(*_p);			\
#  133|   	}							\

Error: CPPCHECK_WARNING (CWE-476): [#def129]
libinput-1.30.1/src/util-stringbuf.h:42: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#   40|   stringbuf_init(struct stringbuf *b)
#   41|   {
#   42|-> 	b->len = 0;
#   43|   	b->sz = 64;
#   44|   	b->data = calloc(1, b->sz);

Error: CPPCHECK_WARNING (CWE-476): [#def130]
libinput-1.30.1/src/util-stringbuf.h:43: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#   41|   {
#   42|   	b->len = 0;
#   43|-> 	b->sz = 64;
#   44|   	b->data = calloc(1, b->sz);
#   45|   }

Error: CPPCHECK_WARNING (CWE-476): [#def131]
libinput-1.30.1/src/util-stringbuf.h:44: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: b
#   42|   	b->len = 0;
#   43|   	b->sz = 64;
#   44|-> 	b->data = calloc(1, b->sz);
#   45|   }
#   46|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def132]
libinput-1.30.1/src/util-stringbuf.h:120:41: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
libinput-1.30.1/test/litest-runner.c:547:1: enter_function: entry to ‘litest_runner_test_check_status’
libinput-1.30.1/test/litest-runner.c:551:12: branch_false: following ‘false’ branch...
libinput-1.30.1/test/litest-runner.c:551:12: branch_false: ...to here
libinput-1.30.1/test/litest-runner.c:557:20: branch_false: following ‘false’ branch...
libinput-1.30.1/test/litest-runner.c:560:20: branch_false: ...to here
libinput-1.30.1/test/litest-runner.c:560:20: branch_false: following ‘false’ branch...
libinput-1.30.1/test/litest-runner.c:564:21: branch_false: ...to here
libinput-1.30.1/test/litest-runner.c:564:20: branch_true: following ‘true’ branch...
libinput-1.30.1/test/litest-runner.c:566:38: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:570:29: call_function: calling ‘litest_runner_test_collect_child’ from ‘litest_runner_test_check_status’
#  118|   stringbuf_ensure_space(struct stringbuf *b, size_t sz)
#  119|   {
#  120|-> 	return stringbuf_ensure_size(b, b->len + sz);
#  121|   }
#  122|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
libinput-1.30.1/src/util-strings.c:145:20: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(*<unknown>)’
libinput-1.30.1/src/util-strings.c:132:1: enter_function: entry to ‘strv_from_argv’
libinput-1.30.1/src/util-strings.c:136:9: branch_true: following ‘true’ branch (when ‘argc >= 0’)...
libinput-1.30.1/src/util-strings.c:137:9: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:137:9: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
libinput-1.30.1/src/util-strings.c:139:12: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:139:12: branch_false: following ‘false’ branch (when ‘argc != 0’)...
libinput-1.30.1/src/util-strings.c:142:23: branch_false: ...to here
libinput-1.30.1/src/util-strings.c:142:16: call_function: calling ‘zalloc’ from ‘strv_from_argv’
libinput-1.30.1/src/util-strings.c:142:16: return_function: returning to ‘strv_from_argv’ from ‘zalloc’
libinput-1.30.1/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.30.1/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.30.1/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.30.1/src/util-strings.c:145:20: branch_false: following ‘false’ branch...
libinput-1.30.1/src/util-strings.c:149:21: branch_false: ...to here
libinput-1.30.1/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.30.1/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.30.1/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.30.1/src/util-strings.c:145:20: branch_false: following ‘false’ branch...
libinput-1.30.1/src/util-strings.c:149:21: branch_false: ...to here
libinput-1.30.1/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.30.1/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.30.1/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.30.1/src/util-strings.c:145:20: branch_false: following ‘false’ branch...
libinput-1.30.1/src/util-strings.c:149:21: branch_false: ...to here
libinput-1.30.1/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.30.1/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.30.1/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.30.1/src/util-strings.c:145:20: danger: ‘safe_strdup(*<unknown>)’ leaks here; was allocated at [(54)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/53)
#  143|   	for (int i = 0; i < argc; i++) {
#  144|   		char *copy = safe_strdup(argv[i]);
#  145|-> 		if (!copy) {
#  146|   			strv_free(strv);
#  147|   			return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
libinput-1.30.1/src/util-strings.h:60:13: warning[-Wanalyzer-malloc-leak]: leak of ‘str_sanitize(udev_device_get_sysname(udev_device))’
libinput-1.30.1/src/evdev.c:2241:1: enter_function: entry to ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: call_function: calling ‘str_sanitize’ from ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2249:36: return_function: returning to ‘evdev_device_create’ from ‘str_sanitize’
libinput-1.30.1/src/evdev.c:2251:12: branch_false: following ‘false’ branch...
libinput-1.30.1/src/evdev.c:2256:13: branch_false: ...to here
libinput-1.30.1/src/evdev.c:2256:13: call_function: calling ‘udev_device_should_be_ignored’ from ‘evdev_device_create’
libinput-1.30.1/src/evdev.c:2256:13: return_function: returning to ‘evdev_device_create’ from ‘udev_device_should_be_ignored’
libinput-1.30.1/src/evdev.c:2256:12: branch_true: following ‘true’ branch...
libinput-1.30.1/src/evdev.c:2257:17: branch_true: ...to here
libinput-1.30.1/src/evdev.c:2257:17: throw: if ‘log_msg’ throws an exception...
libinput-1.30.1/src/util-strings.h:60:13: danger: ‘str_sanitize(udev_device_get_sysname(udev_device))’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#   58|   {
#   59|   	/* one NULL, one not NULL is always false */
#   60|-> 	if (str1 && str2)
#   61|   		return strcmp(str1, str2) == 0;
#   62|   	return str1 == str2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
libinput-1.30.1/src/util-strings.h:153:16: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpdir_create(0)’
libinput-1.30.1/test/test-plugins-lua.c:763:1: enter_function: entry to ‘lua_udev_properties’
libinput-1.30.1/test/test-plugins-lua.c:765:37: call_function: calling ‘tmpdir_create’ from ‘lua_udev_properties’
libinput-1.30.1/test/test-plugins-lua.c:765:37: return_function: returning to ‘lua_udev_properties’ from ‘tmpdir_create’
libinput-1.30.1/test/test-plugins-lua.c:776:33: call_function: calling ‘_litest_write_plugin’ from ‘lua_udev_properties’
libinput-1.30.1/test/test-plugins-lua.c:776:33: return_function: returning to ‘lua_udev_properties’ from ‘_litest_write_plugin’
libinput-1.30.1/test/test-plugins-lua.c:782:9: branch_true: following ‘true’ branch (when ‘capture’ is non-NULL)...
libinput-1.30.1/test/test-plugins-lua.c:783:17: branch_true: ...to here
libinput-1.30.1/src/util-strings.h:153:16: danger: ‘tmpdir_create(0)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  151|   	if (rc < 0)
#  152|   		abort();
#  153|-> 	return strp;
#  154|   }
#  155|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
libinput-1.30.1/src/util-strings.h:153:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(16)’
libinput-1.30.1/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.30.1/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#  151|   	if (rc < 0)
#  152|   		abort();
#  153|-> 	return strp;
#  154|   }
#  155|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
libinput-1.30.1/src/util-strings.h:153:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(8)’
libinput-1.30.1/test/test-plugins-lua.c:888:1: enter_function: entry to ‘lua_ignore_unsupported_codes’
libinput-1.30.1/test/test-plugins-lua.c:890:37: call_function: calling ‘tmpdir_create’ from ‘lua_ignore_unsupported_codes’
#  151|   	if (rc < 0)
#  152|   		abort();
#  153|-> 	return strp;
#  154|   }
#  155|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
libinput-1.30.1/src/util-strings.h:365:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/src/util-strings.c:172:1: enter_function: entry to ‘strv_from_string’
libinput-1.30.1/src/util-strings.c:174:9: branch_true: following ‘true’ branch (when ‘in’ is non-NULL)...
libinput-1.30.1/src/util-strings.c:175:9: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:175:9: branch_true: following ‘true’ branch (when ‘separators’ is non-NULL)...
libinput-1.30.1/src/util-strings.c:177:21: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:179:16: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.30.1/src/util-strings.c:179:16: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.30.1/src/util-strings.c:179:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-strings.c:180:17: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:179:16: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.30.1/src/util-strings.c:179:16: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.30.1/src/util-strings.c:179:16: branch_false: following ‘false’ branch...
libinput-1.30.1/src/util-strings.c:182:12: branch_false: ...to here
libinput-1.30.1/src/util-strings.c:182:12: branch_false: following ‘false’ branch (when ‘nelems != 0’)...
libinput-1.30.1/src/util-strings.c:188:16: branch_false: ...to here
libinput-1.30.1/src/util-strings.c:189:23: call_function: calling ‘zalloc’ from ‘strv_from_string’
libinput-1.30.1/src/util-strings.c:189:23: return_function: returning to ‘strv_from_string’ from ‘zalloc’
libinput-1.30.1/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.30.1/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.30.1/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:196:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libinput-1.30.1/src/util-strings.c:203:17: branch_false: ...to here
libinput-1.30.1/src/util-strings.c:203:17: branch_true: following ‘true’ branch (when ‘idx < strv_len’)...
libinput-1.30.1/src/util-strings.c:204:22: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.30.1/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.30.1/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:196:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libinput-1.30.1/src/util-strings.c:203:17: branch_false: ...to here
libinput-1.30.1/src/util-strings.c:203:17: branch_true: following ‘true’ branch (when ‘idx < strv_len’)...
libinput-1.30.1/src/util-strings.c:204:22: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.30.1/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.30.1/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:195:30: acquire_memory: allocated here
libinput-1.30.1/src/util-strings.c:196:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libinput-1.30.1/src/util-strings.c:203:17: branch_false: ...to here
libinput-1.30.1/src/util-strings.c:203:17: branch_true: following ‘true’ branch (when ‘idx < strv_len’)...
libinput-1.30.1/src/util-strings.c:204:22: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.30.1/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.30.1/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.30.1/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.30.1/src/util-strings.c:196:20: branch_true: following ‘true’ branch (when ‘copy’ is NULL)...
libinput-1.30.1/src/util-strings.c:197:25: call_function: inlined call to ‘strv_free’ from ‘strv_from_string’
#  363|   	}
#  364|   
#  365|-> 	free(strv);
#  366|   }
#  367|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def139]
libinput-1.30.1/src/util-strings.h:368:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘<unknown>’
libinput-1.30.1/test/litest.c:5164:20: branch_false: following ‘false’ branch (when ‘c != -1’)...
libinput-1.30.1/test/litest.c:5166:17: branch_false: ...to here
libinput-1.30.1/test/litest.c:5224:28: branch_false: following ‘false’ branch...
libinput-1.30.1/test/litest.c:5224:28: branch_false: ...to here
libinput-1.30.1/test/litest.c:5230:44: branch_true: following ‘true’ branch...
libinput-1.30.1/test/litest.c:5233:64: branch_true: ...to here
libinput-1.30.1/test/litest.c:5233:41: throw: if ‘strv_from_string’ throws an exception...
libinput-1.30.1/test/litest.c:5221:47: call_function: inlined call to ‘strv_freep’ from ‘litest_parse_argv’
#  366|   }
#  367|   
#  368|-> DEFINE_TRIVIAL_CLEANUP_FUNC(char **, strv_free);
#  369|   
#  370|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def140]
libinput-1.30.1/src/util-strings.h:368:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘paths’
libinput-1.30.1/tools/libinput-record.c:2628:1: enter_function: entry to ‘main’
libinput-1.30.1/tools/libinput-record.c:2740:13: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-record.c:2749:19: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2749:19: branch_true: following ‘true’ branch (when ‘ndevices > 0’)...
libinput-1.30.1/tools/libinput-record.c:2750:55: branch_true: ...to here
libinput-1.30.1/tools/libinput-record.c:2759:32: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-record.c:2760:22: branch_true: ...to here
libinput-1.30.1/tools/libinput-record.c:2760:22: call_function: calling ‘init_device’ from ‘main’
libinput-1.30.1/tools/libinput-record.c:2651:31: call_function: inlined call to ‘strv_freep’ from ‘main’
#  366|   }
#  367|   
#  368|-> DEFINE_TRIVIAL_CLEANUP_FUNC(char **, strv_free);
#  369|   
#  370|   /**

Error: GCC_ANALYZER_WARNING (CWE-457): [#def141]
libinput-1.30.1/src/util-strings.h:368:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘strv’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:190:1: enter_function: entry to ‘print_state’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:207:9: call_function: calling ‘print_bar’ from ‘print_state’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:207:9: return_function: returning to ‘print_state’ from ‘print_bar’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:208:9: call_function: calling ‘print_bar’ from ‘print_state’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:208:9: return_function: returning to ‘print_state’ from ‘print_bar’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:209:9: call_function: calling ‘print_bar’ from ‘print_state’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:209:9: return_function: returning to ‘print_state’ from ‘print_bar’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:210:9: call_function: calling ‘print_bar’ from ‘print_state’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:210:9: return_function: returning to ‘print_state’ from ‘print_bar’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:211:9: call_function: inlined call to ‘print_dial’ from ‘print_state’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:211:9: call_function: inlined call to ‘print_dial’ from ‘print_state’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:212:9: call_function: inlined call to ‘print_dial’ from ‘print_state’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:212:9: call_function: inlined call to ‘print_dial’ from ‘print_state’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:213:9: call_function: calling ‘print_buttons’ from ‘print_state’
#  366|   }
#  367|   
#  368|-> DEFINE_TRIVIAL_CLEANUP_FUNC(char **, strv_free);
#  369|   
#  370|   /**

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
libinput-1.30.1/test/litest-main.c:170:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/test/litest-main.c:157:1: enter_function: entry to ‘setup_tests’
libinput-1.30.1/test/litest-main.c:165:25: branch_true: following ‘true’ branch...
libinput-1.30.1/test/litest-main.c:168:21: branch_true: ...to here
libinput-1.30.1/test/litest-main.c:168:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.30.1/test/litest-main.c:168:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.30.1/test/litest-main.c:169:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.30.1/test/litest-main.c:169:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.30.1/test/litest-main.c:172:17: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/test/litest-main.c:170:25: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  168|   		s = zalloc(sizeof(*s));
#  169|   		s->name = safe_strdup(
#  170|-> 			c->name); /* NOLINT(clang-analyzer-security.ArrayBound) */
#  171|   
#  172|   		list_init(&s->tests);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def143]
libinput-1.30.1/test/litest-main.c:170:25: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libinput-1.30.1/test/litest-main.c:157:1: enter_function: entry to ‘setup_tests’
libinput-1.30.1/test/litest-main.c:165:25: branch_true: following ‘true’ branch...
libinput-1.30.1/test/litest-main.c:168:21: branch_true: ...to here
libinput-1.30.1/test/litest-main.c:168:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.30.1/test/litest-main.c:168:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.30.1/test/litest-main.c:169:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.30.1/test/litest-main.c:169:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.30.1/test/litest-main.c:165:25: branch_true: following ‘true’ branch...
libinput-1.30.1/test/litest-main.c:168:21: branch_true: ...to here
libinput-1.30.1/test/litest-main.c:168:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.30.1/test/litest-main.c:168:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.30.1/test/litest-main.c:170:25: danger: out-of-bounds read from byte 16 till byte 23 but ‘__start_test_collection_section’ ends at byte 16
#  168|   		s = zalloc(sizeof(*s));
#  169|   		s->name = safe_strdup(
#  170|-> 			c->name); /* NOLINT(clang-analyzer-security.ArrayBound) */
#  171|   
#  172|   		list_init(&s->tests);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
libinput-1.30.1/test/litest-main.c:172:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/test/litest-main.c:157:1: enter_function: entry to ‘setup_tests’
libinput-1.30.1/test/litest-main.c:165:25: branch_true: following ‘true’ branch...
libinput-1.30.1/test/litest-main.c:168:21: branch_true: ...to here
libinput-1.30.1/test/litest-main.c:168:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.30.1/test/litest-main.c:168:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.30.1/test/litest-main.c:169:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.30.1/test/litest-main.c:169:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.30.1/test/litest-main.c:172:17: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/test/litest-main.c:172:17: danger: ‘<unknown>’ leaks here; was allocated at [(15)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/14)
#  170|   			c->name); /* NOLINT(clang-analyzer-security.ArrayBound) */
#  171|   
#  172|-> 		list_init(&s->tests);
#  173|   		list_append(&all_test_suites, &s->node);
#  174|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def145]
libinput-1.30.1/test/litest-runner.c:169:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor
libinput-1.30.1/test/litest-runner.c:625:1: enter_function: entry to ‘litest_runner_run_test’
libinput-1.30.1/test/litest-runner.c:635:12: branch_false: following ‘false’ branch...
libinput-1.30.1/test/litest-runner.c:643:21: branch_false: ...to here
libinput-1.30.1/test/litest-runner.c:643:21: call_function: calling ‘litest_runner_fork_test’ from ‘litest_runner_run_test’
#  167|   		 * then affects execution.
#  168|   		 */
#  169|-> 		fcntl(write_fds[i], F_SETPIPE_SZ, pipe_max_size);
#  170|   #endif
#  171|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def146]
libinput-1.30.1/test/litest-runner.c:169:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘write_fds[0]’
libinput-1.30.1/test/litest-runner.c:625:1: enter_function: entry to ‘litest_runner_run_test’
libinput-1.30.1/test/litest-runner.c:635:12: branch_false: following ‘false’ branch...
libinput-1.30.1/test/litest-runner.c:643:21: branch_false: ...to here
libinput-1.30.1/test/litest-runner.c:643:21: call_function: calling ‘litest_runner_fork_test’ from ‘litest_runner_run_test’
#  167|   		 * then affects execution.
#  168|   		 */
#  169|-> 		fcntl(write_fds[i], F_SETPIPE_SZ, pipe_max_size);
#  170|   #endif
#  171|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def147]
libinput-1.30.1/test/litest-runner.c:685:41: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.30.1/test/litest-runner.c:676:9: acquire_resource: ‘va_start’ called here
libinput-1.30.1/test/litest-runner.c:678:16: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
libinput-1.30.1/test/litest-runner.c:680:35: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:682:17: branch_true: following ‘true’ branch...
libinput-1.30.1/test/litest-runner.c:683:35: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:684:36: branch_true: following ‘true’ branch (when ‘__res != __res’)...
libinput-1.30.1/test/litest-runner.c:685:41: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:685:41: throw: if ‘litest_fail_condition’ throws an exception...
libinput-1.30.1/test/litest-runner.c:685:41: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  683|   			if (streq(p->name, name)) {
#  684|   				if (tolower(p->value.type) != tolower(type))
#  685|-> 					litest_abort_msg(
#  686|   						"Paramter type mismatch: parameter '%s' is of type %c",
#  687|   						p->name,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
libinput-1.30.1/test/litest-runner.c:706:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.30.1/test/litest-runner.c:702:1: enter_function: entry to ‘litest_test_parameters_new’
libinput-1.30.1/test/litest-runner.c:704:49: call_function: calling ‘zalloc’ from ‘litest_test_parameters_new’
libinput-1.30.1/test/litest-runner.c:704:49: return_function: returning to ‘litest_test_parameters_new’ from ‘zalloc’
libinput-1.30.1/test/litest-runner.c:706:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/test/litest-runner.c:706:9: danger: ‘zalloc(24)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
#  704|   	struct litest_test_parameters *params = zalloc(sizeof *params);
#  705|   	params->refcnt = 1;
#  706|-> 	list_init(&params->test_params);
#  707|   	return params;
#  708|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
libinput-1.30.1/test/litest-runner.c:833:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(128)’
libinput-1.30.1/test/litest-runner.c:829:1: enter_function: entry to ‘litest_runner_new’
libinput-1.30.1/test/litest-runner.c:831:40: call_function: calling ‘zalloc’ from ‘litest_runner_new’
libinput-1.30.1/test/litest-runner.c:831:40: return_function: returning to ‘litest_runner_new’ from ‘zalloc’
libinput-1.30.1/test/litest-runner.c:833:9: throw: if ‘list_init’ throws an exception...
libinput-1.30.1/test/litest-runner.c:833:9: danger: ‘zalloc(128)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
#  831|   	struct litest_runner *runner = zalloc(sizeof *runner);
#  832|   
#  833|-> 	list_init(&runner->tests);
#  834|   	list_init(&runner->tests_complete);
#  835|   	list_init(&runner->tests_running);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
libinput-1.30.1/test/litest-runner.c:903:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(736)’
libinput-1.30.1/test/litest-runner.c:892:1: enter_function: entry to ‘litest_runner_add_test’
libinput-1.30.1/test/litest-runner.c:895:40: call_function: calling ‘zalloc’ from ‘litest_runner_add_test’
libinput-1.30.1/test/litest-runner.c:895:40: return_function: returning to ‘litest_runner_add_test’ from ‘zalloc’
libinput-1.30.1/test/litest-runner.c:902:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:903:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:902:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:903:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:902:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:903:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:902:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:903:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:902:25: branch_false: following ‘false’ branch (when ‘i == 4’)...
libinput-1.30.1/test/litest-runner.c:902:25: branch_false: ...to here
libinput-1.30.1/test/litest-runner.c:906:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:907:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:906:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:907:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:906:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:907:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:906:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:907:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:906:28: branch_false: following ‘false’ branch (when ‘i == 4’)...
libinput-1.30.1/test/litest-runner.c:910:9: branch_false: ...to here
libinput-1.30.1/test/litest-runner.c:903:17: danger: ‘zalloc(736)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/5)
#  901|   
#  902|   	for (int i = 0; i < _FD_LAST; i++) {
#  903|-> 		stringbuf_init(&t->logs[i]);
#  904|   	}
#  905|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
libinput-1.30.1/test/litest-runner.c:910:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/test/litest-runner.c:892:1: enter_function: entry to ‘litest_runner_add_test’
libinput-1.30.1/test/litest-runner.c:895:40: call_function: calling ‘zalloc’ from ‘litest_runner_add_test’
libinput-1.30.1/test/litest-runner.c:895:40: return_function: returning to ‘litest_runner_add_test’ from ‘zalloc’
libinput-1.30.1/test/litest-runner.c:902:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:903:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:903:17: call_function: calling ‘stringbuf_init’ from ‘litest_runner_add_test’
libinput-1.30.1/test/litest-runner.c:903:17: return_function: returning to ‘litest_runner_add_test’ from ‘stringbuf_init’
libinput-1.30.1/test/litest-runner.c:902:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:903:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:902:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:903:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:902:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:903:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:902:25: branch_false: following ‘false’ branch (when ‘i == 4’)...
libinput-1.30.1/test/litest-runner.c:902:25: branch_false: ...to here
libinput-1.30.1/test/litest-runner.c:906:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:907:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:906:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:907:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:906:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:907:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:906:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.30.1/test/litest-runner.c:907:17: branch_true: ...to here
libinput-1.30.1/test/litest-runner.c:906:28: branch_false: following ‘false’ branch (when ‘i == 4’)...
libinput-1.30.1/test/litest-runner.c:910:9: branch_false: ...to here
libinput-1.30.1/test/litest-runner.c:910:9: danger: ‘<unknown>’ leaks here; was allocated at [(13)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/12)
#  908|   	}
#  909|   
#  910|-> 	list_append(&runner->tests, &t->node);
#  911|   }
#  912|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
libinput-1.30.1/test/litest.c:267:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.30.1/test/litest.c:4856:1: enter_function: entry to ‘litest_logcapture_setup’
libinput-1.30.1/test/litest.c:4858:39: call_function: calling ‘zalloc’ from ‘litest_logcapture_setup’
libinput-1.30.1/test/litest.c:4858:39: return_function: returning to ‘litest_logcapture_setup’ from ‘zalloc’
libinput-1.30.1/test/litest.c:4859:9: call_function: calling ‘litest_context_set_user_data’ from ‘litest_logcapture_setup’
#  265|   			   const char *comparison)
#  266|   {
#  267|-> 	litest_log("FAILED COMPARISON: %s\n", comparison);
#  268|   	litest_log("in %s() (%s:%d)\n", func, file, line);
#  269|   	litest_backtrace(func);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
libinput-1.30.1/test/litest.c:846:19: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(80)’
libinput-1.30.1/test/litest.c:867:1: enter_function: entry to ‘litest_add_tcase_for_device_with_params’
libinput-1.30.1/test/litest.c:884:9: call_function: calling ‘litest_parameters_permutations’ from ‘litest_add_tcase_for_device_with_params’
#  844|   
#  845|   	t = zalloc(sizeof(*t));
#  846|-> 	t->name = safe_strdup(data->funcname);
#  847|   	t->func = data->func;
#  848|   	if (data->dev) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
libinput-1.30.1/test/litest.c:861:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/test/litest.c:867:1: enter_function: entry to ‘litest_add_tcase_for_device_with_params’
libinput-1.30.1/test/litest.c:884:9: call_function: calling ‘litest_parameters_permutations’ from ‘litest_add_tcase_for_device_with_params’
#  859|   	t->params = params;
#  860|   
#  861|-> 	list_append(&data->suite->tests, &t->node);
#  862|   
#  863|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
libinput-1.30.1/test/litest.c:2181:48: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.30.1/test/litest.c:4856:1: enter_function: entry to ‘litest_logcapture_setup’
libinput-1.30.1/test/litest.c:4858:39: call_function: calling ‘zalloc’ from ‘litest_logcapture_setup’
libinput-1.30.1/test/litest.c:4858:39: return_function: returning to ‘litest_logcapture_setup’ from ‘zalloc’
libinput-1.30.1/test/litest.c:4859:9: call_function: calling ‘litest_context_set_user_data’ from ‘litest_logcapture_setup’
# 2179|   litest_context_set_user_data(struct libinput *li, void *data)
# 2180|   {
# 2181|-> 	struct litest_user_data *litest_data = libinput_get_user_data(li);
# 2182|   	litest_assert_ptr_notnull(litest_data);
# 2183|   	litest_data->private = data;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def156]
libinput-1.30.1/test/test-misc.c:81:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.30.1/test/test-misc.c:74:9: acquire_resource: ‘va_start’ called here
libinput-1.30.1/test/test-misc.c:76:16: branch_true: following ‘true’ branch (when ‘type != 4294967295’)...
libinput-1.30.1/test/test-misc.c:77:16: branch_true: ...to here
libinput-1.30.1/test/test-misc.c:76:16: branch_true: following ‘true’ branch (when ‘code != 4294967295’)...
libinput-1.30.1/test/test-misc.c:79:20: branch_true: ...to here
libinput-1.30.1/test/test-misc.c:81:17: throw: if ‘libevdev_enable_event_code’ throws an exception...
libinput-1.30.1/test/test-misc.c:81:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   79|   		if (type == EV_ABS)
#   80|   			a = &abs;
#   81|-> 		libevdev_enable_event_code(evdev, type, code, a);
#   82|   	}
#   83|   

Error: COMPILER_WARNING (CWE-252): [#def157]
libinput-1.30.1/test/test-plugins-lua.c: scope_hint: In function ‘_litest_write_plugin’
libinput-1.30.1/test/test-plugins-lua.c:47:17: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   47 |                 write(fd, content, strlen(content));
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   45|   
#   46|   	if (content) {
#   47|-> 		write(fd, content, strlen(content));
#   48|   		fsync(fd);
#   49|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def158]
libinput-1.30.1/test/test-plugins-lua.c:776:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.30.1/test/test-plugins-lua.c:763:1: enter_function: entry to ‘lua_udev_properties’
libinput-1.30.1/test/test-plugins-lua.c:765:37: call_function: calling ‘tmpdir_create’ from ‘lua_udev_properties’
libinput-1.30.1/test/test-plugins-lua.c:765:37: return_function: returning to ‘lua_udev_properties’ from ‘tmpdir_create’
libinput-1.30.1/test/test-plugins-lua.c:776:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  774|   		"libinput:connect(\"new-evdev-device\", prop_printer)\n";
#  775|   
#  776|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  777|   	_litest_context_destroy_ struct libinput *li =
#  778|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def159]
libinput-1.30.1/test/test-plugins-lua.c:851:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.30.1/test/test-plugins-lua.c:821:1: enter_function: entry to ‘lua_append_prepend_frame’
libinput-1.30.1/test/test-plugins-lua.c:825:37: call_function: calling ‘tmpdir_create’ from ‘lua_append_prepend_frame’
libinput-1.30.1/test/test-plugins-lua.c:825:37: return_function: returning to ‘lua_append_prepend_frame’ from ‘tmpdir_create’
libinput-1.30.1/test/test-plugins-lua.c:826:32: call_function: calling ‘strdup_printf’ from ‘lua_append_prepend_frame’
libinput-1.30.1/test/test-plugins-lua.c:826:32: return_function: returning to ‘lua_append_prepend_frame’ from ‘strdup_printf’
libinput-1.30.1/test/test-plugins-lua.c:851:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  849|   		in_timer ? "" : "-- ",
#  850|   		append ? "append" : "prepend");
#  851|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  852|   	_litest_context_destroy_ struct libinput *li =
#  853|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def160]
libinput-1.30.1/test/test-plugins-lua.c:908:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.30.1/test/test-plugins-lua.c:888:1: enter_function: entry to ‘lua_ignore_unsupported_codes’
libinput-1.30.1/test/test-plugins-lua.c:890:37: call_function: calling ‘tmpdir_create’ from ‘lua_ignore_unsupported_codes’
libinput-1.30.1/test/test-plugins-lua.c:890:37: return_function: returning to ‘lua_ignore_unsupported_codes’ from ‘tmpdir_create’
libinput-1.30.1/test/test-plugins-lua.c:891:32: call_function: calling ‘strdup_printf’ from ‘lua_ignore_unsupported_codes’
libinput-1.30.1/test/test-plugins-lua.c:891:32: return_function: returning to ‘lua_ignore_unsupported_codes’ from ‘strdup_printf’
libinput-1.30.1/test/test-plugins-lua.c:908:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  906|   		"    device:connect(\"evdev-frame\", frame_handler)\n"
#  907|   		"end)\n");
#  908|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  909|   	_litest_context_destroy_ struct libinput *li =
#  910|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def161]
libinput-1.30.1/test/test-plugins-lua.c:953:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.30.1/test/test-plugins-lua.c:937:1: enter_function: entry to ‘lua_disable_button_debounce’
libinput-1.30.1/test/test-plugins-lua.c:940:37: call_function: calling ‘tmpdir_create’ from ‘lua_disable_button_debounce’
libinput-1.30.1/test/test-plugins-lua.c:940:37: return_function: returning to ‘lua_disable_button_debounce’ from ‘tmpdir_create’
libinput-1.30.1/test/test-plugins-lua.c:941:32: call_function: calling ‘strdup_printf’ from ‘lua_disable_button_debounce’
libinput-1.30.1/test/test-plugins-lua.c:941:32: return_function: returning to ‘lua_disable_button_debounce’ from ‘strdup_printf’
libinput-1.30.1/test/test-plugins-lua.c:953:33: danger: dereference of NULL ‘tmpdir_create(0)’
#  951|   		when == DEVICE_NEW ? "" : "--",
#  952|   		when == FIRST_FRAME ? "" : "--");
#  953|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
#  954|   	etrace("%s", lua);
#  955|   	_litest_context_destroy_ struct libinput *li =

Error: GCC_ANALYZER_WARNING (CWE-476): [#def162]
libinput-1.30.1/test/test-plugins-lua.c:1016:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libinput-1.30.1/test/test-plugins-lua.c:997:1: enter_function: entry to ‘lua_disable_touchpad_jump_detection’
libinput-1.30.1/test/test-plugins-lua.c:1000:37: call_function: calling ‘tmpdir_create’ from ‘lua_disable_touchpad_jump_detection’
libinput-1.30.1/test/test-plugins-lua.c:1000:37: return_function: returning to ‘lua_disable_touchpad_jump_detection’ from ‘tmpdir_create’
libinput-1.30.1/test/test-plugins-lua.c:1001:32: call_function: calling ‘strdup_printf’ from ‘lua_disable_touchpad_jump_detection’
libinput-1.30.1/test/test-plugins-lua.c:1001:32: return_function: returning to ‘lua_disable_touchpad_jump_detection’ from ‘strdup_printf’
libinput-1.30.1/test/test-plugins-lua.c:1016:33: danger: dereference of NULL ‘tmpdir_create(0)’
# 1014|   	etrace("plugin data:\n%s", lua);
# 1015|   
# 1016|-> 	_autofree_ char *path = litest_write_plugin(tmpdir->path, lua);
# 1017|   	_litest_context_destroy_ struct libinput *li =
# 1018|   		litest_create_context_with_plugindir(tmpdir->path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
libinput-1.30.1/test/test-quirks.c:54:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(16)’
libinput-1.30.1/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.30.1/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#   52|   	char dirname[PATH_MAX] = "/tmp/litest-quirk-test-XXXXXX";
#   53|   
#   54|-> 	litest_assert_notnull(mkdtemp(dirname));
#   55|   	dir->dirname = safe_strdup(dirname);
#   56|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
libinput-1.30.1/test/test-quirks.c:62:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.30.1/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#   60|   		_autofclose_ FILE *fp = fopen(filename, "w+");
#   61|   #ifndef __clang_analyzer__
#   62|-> 		litest_assert_notnull(fp);
#   63|   #else
#   64|   		assert(fp);

Error: CPPCHECK_WARNING (CWE-476): [#def165]
libinput-1.30.1/test/test-quirks.c:66: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
#   64|   		assert(fp);
#   65|   #endif
#   66|-> 		int rc = fputs(file_content, fp); // NOLINT: unix.Stream
#   67|   		litest_assert_errno_success(rc);
#   68|   		dir->filename = filename;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def166]
libinput-1.30.1/test/test-quirks.c:66:26: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(strdup_printf("%s/testfile.quirks", &dirname), "w+")’ where non-null expected
libinput-1.30.1/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.30.1/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#   64|   		assert(fp);
#   65|   #endif
#   66|-> 		int rc = fputs(file_content, fp); // NOLINT: unix.Stream
#   67|   		litest_assert_errno_success(rc);
#   68|   		dir->filename = filename;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def167]
libinput-1.30.1/test/test-quirks.c:67:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(strdup_printf("%s/testfile.quirks", &dirname), "w+")’
libinput-1.30.1/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.30.1/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#   65|   #endif
#   66|   		int rc = fputs(file_content, fp); // NOLINT: unix.Stream
#   67|-> 		litest_assert_errno_success(rc);
#   68|   		dir->filename = filename;
#   69|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
libinput-1.30.1/test/test-quirks.c:67:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.30.1/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#   65|   #endif
#   66|   		int rc = fputs(file_content, fp); // NOLINT: unix.Stream
#   67|-> 		litest_assert_errno_success(rc);
#   68|   		dir->filename = filename;
#   69|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
libinput-1.30.1/test/test-quirks.c:67:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(strdup_printf("%s/testfile.quirks", &dirname), "w+")’
libinput-1.30.1/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.30.1/test/test-quirks.c:1518:35: call_function: calling ‘data_dir_new’ from ‘quirks_ctx_ref’
#   65|   #endif
#   66|   		int rc = fputs(file_content, fp); // NOLINT: unix.Stream
#   67|-> 		litest_assert_errno_success(rc);
#   68|   		dir->filename = filename;
#   69|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def170]
libinput-1.30.1/test/test-tablet.c:7447: warning[uninitvar]: Uninitialized variables: tool.link, tool.serial, tool.tool_id, tool.type, tool.refcount, tool.user_data, tool.last_device, tool.pressure, tool.eraser_button, tool.config, tool.last_tablet_id
# 7445|   	}
# 7446|   
# 7447|-> 	if (!libinput_tablet_tool_config_eraser_button_get_modes(tool)) {
# 7448|   		libinput_tablet_tool_unref(tool);
# 7449|   		return LITEST_NOT_APPLICABLE;

Error: COMPILER_WARNING (CWE-252): [#def171]
libinput-1.30.1/test/test-utils.c: scope_hint: In function ‘find_files_test’
libinput-1.30.1/test/test-utils.c:138:9: warning[-Wunused-result]: ignoring return value of ‘mkdtemp’ declared with attribute ‘warn_unused_result’
#  138 |         mkdtemp(dirname);
#      |         ^~~~~~~~~~~~~~~~
#  136|   {
#  137|   	_autofree_ char *dirname = strdup("/tmp/litest_find_files_test.XXXXXX");
#  138|-> 	mkdtemp(dirname);
#  139|   
#  140|   	_autofree_ char *d1 = strdup_printf("%s/d1", dirname);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:263:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(udev_device_get_devnode(libinput_device_get_udev_device(libinput_event_get_device(ev))), 2048)’
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:246:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:249:14: branch_false: ...to here
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:249:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:252:23: branch_false: ...to here
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:256:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:259:19: branch_false: ...to here
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:260:12: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:261:26: branch_true: ...to here
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:261:26: acquire_resource: opened here
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:262:17: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:263:17: branch_true: ...to here
libinput-1.30.1/tools/libinput-debug-tablet-pad.c:263:17: danger: ‘open(udev_device_get_devnode(libinput_device_get_udev_device(libinput_event_get_device(ev))), 2048)’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  261|   		int fd = open(devnode, O_RDONLY | O_NONBLOCK);
#  262|   		assert(fd != -1);
#  263|-> 		assert(libevdev_new_from_fd(fd, &ctx->evdev) == 0);
#  264|   	}
#  265|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def173]
libinput-1.30.1/tools/libinput-debug-tablet.c:273:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(udev_device_get_devnode(libinput_device_get_udev_device(libinput_event_get_device(ev))), 2048)’
libinput-1.30.1/tools/libinput-debug-tablet.c:257:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-debug-tablet.c:260:14: branch_false: ...to here
libinput-1.30.1/tools/libinput-debug-tablet.c:260:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-debug-tablet.c:263:23: branch_false: ...to here
libinput-1.30.1/tools/libinput-debug-tablet.c:266:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-debug-tablet.c:269:19: branch_false: ...to here
libinput-1.30.1/tools/libinput-debug-tablet.c:270:12: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-debug-tablet.c:271:26: branch_true: ...to here
libinput-1.30.1/tools/libinput-debug-tablet.c:271:26: acquire_resource: opened here
libinput-1.30.1/tools/libinput-debug-tablet.c:272:17: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-debug-tablet.c:273:17: branch_true: ...to here
libinput-1.30.1/tools/libinput-debug-tablet.c:273:17: danger: ‘open(udev_device_get_devnode(libinput_device_get_udev_device(libinput_event_get_device(ev))), 2048)’ leaks here; was opened at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  271|   		int fd = open(devnode, O_RDONLY | O_NONBLOCK);
#  272|   		assert(fd != -1);
#  273|-> 		assert(libevdev_new_from_fd(fd, &ctx->evdev) == 0);
#  274|   	}
#  275|   

Error: COMPILER_WARNING (CWE-252): [#def174]
libinput-1.30.1/tools/libinput-record.c: scope_hint: In function ‘signalfd_dispatch’
libinput-1.30.1/tools/libinput-record.c:2106:15: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 2106 |         (void)read(fd, &fdsi, sizeof(fdsi));
#      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2104|   	struct signalfd_siginfo fdsi;
# 2105|   
# 2106|-> 	(void)read(fd, &fdsi, sizeof(fdsi));
# 2107|   
# 2108|   	ctx->stop = true;

Error: COMPILER_WARNING (CWE-252): [#def175]
libinput-1.30.1/tools/libinput-record.c: scope_hint: In function ‘timefd_dispatch’
libinput-1.30.1/tools/libinput-record.c:2116:15: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 2116 |         (void)read(fd, discard, sizeof(discard));
#      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2114|   	char discard[64];
# 2115|   
# 2116|-> 	(void)read(fd, discard, sizeof(discard));
# 2117|   
# 2118|   	if (ctx->timestamps.had_events_since_last_time) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def176]
libinput-1.30.1/tools/libinput-record.c:2377:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*(struct record_device *)<unknown>.devnode, 2048)’
libinput-1.30.1/tools/libinput-record.c:2363:1: enter_function: entry to ‘init_device’
libinput-1.30.1/tools/libinput-record.c:2365:46: call_function: calling ‘zalloc’ from ‘init_device’
libinput-1.30.1/tools/libinput-record.c:2365:46: return_function: returning to ‘init_device’ from ‘zalloc’
libinput-1.30.1/tools/libinput-record.c:2367:22: call_function: calling ‘safe_strdup’ from ‘init_device’
libinput-1.30.1/tools/libinput-record.c:2367:22: return_function: returning to ‘init_device’ from ‘safe_strdup’
libinput-1.30.1/tools/libinput-record.c:2371:36: acquire_resource: opened here
libinput-1.30.1/tools/libinput-record.c:2372:12: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-record.c:2377:18: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2377:18: throw: if ‘libevdev_new_from_fd’ throws an exception...
libinput-1.30.1/tools/libinput-record.c:2371:31: call_function: inlined call to ‘xclose’ from ‘init_device’
libinput-1.30.1/tools/libinput-record.c:2377:18: danger: ‘open(*(struct record_device *)<unknown>.devnode, 2048)’ leaks here; was opened at [(14)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/13)
# 2375|   	}
# 2376|   
# 2377|-> 	int rc = libevdev_new_from_fd(fd, &d->evdev);
# 2378|   	if (rc == 0)
# 2379|   		rc = libevdev_new_from_fd(fd, &d->evdev_prev);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
libinput-1.30.1/tools/libinput-record.c:2478:33: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&syspath)’
libinput-1.30.1/tools/libinput-record.c:2465:9: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-record.c:2473:40: branch_true: ...to here
libinput-1.30.1/tools/libinput-record.c:2474:23: acquire_memory: allocated here
libinput-1.30.1/tools/libinput-record.c:2478:33: throw: if ‘readdir’ throws an exception...
libinput-1.30.1/tools/libinput-record.c:2478:33: danger: ‘opendir(&syspath)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 2476|   			continue;
# 2477|   
# 2478|-> 		while ((entry = readdir(dir))) {
# 2479|   			char hidraw_node[PATH_MAX];
# 2480|   			int fd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
libinput-1.30.1/tools/libinput-record.c:2498:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor
libinput-1.30.1/tools/libinput-record.c:2461:1: enter_function: entry to ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2465:9: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-record.c:2473:40: branch_true: ...to here
libinput-1.30.1/tools/libinput-record.c:2483:30: call_function: calling ‘strstartswith’ from ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2483:30: return_function: returning to ‘init_hidraw’ from ‘strstartswith’
libinput-1.30.1/tools/libinput-record.c:2490:30: acquire_resource: opened here
libinput-1.30.1/tools/libinput-record.c:2491:28: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-record.c:2494:34: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2494:34: call_function: calling ‘zalloc’ from ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2494:34: return_function: returning to ‘init_hidraw’ from ‘zalloc’
libinput-1.30.1/tools/libinput-record.c:2496:40: call_function: calling ‘safe_strdup’ from ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2496:40: return_function: returning to ‘init_hidraw’ from ‘safe_strdup’
libinput-1.30.1/tools/libinput-record.c:2498:25: danger: leaks here; was opened at [(16)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/15)
# 2496|   			hidraw->name = safe_strdup(entry->d_name);
# 2497|   			hidraw->device = dev;
# 2498|-> 			list_insert(&dev->hidraw_devices, &hidraw->link);
# 2499|   		}
# 2500|   		closedir(dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
libinput-1.30.1/tools/libinput-record.c:2498:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.30.1/tools/libinput-record.c:2461:1: enter_function: entry to ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2465:9: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-record.c:2473:40: branch_true: ...to here
libinput-1.30.1/tools/libinput-record.c:2483:30: call_function: calling ‘strstartswith’ from ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2483:30: return_function: returning to ‘init_hidraw’ from ‘strstartswith’
libinput-1.30.1/tools/libinput-record.c:2491:28: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-record.c:2494:34: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2494:34: call_function: calling ‘zalloc’ from ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2494:34: return_function: returning to ‘init_hidraw’ from ‘zalloc’
libinput-1.30.1/tools/libinput-record.c:2496:40: call_function: calling ‘safe_strdup’ from ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2496:40: return_function: returning to ‘init_hidraw’ from ‘safe_strdup’
libinput-1.30.1/tools/libinput-record.c:2498:25: danger: ‘<unknown>’ leaks here; was allocated at [(29)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/28)
# 2496|   			hidraw->name = safe_strdup(entry->d_name);
# 2497|   			hidraw->device = dev;
# 2498|-> 			list_insert(&dev->hidraw_devices, &hidraw->link);
# 2499|   		}
# 2500|   		closedir(dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
libinput-1.30.1/tools/libinput-record.c:2498:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.30.1/tools/libinput-record.c:2461:1: enter_function: entry to ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2465:9: branch_true: following ‘true’ branch...
libinput-1.30.1/tools/libinput-record.c:2473:40: branch_true: ...to here
libinput-1.30.1/tools/libinput-record.c:2483:30: call_function: calling ‘strstartswith’ from ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2483:30: return_function: returning to ‘init_hidraw’ from ‘strstartswith’
libinput-1.30.1/tools/libinput-record.c:2491:28: branch_false: following ‘false’ branch...
libinput-1.30.1/tools/libinput-record.c:2494:34: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2494:34: call_function: calling ‘zalloc’ from ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2494:34: return_function: returning to ‘init_hidraw’ from ‘zalloc’
libinput-1.30.1/tools/libinput-record.c:2496:40: call_function: calling ‘safe_strdup’ from ‘init_hidraw’
libinput-1.30.1/tools/libinput-record.c:2496:40: return_function: returning to ‘init_hidraw’ from ‘safe_strdup’
libinput-1.30.1/tools/libinput-record.c:2498:25: danger: ‘zalloc(40)’ leaks here; was allocated at [(22)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/21)
# 2496|   			hidraw->name = safe_strdup(entry->d_name);
# 2497|   			hidraw->device = dev;
# 2498|-> 			list_insert(&dev->hidraw_devices, &hidraw->link);
# 2499|   		}
# 2500|   		closedir(dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
libinput-1.30.1/tools/libinput-record.c:2750:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx.output_file.name’
libinput-1.30.1/tools/libinput-record.c:2628:1: enter_function: entry to ‘main’
libinput-1.30.1/tools/libinput-record.c:2738:32: call_function: calling ‘safe_strdup’ from ‘main’
libinput-1.30.1/tools/libinput-record.c:2738:32: return_function: returning to ‘main’ from ‘safe_strdup’
libinput-1.30.1/tools/libinput-record.c:2747:12: branch_false: following ‘false’ branch (when ‘all == 0’)...
libinput-1.30.1/tools/libinput-record.c:2749:19: branch_false: ...to here
libinput-1.30.1/tools/libinput-record.c:2749:19: branch_true: following ‘true’ branch (when ‘ndevices > 0’)...
libinput-1.30.1/tools/libinput-record.c:2750:55: branch_true: ...to here
libinput-1.30.1/tools/libinput-record.c:2750:25: throw: if ‘strv_from_argv’ throws an exception...
libinput-1.30.1/tools/libinput-record.c:2750:25: danger: ‘ctx.output_file.name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/5)
# 2748|   		paths = all_devices();
# 2749|   	} else if (ndevices >= 1) {
# 2750|-> 		paths = strv_from_argv(ndevices, &argv[optind]);
# 2751|   	} else {
# 2752|   		_autofree_ char *path = select_device();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def182]
libinput-1.30.1/udev/libinput-fuzz-extract.c:64:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(udev_device_get_devnode(device), 0)’
libinput-1.30.1/udev/libinput-fuzz-extract.c:57:12: branch_false: following ‘false’ branch...
libinput-1.30.1/udev/libinput-fuzz-extract.c:60:14: branch_false: ...to here
libinput-1.30.1/udev/libinput-fuzz-extract.c:60:14: acquire_resource: opened here
libinput-1.30.1/udev/libinput-fuzz-extract.c:61:12: branch_false: following ‘false’ branch...
libinput-1.30.1/udev/libinput-fuzz-extract.c:64:14: branch_false: ...to here
libinput-1.30.1/udev/libinput-fuzz-extract.c:64:14: throw: if ‘libevdev_new_from_fd’ throws an exception...
libinput-1.30.1/udev/libinput-fuzz-extract.c:64:14: danger: ‘open(udev_device_get_devnode(device), 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   62|   		goto out;
#   63|   
#   64|-> 	rc = libevdev_new_from_fd(fd, &evdev);
#   65|   	if (rc != 0)
#   66|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def183]
libinput-1.30.1/udev/libinput-fuzz-to-zero.c:57:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(udev_device_get_devnode(device), 2)’
libinput-1.30.1/udev/libinput-fuzz-to-zero.c:50:12: branch_false: following ‘false’ branch...
libinput-1.30.1/udev/libinput-fuzz-to-zero.c:53:14: branch_false: ...to here
libinput-1.30.1/udev/libinput-fuzz-to-zero.c:53:14: acquire_resource: opened here
libinput-1.30.1/udev/libinput-fuzz-to-zero.c:54:12: branch_false: following ‘false’ branch...
libinput-1.30.1/udev/libinput-fuzz-to-zero.c:57:14: branch_false: ...to here
libinput-1.30.1/udev/libinput-fuzz-to-zero.c:57:14: throw: if ‘libevdev_new_from_fd’ throws an exception...
libinput-1.30.1/udev/libinput-fuzz-to-zero.c:57:14: danger: ‘open(udev_device_get_devnode(device), 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   55|   		goto out;
#   56|   
#   57|-> 	rc = libevdev_new_from_fd(fd, &evdev);
#   58|   	if (rc != 0)
#   59|   		goto out;

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-49.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibinput-1.30.1-1.fc44
store-results-to/tmp/tmp8dt2v9bg/libinput-1.30.1-1.fc44.tar.xz
time-created2026-01-08 18:52:16
time-finished2026-01-08 18:54:21
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp8dt2v9bg/libinput-1.30.1-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp8dt2v9bg/libinput-1.30.1-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9