libinput-1.29.2-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libinput-1.29.2/src/evdev-fallback.c:1387:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(56)’
libinput-1.29.2/src/evdev-fallback.c:1362:1: enter_function: entry to ‘fallback_lid_pair_keyboard’
libinput-1.29.2/src/evdev-fallback.c:1365:46: call_function: inlined call to ‘fallback_dispatch’ from ‘fallback_lid_pair_keyboard’
libinput-1.29.2/src/evdev-fallback.c:1369:14: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1369:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1370:14: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1369:13: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1373:13: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1373:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1376:9: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1378:20: branch_false: following ‘false’ branch (when ‘count != 4’)...
libinput-1.29.2/src/evdev-fallback.c:1376:9: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1385:15: call_function: calling ‘zalloc’ from ‘fallback_lid_pair_keyboard’
libinput-1.29.2/src/evdev-fallback.c:1385:15: return_function: returning to ‘fallback_lid_pair_keyboard’ from ‘zalloc’
libinput-1.29.2/src/evdev-fallback.c:1387:9: danger: ‘zalloc(56)’ leaks here; was allocated at [(18)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/17)
# 1385|   	kbd = zalloc(sizeof(*kbd));
# 1386|   	kbd->device = keyboard;
# 1387|-> 	libinput_device_init_event_listener(&kbd->listener);
# 1388|   	list_insert(&dispatch->lid.paired_keyboard_list, &kbd->link);
# 1389|   	evdev_log_debug(lid_switch,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libinput-1.29.2/src/evdev-fallback.c:1652:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc((long unsigned int)libevdev_get_num_slots(*device.evdev) * 32)’
libinput-1.29.2/src/evdev-fallback.c:1625:1: enter_function: entry to ‘fallback_dispatch_init_slots’
libinput-1.29.2/src/evdev-fallback.c:1634:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1635:14: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1634:13: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1636:14: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1634:13: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1642:14: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1642:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1645:44: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1647:17: call_function: calling ‘zalloc’ from ‘fallback_dispatch_init_slots’
libinput-1.29.2/src/evdev-fallback.c:1647:17: return_function: returning to ‘fallback_dispatch_init_slots’ from ‘zalloc’
libinput-1.29.2/src/evdev-fallback.c:1649:24: branch_true: following ‘true’ branch...
libinput-1.29.2/src/evdev-fallback.c:1650:22: branch_true: ...to here
libinput-1.29.2/src/evdev-fallback.c:1652:25: 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)
# 1650|   		slots[slot].seat_slot = -1;
# 1651|   		slots[slot].point.x =
# 1652|-> 			libevdev_get_slot_value(evdev, slot, ABS_MT_POSITION_X);
# 1653|   		slots[slot].point.y =
# 1654|   			libevdev_get_slot_value(evdev, slot, ABS_MT_POSITION_Y);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libinput-1.29.2/src/evdev-fallback.c:1654:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc((long unsigned int)libevdev_get_num_slots(*device.evdev) * 32)’
libinput-1.29.2/src/evdev-fallback.c:1625:1: enter_function: entry to ‘fallback_dispatch_init_slots’
libinput-1.29.2/src/evdev-fallback.c:1634:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1635:14: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1634:13: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1636:14: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1634:13: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1642:14: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1642:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-fallback.c:1645:44: branch_false: ...to here
libinput-1.29.2/src/evdev-fallback.c:1647:17: call_function: calling ‘zalloc’ from ‘fallback_dispatch_init_slots’
libinput-1.29.2/src/evdev-fallback.c:1647:17: return_function: returning to ‘fallback_dispatch_init_slots’ from ‘zalloc’
libinput-1.29.2/src/evdev-fallback.c:1649:24: branch_true: following ‘true’ branch...
libinput-1.29.2/src/evdev-fallback.c:1650:22: branch_true: ...to here
libinput-1.29.2/src/evdev-fallback.c:1654:25: danger: ‘zalloc((long unsigned int)libevdev_get_num_slots(*device.evdev) * 32)’ leaks here; was allocated at [(14)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/13)
# 1652|   			libevdev_get_slot_value(evdev, slot, ABS_MT_POSITION_X);
# 1653|   		slots[slot].point.y =
# 1654|-> 			libevdev_get_slot_value(evdev, slot, ABS_MT_POSITION_Y);
# 1655|   	}
# 1656|   	dispatch->mt.slots = slots;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libinput-1.29.2/src/evdev-fallback.c:1754:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(736)’
libinput-1.29.2/src/evdev-fallback.c:1744:1: enter_function: entry to ‘fallback_dispatch_create’
libinput-1.29.2/src/evdev-fallback.c:1749:20: call_function: calling ‘zalloc’ from ‘fallback_dispatch_create’
libinput-1.29.2/src/evdev-fallback.c:1749:20: return_function: returning to ‘fallback_dispatch_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-fallback.c:1754:9: danger: ‘zalloc(736)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
# 1752|   	dispatch->base.interface = &fallback_interface;
# 1753|   	dispatch->pending_event = EVDEV_NONE;
# 1754|-> 	list_init(&dispatch->lid.paired_keyboard_list);
# 1755|   
# 1756|   	fallback_dispatch_init_rel(dispatch, device);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libinput-1.29.2/src/evdev-frame.h:478:28: warning[-Wanalyzer-malloc-leak]: leak of ‘double_tool_plugin_filter_frame(libinput_plugin,  frame, 12)’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:317:1: enter_function: entry to ‘double_tool_plugin_evdev_frame’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:324:9: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:325:21: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:325:20: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:326:25: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:326:25: call_function: calling ‘double_tool_plugin_device_handle_frame’ from ‘double_tool_plugin_evdev_frame’
#  476|   {
#  477|   	if (nevents)
#  478|-> 		*nevents = frame->count;
#  479|   
#  480|   	return frame->events;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
libinput-1.29.2/src/evdev-frame.h:478:28: warning[-Wanalyzer-malloc-leak]: leak of ‘double_tool_plugin_filter_frame(libinput_plugin,  frame, 20)’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:317:1: enter_function: entry to ‘double_tool_plugin_evdev_frame’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:324:9: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:325:21: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:325:20: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:326:25: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:326:25: call_function: calling ‘double_tool_plugin_device_handle_frame’ from ‘double_tool_plugin_evdev_frame’
#  476|   {
#  477|   	if (nevents)
#  478|-> 		*nevents = frame->count;
#  479|   
#  480|   	return frame->events;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
libinput-1.29.2/src/evdev-frame.h:478:28: warning[-Wanalyzer-malloc-leak]: leak of ‘double_tool_plugin_filter_frame(libinput_plugin,  frame, 34)’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:317:1: enter_function: entry to ‘double_tool_plugin_evdev_frame’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:324:9: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:325:21: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:325:20: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:326:25: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:326:25: call_function: calling ‘double_tool_plugin_device_handle_frame’ from ‘double_tool_plugin_evdev_frame’
#  476|   {
#  477|   	if (nevents)
#  478|-> 		*nevents = frame->count;
#  479|   
#  480|   	return frame->events;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
libinput-1.29.2/src/evdev-frame.h:478:28: warning[-Wanalyzer-malloc-leak]: leak of ‘double_tool_plugin_filter_frame(libinput_plugin,  frame, 66)’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:317:1: enter_function: entry to ‘double_tool_plugin_evdev_frame’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:324:9: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:325:21: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:325:20: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:326:25: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:326:25: call_function: calling ‘double_tool_plugin_device_handle_frame’ from ‘double_tool_plugin_evdev_frame’
#  476|   {
#  477|   	if (nevents)
#  478|-> 		*nevents = frame->count;
#  479|   
#  480|   	return frame->events;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
libinput-1.29.2/src/evdev-frame.h:511:24: warning[-Wanalyzer-malloc-leak]: leak of ‘evdev_frame_new(*frame_in.count + 2)’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:519:1: enter_function: entry to ‘eraser_button_timer_func’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:523:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:530:9: branch_false: ...to here
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:530:9: call_function: calling ‘eraser_button_handle_state’ from ‘eraser_button_timer_func’
#  509|   {
#  510|   	struct evdev_frame *frame =
#  511|-> 		zalloc(max_size * sizeof(*frame->events) + sizeof(*frame));
#  512|   
#  513|   	frame->refcount = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
libinput-1.29.2/src/evdev-mt-touchpad-buttons.c:1197:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(48)’
libinput-1.29.2/src/evdev-mt-touchpad-buttons.c:1182:1: enter_function: entry to ‘tp_notify_clickpadbutton’
libinput-1.29.2/src/evdev-mt-touchpad-buttons.c:1189:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/evdev-mt-touchpad-buttons.c:1190:20: branch_true: ...to here
libinput-1.29.2/src/evdev-mt-touchpad-buttons.c:1190:20: branch_true: following ‘true’ branch (when ‘is_topbutton != 0’)...
libinput-1.29.2/src/evdev-mt-touchpad-buttons.c:1191:55: call_function: inlined call to ‘evdev_frame_new’ from ‘tp_notify_clickpadbutton’
libinput-1.29.2/src/evdev-mt-touchpad-buttons.c:1191:55: call_function: inlined call to ‘evdev_frame_new’ from ‘tp_notify_clickpadbutton’
libinput-1.29.2/src/evdev-mt-touchpad-buttons.c:1196:25: call_function: calling ‘evdev_frame_append_one’ from ‘tp_notify_clickpadbutton’
libinput-1.29.2/src/evdev-mt-touchpad-buttons.c:1196:25: return_function: returning to ‘tp_notify_clickpadbutton’ from ‘evdev_frame_append_one’
libinput-1.29.2/src/evdev-mt-touchpad-buttons.c:1197:25: danger: ‘zalloc(48)’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
# 1195|   			evdev_frame_set_time(frame, time);
# 1196|   			evdev_frame_append_one(frame, button, value);
# 1197|-> 			dispatch->interface->process(dispatch,
# 1198|   						     tp->buttons.trackpoint,
# 1199|   						     frame,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
libinput-1.29.2/src/evdev-tablet-pad-leds.c:182:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(112)’
libinput-1.29.2/src/evdev-tablet-pad-leds.c:584:1: enter_function: entry to ‘pad_init_fallback_group’
libinput-1.29.2/src/evdev-tablet-pad-leds.c:588:17: call_function: calling ‘pad_group_new’ from ‘pad_init_fallback_group’
#  180|   	group->base.num_modes = num_modes;
#  181|   	group->base.destroy = pad_led_group_destroy;
#  182|-> 	list_init(&group->toggle_button_list);
#  183|   	list_init(&group->led_list);
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libinput-1.29.2/src/evdev-tablet-pad-leds.c:233:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.29.2/src/evdev-tablet-pad-leds.c:440:1: enter_function: entry to ‘pad_init_leds_from_libwacom’
libinput-1.29.2/src/evdev-tablet-pad-leds.c:446:12: branch_false: following ‘false’ branch (when ‘wacom’ is non-NULL)...
 branch_false: ...to here
libinput-1.29.2/src/evdev-tablet-pad-leds.c:449:25: branch_true: following ‘true’ branch...
libinput-1.29.2/src/evdev-tablet-pad-leds.c:450:28: branch_true: ...to here
libinput-1.29.2/src/evdev-tablet-pad-leds.c:458:20: branch_false: following ‘false’ branch...
libinput-1.29.2/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.29.2/src/evdev-tablet-pad-leds.c:502:20: branch_true: following ‘true’ branch (when ‘nmodes > 1’)...
libinput-1.29.2/src/evdev-tablet-pad-leds.c:504:33: branch_true: ...to here
libinput-1.29.2/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.29.2/src/evdev-tablet-pad-leds.c:505:28: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-tablet-pad-leds.c:521:38: branch_false: ...to here
libinput-1.29.2/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): [#def13]
libinput-1.29.2/src/evdev-tablet-pad.c:791:35: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(3432)’
libinput-1.29.2/src/evdev-tablet-pad.c:854:1: enter_function: entry to ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: call_function: calling ‘zalloc’ from ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: return_function: returning to ‘evdev_tablet_pad_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet-pad.c:860:13: call_function: calling ‘pad_init’ from ‘evdev_tablet_pad_create’
#  789|   	WacomDevice *wacom = NULL;
#  790|   #ifdef HAVE_LIBWACOM
#  791|-> 	WacomDeviceDatabase *db = libinput_libwacom_ref(li);
#  792|   	if (db) {
#  793|   		char event_path[64];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
libinput-1.29.2/src/evdev-tablet-pad.c:794:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(3432)’
libinput-1.29.2/src/evdev-tablet-pad.c:854:1: enter_function: entry to ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: call_function: calling ‘zalloc’ from ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: return_function: returning to ‘evdev_tablet_pad_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet-pad.c:860:13: call_function: calling ‘pad_init’ from ‘evdev_tablet_pad_create’
#  792|   	if (db) {
#  793|   		char event_path[64];
#  794|-> 		snprintf(event_path,
#  795|   			 sizeof(event_path),
#  796|   			 "/dev/input/%s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libinput-1.29.2/src/evdev-tablet-pad.c:798:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(3432)’
libinput-1.29.2/src/evdev-tablet-pad.c:854:1: enter_function: entry to ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: call_function: calling ‘zalloc’ from ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: return_function: returning to ‘evdev_tablet_pad_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet-pad.c:860:13: call_function: calling ‘pad_init’ from ‘evdev_tablet_pad_create’
#  796|   			 "/dev/input/%s",
#  797|   			 evdev_device_get_sysname(device));
#  798|-> 		wacom = libwacom_new_from_path(db, event_path, WFALLBACK_NONE, NULL);
#  799|   		if (!wacom) {
#  800|   			wacom = libwacom_new_from_usbid(

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
libinput-1.29.2/src/evdev-tablet-pad.c:800:33: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(3432)’
libinput-1.29.2/src/evdev-tablet-pad.c:854:1: enter_function: entry to ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: call_function: calling ‘zalloc’ from ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: return_function: returning to ‘evdev_tablet_pad_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet-pad.c:860:13: call_function: calling ‘pad_init’ from ‘evdev_tablet_pad_create’
#  798|   		wacom = libwacom_new_from_path(db, event_path, WFALLBACK_NONE, NULL);
#  799|   		if (!wacom) {
#  800|-> 			wacom = libwacom_new_from_usbid(
#  801|   				db,
#  802|   				evdev_device_get_id_vendor(device),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libinput-1.29.2/src/evdev-tablet-pad.c:802:33: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(3432)’
libinput-1.29.2/src/evdev-tablet-pad.c:854:1: enter_function: entry to ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: call_function: calling ‘zalloc’ from ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: return_function: returning to ‘evdev_tablet_pad_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet-pad.c:860:13: call_function: calling ‘pad_init’ from ‘evdev_tablet_pad_create’
#  800|   			wacom = libwacom_new_from_usbid(
#  801|   				db,
#  802|-> 				evdev_device_get_id_vendor(device),
#  803|   				evdev_device_get_id_product(device),
#  804|   				NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libinput-1.29.2/src/evdev-tablet-pad.c:803:33: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(3432)’
libinput-1.29.2/src/evdev-tablet-pad.c:854:1: enter_function: entry to ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: call_function: calling ‘zalloc’ from ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: return_function: returning to ‘evdev_tablet_pad_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet-pad.c:860:13: call_function: calling ‘pad_init’ from ‘evdev_tablet_pad_create’
#  801|   				db,
#  802|   				evdev_device_get_id_vendor(device),
#  803|-> 				evdev_device_get_id_product(device),
#  804|   				NULL);
#  805|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libinput-1.29.2/src/evdev-tablet-pad.c:807:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(3432)’
libinput-1.29.2/src/evdev-tablet-pad.c:854:1: enter_function: entry to ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: call_function: calling ‘zalloc’ from ‘evdev_tablet_pad_create’
libinput-1.29.2/src/evdev-tablet-pad.c:858:15: return_function: returning to ‘evdev_tablet_pad_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet-pad.c:860:13: call_function: calling ‘pad_init’ from ‘evdev_tablet_pad_create’
#  805|   		}
#  806|   		if (!wacom) {
#  807|-> 			evdev_log_info(
#  808|   				device,
#  809|   				"device \"%s\" (%04x:%04x) is not known to libwacom\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
libinput-1.29.2/src/evdev-tablet.c:1164:14: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(368)’
libinput-1.29.2/src/evdev-tablet.c:1396:1: enter_function: entry to ‘tablet_new_tool’
libinput-1.29.2/src/evdev-tablet.c:1401:45: call_function: calling ‘zalloc’ from ‘tablet_new_tool’
libinput-1.29.2/src/evdev-tablet.c:1401:45: return_function: returning to ‘tablet_new_tool’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:1409:12: branch_false: following ‘false’ branch (when ‘db’ is NULL)...
libinput-1.29.2/src/evdev-tablet.c:1414:9: branch_false: ...to here
libinput-1.29.2/src/evdev-tablet.c:1447:9: call_function: calling ‘tool_init_pressure_thresholds’ from ‘tablet_new_tool’
# 1162|   	struct evdev_device *device = tablet->device;
# 1163|   
# 1164|-> 	if (!libevdev_has_event_code(device->evdev, EV_ABS, ABS_PRESSURE) ||
# 1165|   	    (!force_update &&
# 1166|   	     tool->pressure.range.min == tool->pressure.wanted_range.min &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libinput-1.29.2/src/evdev-tablet.c:1174:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(368)’
libinput-1.29.2/src/evdev-tablet.c:1396:1: enter_function: entry to ‘tablet_new_tool’
libinput-1.29.2/src/evdev-tablet.c:1401:45: call_function: calling ‘zalloc’ from ‘tablet_new_tool’
libinput-1.29.2/src/evdev-tablet.c:1401:45: return_function: returning to ‘tablet_new_tool’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:1409:12: branch_false: following ‘false’ branch (when ‘db’ is NULL)...
libinput-1.29.2/src/evdev-tablet.c:1414:9: branch_false: ...to here
libinput-1.29.2/src/evdev-tablet.c:1447:9: call_function: calling ‘tool_init_pressure_thresholds’ from ‘tablet_new_tool’
# 1172|   
# 1173|   	struct libinput *libinput = tablet_libinput_context(tablet);
# 1174|-> 	libinput_plugin_system_notify_tablet_tool_configured(&libinput->plugin_system,
# 1175|   							     tool);
# 1176|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libinput-1.29.2/src/evdev-tablet.c:1192:20: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(368)’
libinput-1.29.2/src/evdev-tablet.c:1396:1: enter_function: entry to ‘tablet_new_tool’
libinput-1.29.2/src/evdev-tablet.c:1401:45: call_function: calling ‘zalloc’ from ‘tablet_new_tool’
libinput-1.29.2/src/evdev-tablet.c:1401:45: return_function: returning to ‘tablet_new_tool’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:1409:12: branch_false: following ‘false’ branch (when ‘db’ is NULL)...
libinput-1.29.2/src/evdev-tablet.c:1414:9: branch_false: ...to here
libinput-1.29.2/src/evdev-tablet.c:1447:9: call_function: calling ‘tool_init_pressure_thresholds’ from ‘tablet_new_tool’
# 1190|   	threshold->threshold.lower = 0;
# 1191|   
# 1192|-> 	pressure = libevdev_get_abs_info(device->evdev, ABS_PRESSURE);
# 1193|   	if (!pressure)
# 1194|   		return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libinput-1.29.2/src/evdev-tablet.c:1198:20: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(368)’
libinput-1.29.2/src/evdev-tablet.c:1396:1: enter_function: entry to ‘tablet_new_tool’
libinput-1.29.2/src/evdev-tablet.c:1401:45: call_function: calling ‘zalloc’ from ‘tablet_new_tool’
libinput-1.29.2/src/evdev-tablet.c:1401:45: return_function: returning to ‘tablet_new_tool’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:1409:12: branch_false: following ‘false’ branch (when ‘db’ is NULL)...
libinput-1.29.2/src/evdev-tablet.c:1414:9: branch_false: ...to here
libinput-1.29.2/src/evdev-tablet.c:1447:9: call_function: calling ‘tool_init_pressure_thresholds’ from ‘tablet_new_tool’
# 1196|   	threshold->abs_pressure = *pressure;
# 1197|   
# 1198|-> 	distance = libevdev_get_abs_info(device->evdev, ABS_DISTANCE);
# 1199|   	if (distance) {
# 1200|   		threshold->offset = pressure_offset_from_double(0.0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libinput-1.29.2/src/evdev-tablet.c:1410:21: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(368)’
libinput-1.29.2/src/evdev-tablet.c:1396:1: enter_function: entry to ‘tablet_new_tool’
libinput-1.29.2/src/evdev-tablet.c:1401:45: call_function: calling ‘zalloc’ from ‘tablet_new_tool’
libinput-1.29.2/src/evdev-tablet.c:1401:45: return_function: returning to ‘tablet_new_tool’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:1409:12: branch_true: following ‘true’ branch (when ‘db’ is non-NULL)...
libinput-1.29.2/src/evdev-tablet.c:1410:21: branch_true: ...to here
libinput-1.29.2/src/evdev-tablet.c:1410:21: danger: ‘zalloc(368)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
# 1408|   #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
# 1409|   	if (db)
# 1410|-> 		s = libwacom_stylus_get_for_id(db, tool_id);
# 1411|   #pragma GCC diagnostic pop
# 1412|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libinput-1.29.2/src/evdev-tablet.c:2947:35: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(1168)’
libinput-1.29.2/src/evdev-tablet.c:3031:1: enter_function: entry to ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: call_function: calling ‘zalloc’ from ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: return_function: returning to ‘evdev_tablet_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:3040:13: call_function: calling ‘tablet_init’ from ‘evdev_tablet_create’
# 2945|   	WacomDevice *wacom = NULL;
# 2946|   #ifdef HAVE_LIBWACOM
# 2947|-> 	WacomDeviceDatabase *db = libinput_libwacom_ref(li);
# 2948|   	if (db) {
# 2949|   		char event_path[64];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libinput-1.29.2/src/evdev-tablet.c:2950:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(1168)’
libinput-1.29.2/src/evdev-tablet.c:3031:1: enter_function: entry to ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: call_function: calling ‘zalloc’ from ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: return_function: returning to ‘evdev_tablet_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:3040:13: call_function: calling ‘tablet_init’ from ‘evdev_tablet_create’
# 2948|   	if (db) {
# 2949|   		char event_path[64];
# 2950|-> 		snprintf(event_path,
# 2951|   			 sizeof(event_path),
# 2952|   			 "/dev/input/%s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libinput-1.29.2/src/evdev-tablet.c:2954:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(1168)’
libinput-1.29.2/src/evdev-tablet.c:3031:1: enter_function: entry to ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: call_function: calling ‘zalloc’ from ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: return_function: returning to ‘evdev_tablet_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:3040:13: call_function: calling ‘tablet_init’ from ‘evdev_tablet_create’
# 2952|   			 "/dev/input/%s",
# 2953|   			 evdev_device_get_sysname(device));
# 2954|-> 		wacom = libwacom_new_from_path(db, event_path, WFALLBACK_NONE, NULL);
# 2955|   		if (!wacom) {
# 2956|   			wacom = libwacom_new_from_usbid(

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libinput-1.29.2/src/evdev-tablet.c:2956:33: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(1168)’
libinput-1.29.2/src/evdev-tablet.c:3031:1: enter_function: entry to ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: call_function: calling ‘zalloc’ from ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: return_function: returning to ‘evdev_tablet_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:3040:13: call_function: calling ‘tablet_init’ from ‘evdev_tablet_create’
# 2954|   		wacom = libwacom_new_from_path(db, event_path, WFALLBACK_NONE, NULL);
# 2955|   		if (!wacom) {
# 2956|-> 			wacom = libwacom_new_from_usbid(
# 2957|   				db,
# 2958|   				evdev_device_get_id_vendor(device),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
libinput-1.29.2/src/evdev-tablet.c:2958:33: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(1168)’
libinput-1.29.2/src/evdev-tablet.c:3031:1: enter_function: entry to ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: call_function: calling ‘zalloc’ from ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: return_function: returning to ‘evdev_tablet_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:3040:13: call_function: calling ‘tablet_init’ from ‘evdev_tablet_create’
# 2956|   			wacom = libwacom_new_from_usbid(
# 2957|   				db,
# 2958|-> 				evdev_device_get_id_vendor(device),
# 2959|   				evdev_device_get_id_product(device),
# 2960|   				NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libinput-1.29.2/src/evdev-tablet.c:2959:33: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(1168)’
libinput-1.29.2/src/evdev-tablet.c:3031:1: enter_function: entry to ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: call_function: calling ‘zalloc’ from ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: return_function: returning to ‘evdev_tablet_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:3040:13: call_function: calling ‘tablet_init’ from ‘evdev_tablet_create’
# 2957|   				db,
# 2958|   				evdev_device_get_id_vendor(device),
# 2959|-> 				evdev_device_get_id_product(device),
# 2960|   				NULL);
# 2961|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libinput-1.29.2/src/evdev-tablet.c:2963:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(1168)’
libinput-1.29.2/src/evdev-tablet.c:3031:1: enter_function: entry to ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: call_function: calling ‘zalloc’ from ‘evdev_tablet_create’
libinput-1.29.2/src/evdev-tablet.c:3038:18: return_function: returning to ‘evdev_tablet_create’ from ‘zalloc’
libinput-1.29.2/src/evdev-tablet.c:3040:13: call_function: calling ‘tablet_init’ from ‘evdev_tablet_create’
# 2961|   		}
# 2962|   		if (!wacom) {
# 2963|-> 			evdev_log_info(
# 2964|   				device,
# 2965|   				"device \"%s\" (%04x:%04x) is not known to libwacom\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
libinput-1.29.2/src/evdev-totem.c:105:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(368)’
libinput-1.29.2/src/evdev-totem.c:78:1: enter_function: entry to ‘totem_new_tool’
libinput-1.29.2/src/evdev-totem.c:83:16: call_function: calling ‘zalloc’ from ‘totem_new_tool’
libinput-1.29.2/src/evdev-totem.c:83:16: return_function: returning to ‘totem_new_tool’ from ‘zalloc’
libinput-1.29.2/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): [#def33]
libinput-1.29.2/src/evdev.c:999:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(2080)’
libinput-1.29.2/src/evdev.c:991:1: enter_function: entry to ‘evdev_sync_device’
libinput-1.29.2/src/evdev.c:996:39: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_sync_device’
libinput-1.29.2/src/evdev.c:996:39: call_function: inlined call to ‘evdev_frame_new’ from ‘evdev_sync_device’
libinput-1.29.2/src/evdev.c:1000:20: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev.c:1004:17: branch_false: ...to here
libinput-1.29.2/src/evdev.c:1004:17: call_function: calling ‘evdev_frame_append_input_event’ from ‘evdev_sync_device’
libinput-1.29.2/src/evdev.c:1004:17: return_function: returning to ‘evdev_sync_device’ from ‘evdev_frame_append_input_event’
libinput-1.29.2/src/evdev.c:1007:9: call_function: inlined call to ‘evdev_device_dispatch_frame’ from ‘evdev_sync_device’
libinput-1.29.2/src/evdev.c:996:31: call_function: inlined call to ‘evdev_frame_unrefp’ from ‘evdev_sync_device’
#  997|   
#  998|   	do {
#  999|-> 		rc = libevdev_next_event(device->evdev, LIBEVDEV_READ_FLAG_SYNC, &ev);
# 1000|   		if (rc < 0)
# 1001|   			break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def34]
libinput-1.29.2/src/evdev.h:765:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:573:1: enter_function: entry to ‘wheel_plugin_evdev_frame’
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:581:9: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:582:21: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:582:20: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:583:25: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:583:25: call_function: calling ‘wheel_handle_frame’ from ‘wheel_plugin_evdev_frame’
#  763|   #pragma GCC diagnostic push
#  764|   #pragma GCC diagnostic ignored "-Wformat-nonliteral"
#  765|-> 	log_msg_va(evdev_libinput_context(device), priority, buf, args);
#  766|   #pragma GCC diagnostic pop
#  767|   	va_end(args);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def35]
libinput-1.29.2/src/evdev.h:803:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:573:1: enter_function: entry to ‘wheel_plugin_evdev_frame’
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:581:9: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:582:21: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:582:20: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:583:25: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:583:25: call_function: calling ‘wheel_handle_frame’ from ‘wheel_plugin_evdev_frame’
#  801|   #pragma GCC diagnostic push
#  802|   #pragma GCC diagnostic ignored "-Wformat-nonliteral"
#  803|-> 	log_msg_va(evdev_libinput_context(device), priority, buf, args);
#  804|   #pragma GCC diagnostic pop
#  805|   	va_end(args);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
libinput-1.29.2/src/filter-custom.c:428:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/src/filter-custom.c:409:1: enter_function: entry to ‘create_custom_accelerator_filter’
libinput-1.29.2/src/filter-custom.c:411:40: call_function: calling ‘zalloc’ from ‘create_custom_accelerator_filter’
libinput-1.29.2/src/filter-custom.c:411:40: return_function: returning to ‘create_custom_accelerator_filter’ from ‘zalloc’
libinput-1.29.2/src/filter-custom.c:419:29: call_function: calling ‘create_custom_accel_function’ from ‘create_custom_accelerator_filter’
libinput-1.29.2/src/filter-custom.c:419:29: return_function: returning to ‘create_custom_accelerator_filter’ from ‘create_custom_accel_function’
libinput-1.29.2/src/filter-custom.c:428:16: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  426|   	f->base.interface = &custom_accelerator_interface;
#  427|   
#  428|-> 	return &f->base;
#  429|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
libinput-1.29.2/src/filter-flat.c:131:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.29.2/src/filter-flat.c:123:1: enter_function: entry to ‘create_pointer_accelerator_filter_flat’
libinput-1.29.2/src/filter-flat.c:127:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_flat’
libinput-1.29.2/src/filter-flat.c:127:18: return_function: returning to ‘create_pointer_accelerator_filter_flat’ from ‘zalloc’
libinput-1.29.2/src/filter-flat.c:131:16: danger: ‘zalloc(32)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  129|   	filter->dpi = dpi;
#  130|   
#  131|-> 	return &filter->base;
#  132|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
libinput-1.29.2/src/filter-low-dpi.c:223:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/filter-low-dpi.c:216:1: enter_function: entry to ‘create_default_filter’
libinput-1.29.2/src/filter-low-dpi.c:220:18: call_function: calling ‘zalloc’ from ‘create_default_filter’
libinput-1.29.2/src/filter-low-dpi.c:220:18: return_function: returning to ‘create_default_filter’ from ‘zalloc’
libinput-1.29.2/src/filter-low-dpi.c:223:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  221|   	filter->last_velocity = 0.0;
#  222|   
#  223|-> 	trackers_init(&filter->trackers, use_velocity_averaging ? 16 : 2);
#  224|   
#  225|   	filter->threshold = DEFAULT_THRESHOLD;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
libinput-1.29.2/src/filter-mouse.c:278:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/filter-mouse.c:271:1: enter_function: entry to ‘create_default_filter’
libinput-1.29.2/src/filter-mouse.c:275:18: call_function: calling ‘zalloc’ from ‘create_default_filter’
libinput-1.29.2/src/filter-mouse.c:275:18: return_function: returning to ‘create_default_filter’ from ‘zalloc’
libinput-1.29.2/src/filter-mouse.c:278:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  276|   	filter->last_velocity = 0.0;
#  277|   
#  278|-> 	trackers_init(&filter->trackers, use_velocity_averaging ? 16 : 2);
#  279|   
#  280|   	filter->threshold = DEFAULT_THRESHOLD;

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
libinput-1.29.2/src/filter-touchpad-x230.c:308:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/filter-touchpad-x230.c:299:1: enter_function: entry to ‘create_pointer_accelerator_filter_lenovo_x230’
libinput-1.29.2/src/filter-touchpad-x230.c:303:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_lenovo_x230’
libinput-1.29.2/src/filter-touchpad-x230.c:303:18: return_function: returning to ‘create_pointer_accelerator_filter_lenovo_x230’ from ‘zalloc’
libinput-1.29.2/src/filter-touchpad-x230.c:308:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  306|   	filter->last_velocity = 0.0;
#  307|   
#  308|-> 	trackers_init(&filter->trackers, use_velocity_averaging ? 16 : 2);
#  309|   
#  310|   	filter->threshold = X230_THRESHOLD;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
libinput-1.29.2/src/filter-touchpad.c:292:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/filter-touchpad.c:282:1: enter_function: entry to ‘create_pointer_accelerator_filter_touchpad’
libinput-1.29.2/src/filter-touchpad.c:289:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_touchpad’
libinput-1.29.2/src/filter-touchpad.c:289:18: return_function: returning to ‘create_pointer_accelerator_filter_touchpad’ from ‘zalloc’
libinput-1.29.2/src/filter-touchpad.c:292:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  290|   	filter->last_velocity = 0.0;
#  291|   
#  292|-> 	trackers_init(&filter->trackers, use_velocity_averaging ? 16 : 2);
#  293|   
#  294|   	filter->threshold = 130;

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
libinput-1.29.2/src/filter-trackpoint.c:206:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(64)’
libinput-1.29.2/src/filter-trackpoint.c:181:1: enter_function: entry to ‘create_pointer_accelerator_filter_trackpoint’
libinput-1.29.2/src/filter-trackpoint.c:186:9: branch_true: following ‘true’ branch (when ‘multiplier > 0.0’)...
libinput-1.29.2/src/filter-trackpoint.c:200:18: branch_true: ...to here
libinput-1.29.2/src/filter-trackpoint.c:200:18: call_function: calling ‘zalloc’ from ‘create_pointer_accelerator_filter_trackpoint’
libinput-1.29.2/src/filter-trackpoint.c:200:18: return_function: returning to ‘create_pointer_accelerator_filter_trackpoint’ from ‘zalloc’
libinput-1.29.2/src/filter-trackpoint.c:206:9: danger: ‘zalloc(64)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  204|   	filter->multiplier = multiplier;
#  205|   
#  206|-> 	trackers_init(&filter->trackers, use_velocity_averaging ? 16 : 2);
#  207|   
#  208|   	filter->base.interface = &accelerator_interface_trackpoint;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
libinput-1.29.2/src/libinput-plugin-button-debounce.c:757:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:728:1: enter_function: entry to ‘debounce_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:731:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/libinput-plugin-button-debounce.c:734:13: branch_false: ...to here
libinput-1.29.2/src/libinput-plugin-button-debounce.c:734:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/libinput-plugin-button-debounce.c:737:45: branch_false: ...to here
libinput-1.29.2/src/libinput-plugin-button-debounce.c:756:36: call_function: calling ‘zalloc’ from ‘debounce_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:756:36: return_function: returning to ‘debounce_plugin_device_added’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:757:22: danger: ‘zalloc(72)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/9)
#  755|   	struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin);
#  756|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  757|-> 	pd->device = libinput_device_ref(device);
#  758|   	pd->parent = plugin;
#  759|   	pd->state = DEBOUNCE_STATE_IS_UP;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
libinput-1.29.2/src/libinput-plugin-button-debounce.c:762:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:728:1: enter_function: entry to ‘debounce_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:731:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/libinput-plugin-button-debounce.c:734:13: branch_false: ...to here
libinput-1.29.2/src/libinput-plugin-button-debounce.c:734:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/libinput-plugin-button-debounce.c:737:45: branch_false: ...to here
libinput-1.29.2/src/libinput-plugin-button-debounce.c:756:36: call_function: calling ‘zalloc’ from ‘debounce_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:756:36: return_function: returning to ‘debounce_plugin_device_added’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:762:17: danger: ‘zalloc(72)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/9)
#  760|   
#  761|   	_autofree_ char *timer1_name =
#  762|-> 		strdup_printf("debounce-%s", libinput_device_get_sysname(device));
#  763|   	_autofree_ char *timer2_name =
#  764|   		strdup_printf("debounce-short-%s", libinput_device_get_sysname(device));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
libinput-1.29.2/src/libinput-plugin-button-debounce.c:805:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:802:1: enter_function: entry to ‘libinput_debounce_plugin’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:804:38: call_function: calling ‘zalloc’ from ‘libinput_debounce_plugin’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:804:38: return_function: returning to ‘libinput_debounce_plugin’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:805:9: danger: ‘zalloc(24)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
#  803|   {
#  804|   	struct plugin_data *plugin = zalloc(sizeof(*plugin));
#  805|-> 	list_init(&plugin->devices);
#  806|   
#  807|   	_unref_(libinput_plugin) *p =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:603:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:600:1: enter_function: entry to ‘libinput_mouse_plugin_wheel’
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:602:38: call_function: calling ‘zalloc’ from ‘libinput_mouse_plugin_wheel’
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:602:38: return_function: returning to ‘libinput_mouse_plugin_wheel’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-mouse-wheel.c:603:9: danger: ‘zalloc(24)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  601|   {
#  602|   	struct plugin_data *plugin = zalloc(sizeof(*plugin));
#  603|-> 	list_init(&plugin->devices);
#  604|   
#  605|   	_unref_(libinput_plugin) *p =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
libinput-1.29.2/src/libinput-plugin-mtdev.c:57:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.29.2/src/libinput-plugin-mtdev.c:145:1: enter_function: entry to ‘mtdev_plugin_device_new’
libinput-1.29.2/src/libinput-plugin-mtdev.c:150:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/libinput-plugin-mtdev.c:153:9: branch_false: ...to here
libinput-1.29.2/src/libinput-plugin-mtdev.c:156:40: call_function: calling ‘zalloc’ from ‘mtdev_plugin_device_new’
libinput-1.29.2/src/libinput-plugin-mtdev.c:156:40: return_function: returning to ‘mtdev_plugin_device_new’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-mtdev.c:160:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin-mtdev.c:161:17: branch_true: ...to here
libinput-1.29.2/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): [#def50]
libinput-1.29.2/src/libinput-plugin-mtdev.c:57:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘device’
libinput-1.29.2/src/libinput-plugin-mtdev.c:227:1: enter_function: entry to ‘libinput_mtdev_plugin’
libinput-1.29.2/src/libinput-plugin-mtdev.c:229:42: call_function: calling ‘zalloc’ from ‘libinput_mtdev_plugin’
libinput-1.29.2/src/libinput-plugin-mtdev.c:229:42: return_function: returning to ‘libinput_mtdev_plugin’ from ‘zalloc’
libinput-1.29.2/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): [#def51]
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:72:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘device’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:374:1: enter_function: entry to ‘libinput_tablet_plugin_double_tool’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:376:42: call_function: calling ‘zalloc’ from ‘libinput_tablet_plugin_double_tool’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:376:42: return_function: returning to ‘libinput_tablet_plugin_double_tool’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:376: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): [#def52]
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:345:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:335:1: enter_function: entry to ‘double_tool_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:344:36: call_function: calling ‘zalloc’ from ‘double_tool_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:344:36: return_function: returning to ‘double_tool_plugin_device_added’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-tablet-double-tool.c:345:22: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
#  343|   	struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin);
#  344|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  345|-> 	pd->device = libinput_device_ref(device);
#  346|   	list_take_append(&plugin->devices, pd, link);
#  347|   }

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

Error: GCC_ANALYZER_WARNING (CWE-476): [#def54]
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:110:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘device’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:600:1: enter_function: entry to ‘libinput_tablet_plugin_eraser_button’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:605:42: call_function: calling ‘zalloc’ from ‘libinput_tablet_plugin_eraser_button’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:605:42: return_function: returning to ‘libinput_tablet_plugin_eraser_button’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:605: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): [#def55]
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:547:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:537:1: enter_function: entry to ‘eraser_button_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:546:36: call_function: calling ‘zalloc’ from ‘eraser_button_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:546:36: return_function: returning to ‘eraser_button_plugin_device_added’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:547:22: danger: ‘zalloc(72)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  545|   	struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin);
#  546|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  547|-> 	pd->device = libinput_device_ref(device);
#  548|   	pd->parent = plugin;
#  549|   	pd->last_frame = evdev_frame_new(64);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:550:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:537:1: enter_function: entry to ‘eraser_button_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:546:36: call_function: calling ‘zalloc’ from ‘eraser_button_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:546:36: return_function: returning to ‘eraser_button_plugin_device_added’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:549:26: call_function: inlined call to ‘evdev_frame_new’ from ‘eraser_button_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:549:26: call_function: inlined call to ‘evdev_frame_new’ from ‘eraser_button_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:550:21: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/13)
#  548|   	pd->parent = plugin;
#  549|   	pd->last_frame = evdev_frame_new(64);
#  550|-> 	pd->timer = libinput_plugin_timer_new(libinput_plugin,
#  551|   					      libinput_device_get_sysname(device),
#  552|   					      eraser_button_timer_func,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:550:21: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:537:1: enter_function: entry to ‘eraser_button_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:546:36: call_function: calling ‘zalloc’ from ‘eraser_button_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:546:36: return_function: returning to ‘eraser_button_plugin_device_added’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:549:26: call_function: inlined call to ‘evdev_frame_new’ from ‘eraser_button_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:549:26: call_function: inlined call to ‘evdev_frame_new’ from ‘eraser_button_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-eraser-button.c:550:21: danger: ‘zalloc(72)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  548|   	pd->parent = plugin;
#  549|   	pd->last_frame = evdev_frame_new(64);
#  550|-> 	pd->timer = libinput_plugin_timer_new(libinput_plugin,
#  551|   					      libinput_device_get_sysname(device),
#  552|   					      eraser_button_timer_func,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def58]
libinput-1.29.2/src/libinput-plugin-tablet-forced-tool.c:66:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘device’
libinput-1.29.2/src/libinput-plugin-tablet-forced-tool.c:245:1: enter_function: entry to ‘libinput_tablet_plugin_forced_tool’
libinput-1.29.2/src/libinput-plugin-tablet-forced-tool.c:247:42: call_function: calling ‘zalloc’ from ‘libinput_tablet_plugin_forced_tool’
libinput-1.29.2/src/libinput-plugin-tablet-forced-tool.c:247:42: return_function: returning to ‘libinput_tablet_plugin_forced_tool’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-tablet-forced-tool.c:247:33: call_function: inlined call to ‘plugin_data_destroyp’ from ‘libinput_tablet_plugin_forced_tool’
#   64|   plugin_device_destroy(struct plugin_device *device)
#   65|   {
#   66|-> 	libinput_device_unref(device->device);
#   67|   	list_remove(&device->link);
#   68|   	free(device);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
libinput-1.29.2/src/libinput-plugin-tablet-forced-tool.c:216:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.29.2/src/libinput-plugin-tablet-forced-tool.c:206:1: enter_function: entry to ‘forced_tool_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-forced-tool.c:215:36: call_function: calling ‘zalloc’ from ‘forced_tool_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-tablet-forced-tool.c:215:36: return_function: returning to ‘forced_tool_plugin_device_added’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-tablet-forced-tool.c:216:22: danger: ‘zalloc(32)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  214|   	struct plugin_data *plugin = libinput_plugin_get_user_data(libinput_plugin);
#  215|   	struct plugin_device *pd = zalloc(sizeof(*pd));
#  216|-> 	pd->device = libinput_device_ref(device);
#  217|   	list_take_append(&plugin->devices, pd, link);
#  218|   }

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

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
libinput-1.29.2/src/libinput-plugin.c:218:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.29.2/src/libinput-plugin.c:559:1: enter_function: entry to ‘plugin_system_notify_evdev_frame’
libinput-1.29.2/src/libinput-plugin.c:572:49: call_function: calling ‘plugin_queued_event_new’ from ‘plugin_system_notify_evdev_frame’
#  216|   
#  217|   	event->frame = evdev_frame_ref(frame);
#  218|-> 	event->device = libinput_device_ref(device);
#  219|   
#  220|   	return event;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
libinput-1.29.2/src/libinput-plugin.c:488:17: warning[-Wanalyzer-malloc-leak]: leak of ‘plugin_queued_event_new(frame,  device)’
libinput-1.29.2/src/libinput-plugin.c:466:1: enter_function: entry to ‘libinput_plugin_process_frame’
libinput-1.29.2/src/libinput-plugin.c:485:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput-plugin.c:487:25: branch_true: ...to here
libinput-1.29.2/src/libinput-plugin.c:487:25: call_function: calling ‘plugin_queued_event_new’ from ‘libinput_plugin_process_frame’
libinput-1.29.2/src/libinput-plugin.c:487:25: return_function: returning to ‘libinput_plugin_process_frame’ from ‘plugin_queued_event_new’
libinput-1.29.2/src/libinput-plugin.c:488:17: danger: ‘plugin_queued_event_new(frame,  device)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/9)
#  486|   		struct plugin_queued_event *event =
#  487|   			plugin_queued_event_new(frame, device);
#  488|-> 		list_take_append(queued_events, event, link);
#  489|   	}
#  490|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
libinput-1.29.2/src/libinput-plugin.c:575:9: warning[-Wanalyzer-malloc-leak]: leak of ‘plugin_queued_event_new(frame,  device)’
libinput-1.29.2/src/libinput-plugin.c:559:1: enter_function: entry to ‘plugin_system_notify_evdev_frame’
libinput-1.29.2/src/libinput-plugin.c:572:49: call_function: calling ‘plugin_queued_event_new’ from ‘plugin_system_notify_evdev_frame’
libinput-1.29.2/src/libinput-plugin.c:572:49: return_function: returning to ‘plugin_system_notify_evdev_frame’ from ‘plugin_queued_event_new’
libinput-1.29.2/src/libinput-plugin.c:575:9: danger: ‘plugin_queued_event_new(frame,  device)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#  573|   
#  574|   	struct list queued_events = LIST_INIT(queued_events);
#  575|-> 	list_take_insert(&queued_events, our_event, link);
#  576|   
#  577|   	uint64_t frame_time = evdev_frame_get_time(frame);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
libinput-1.29.2/src/libinput-plugin.c:707:39: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/libinput-plugin.c:698:1: enter_function: entry to ‘libinput_plugin_timer_new’
libinput-1.29.2/src/libinput-plugin.c:705:47: call_function: calling ‘zalloc’ from ‘libinput_plugin_timer_new’
libinput-1.29.2/src/libinput-plugin.c:705:47: return_function: returning to ‘libinput_plugin_timer_new’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin.c:707:39: call_function: calling ‘strdup_printf’ from ‘libinput_plugin_timer_new’
libinput-1.29.2/src/libinput-plugin.c:707:39: return_function: returning to ‘libinput_plugin_timer_new’ from ‘strdup_printf’
libinput-1.29.2/src/libinput-plugin.c:707:39: danger: ‘zalloc(104)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  705|   	struct libinput_plugin_timer *timer = zalloc(sizeof(*timer));
#  706|   
#  707|-> 	_autofree_ char *timer_name = strdup_printf("%s-%s", plugin->name, name);
#  708|   
#  709|   	timer->plugin = plugin;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
libinput-1.29.2/src/libinput-util.h:76:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/tools/shared.c:695:1: enter_function: entry to ‘find_device’
libinput-1.29.2/tools/shared.c:698:12: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/shared.c:701:38: branch_false: ...to here
libinput-1.29.2/tools/shared.c:706:9: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
libinput-1.29.2/tools/shared.c:707:36: branch_true: ...to here
libinput-1.29.2/tools/shared.c:713:22: call_function: calling ‘strstartswith’ from ‘find_device’
libinput-1.29.2/tools/shared.c:713:22: return_function: returning to ‘find_device’ from ‘strstartswith’
libinput-1.29.2/tools/shared.c:719:33: call_function: calling ‘safe_strdup’ from ‘find_device’
libinput-1.29.2/tools/shared.c:719:33: return_function: returning to ‘find_device’ from ‘safe_strdup’
libinput-1.29.2/tools/shared.c:720:28: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/shared.c:708:39: call_function: inlined call to ‘udev_device_unrefp’ from ‘find_device’
libinput-1.29.2/tools/shared.c:697: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): [#def69]
libinput-1.29.2/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.29.2/tools/shared.c:695:1: enter_function: entry to ‘find_device’
libinput-1.29.2/tools/shared.c:698:12: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/shared.c:701:38: branch_false: ...to here
libinput-1.29.2/tools/shared.c:706:9: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
libinput-1.29.2/tools/shared.c:707:36: branch_true: ...to here
libinput-1.29.2/tools/shared.c:713:22: call_function: calling ‘strstartswith’ from ‘find_device’
libinput-1.29.2/tools/shared.c:713:22: return_function: returning to ‘find_device’ from ‘strstartswith’
libinput-1.29.2/tools/shared.c:719:33: call_function: calling ‘safe_strdup’ from ‘find_device’
libinput-1.29.2/tools/shared.c:719:33: return_function: returning to ‘find_device’ from ‘safe_strdup’
libinput-1.29.2/tools/shared.c:720:28: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/shared.c:708: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-457): [#def70]
libinput-1.29.2/src/libinput-util.h:77:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘libinput_device_get_udev_device(*<unknown>.libinput_device)’
libinput-1.29.2/test/test-quirks.c:1382:31: call_function: inlined call to ‘udev_device_unrefp’ from ‘quirks_model_override’
#   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): [#def71]
libinput-1.29.2/src/libinput-util.h:78:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/tools/shared.c:695:1: enter_function: entry to ‘find_device’
libinput-1.29.2/tools/shared.c:698:12: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/shared.c:701:38: branch_false: ...to here
libinput-1.29.2/tools/shared.c:706:9: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
libinput-1.29.2/tools/shared.c:707:36: branch_true: ...to here
libinput-1.29.2/tools/shared.c:713:22: call_function: calling ‘strstartswith’ from ‘find_device’
libinput-1.29.2/tools/shared.c:713:22: return_function: returning to ‘find_device’ from ‘strstartswith’
libinput-1.29.2/tools/shared.c:719:33: call_function: calling ‘safe_strdup’ from ‘find_device’
libinput-1.29.2/tools/shared.c:719:33: return_function: returning to ‘find_device’ from ‘safe_strdup’
libinput-1.29.2/tools/shared.c:720:28: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/shared.c:708:39: call_function: inlined call to ‘udev_device_unrefp’ from ‘find_device’
libinput-1.29.2/tools/shared.c:701: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): [#def72]
libinput-1.29.2/src/libinput-util.h:82:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘evdev’
libinput-1.29.2/test/test-switch.c:708:27: call_function: inlined call to ‘libevdev_freep’ from ‘lid_update_hw_on_key’
#   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): [#def73]
libinput-1.29.2/src/libinput-util.h:88:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘libinput_get_event(li)’
libinput-1.29.2/test/test-pointer.c:888:36: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.29.2/test/test-pointer.c:889:25: branch_true: ...to here
libinput-1.29.2/test/test-pointer.c:896:36: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.29.2/test/test-pointer.c:897:25: branch_true: ...to here
libinput-1.29.2/test/test-pointer.c:903:52: call_function: inlined call to ‘libinput_event_destroyp’ from ‘pointer_scroll_wheel_hires_disabled’
#   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): [#def74]
libinput-1.29.2/src/libinput.c:310:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.29.2/src/libinput.c:5157:1: enter_function: entry to ‘libinput_libwacom_ref’
libinput-1.29.2/src/libinput.c:5160:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:5161:22: branch_true: ...to here
libinput-1.29.2/src/libinput.c:5162:20: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:5163:25: branch_true: ...to here
libinput-1.29.2/src/libinput.c:5163:25: call_function: calling ‘log_msg’ from ‘libinput_libwacom_ref’
#  308|   {
#  309|   	if (log_is_logged(libinput, priority))
#  310|-> 		libinput->log_handler(libinput, priority, format, args);
#  311|   }
#  312|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
libinput-1.29.2/src/libinput.c:2314:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(16)’
libinput-1.29.2/src/libinput.c:2364:1: enter_function: entry to ‘notify_removed_device’
libinput-1.29.2/src/libinput.c:2371:32: call_function: calling ‘zalloc’ from ‘notify_removed_device’
libinput-1.29.2/src/libinput.c:2371:32: return_function: returning to ‘notify_removed_device’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2373:9: call_function: inlined call to ‘post_base_event’ from ‘notify_removed_device’
# 2312|   	struct libinput *libinput = device->seat->libinput;
# 2313|   	init_event_base(event, device, type);
# 2314|-> 	libinput_post_event(libinput, event);
# 2315|   }
# 2316|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
libinput-1.29.2/src/libinput.c:2447:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/src/libinput.c:2425:1: enter_function: entry to ‘keyboard_notify_key’
libinput-1.29.2/src/libinput.c:2433:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2436:21: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2436:21: call_function: calling ‘zalloc’ from ‘keyboard_notify_key’
libinput-1.29.2/src/libinput.c:2436:21: return_function: returning to ‘keyboard_notify_key’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2438:26: call_function: calling ‘update_seat_key_count’ from ‘keyboard_notify_key’
libinput-1.29.2/src/libinput.c:2438:26: return_function: returning to ‘keyboard_notify_key’ from ‘update_seat_key_count’
libinput-1.29.2/src/libinput.c:2447:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
# 2445|   	};
# 2446|   
# 2447|-> 	post_device_event(device, time, LIBINPUT_EVENT_KEYBOARD_KEY, &key_event->base);
# 2448|   }
# 2449|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
libinput-1.29.2/src/libinput.c:2469:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/libinput.c:2451:1: enter_function: entry to ‘pointer_notify_motion’
libinput-1.29.2/src/libinput.c:2458:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2461:24: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2461:24: call_function: calling ‘zalloc’ from ‘pointer_notify_motion’
libinput-1.29.2/src/libinput.c:2461:24: return_function: returning to ‘pointer_notify_motion’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2469:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
# 2467|   	};
# 2468|   
# 2469|-> 	post_device_event(device,
# 2470|   			  time,
# 2471|   			  LIBINPUT_EVENT_POINTER_MOTION,

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
libinput-1.29.2/src/libinput.c:2521:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/libinput.c:2499:1: enter_function: entry to ‘pointer_notify_button’
libinput-1.29.2/src/libinput.c:2507:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2510:24: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2510:24: call_function: calling ‘zalloc’ from ‘pointer_notify_button’
libinput-1.29.2/src/libinput.c:2510:24: return_function: returning to ‘pointer_notify_button’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2512:29: call_function: calling ‘update_seat_button_count’ from ‘pointer_notify_button’
libinput-1.29.2/src/libinput.c:2512:29: return_function: returning to ‘pointer_notify_button’ from ‘update_seat_button_count’
libinput-1.29.2/src/libinput.c:2521:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/7)
# 2519|   	};
# 2520|   
# 2521|-> 	post_device_event(device,
# 2522|   			  time,
# 2523|   			  LIBINPUT_EVENT_POINTER_BUTTON,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
libinput-1.29.2/src/libinput.c:2553:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/libinput.c:2528:1: enter_function: entry to ‘pointer_notify_axis_finger’
libinput-1.29.2/src/libinput.c:2537:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2540:22: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2540:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_finger’
libinput-1.29.2/src/libinput.c:2540:22: return_function: returning to ‘pointer_notify_axis_finger’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2541:29: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_finger’
libinput-1.29.2/src/libinput.c:2541:29: return_function: returning to ‘pointer_notify_axis_finger’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2553:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/7)
# 2551|   	*axis_event_legacy = *axis_event;
# 2552|   
# 2553|-> 	post_device_event(device,
# 2554|   			  time,
# 2555|   			  LIBINPUT_EVENT_POINTER_SCROLL_FINGER,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
libinput-1.29.2/src/libinput.c:2557:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/libinput.c:2528:1: enter_function: entry to ‘pointer_notify_axis_finger’
libinput-1.29.2/src/libinput.c:2537:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2540:22: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2540:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_finger’
libinput-1.29.2/src/libinput.c:2540:22: return_function: returning to ‘pointer_notify_axis_finger’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2541:29: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_finger’
libinput-1.29.2/src/libinput.c:2541:29: return_function: returning to ‘pointer_notify_axis_finger’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2553:9: call_function: calling ‘post_device_event’ from ‘pointer_notify_axis_finger’
# 2555|   			  LIBINPUT_EVENT_POINTER_SCROLL_FINGER,
# 2556|   			  &axis_event->base);
# 2557|-> 	post_device_event(device,
# 2558|   			  time,
# 2559|   			  LIBINPUT_EVENT_POINTER_AXIS,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
libinput-1.29.2/src/libinput.c:2589:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/libinput.c:2564:1: enter_function: entry to ‘pointer_notify_axis_continuous’
libinput-1.29.2/src/libinput.c:2573:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2576:22: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2576:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_continuous’
libinput-1.29.2/src/libinput.c:2576:22: return_function: returning to ‘pointer_notify_axis_continuous’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2577:29: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_continuous’
libinput-1.29.2/src/libinput.c:2577:29: return_function: returning to ‘pointer_notify_axis_continuous’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2589:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/7)
# 2587|   	*axis_event_legacy = *axis_event;
# 2588|   
# 2589|-> 	post_device_event(device,
# 2590|   			  time,
# 2591|   			  LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
libinput-1.29.2/src/libinput.c:2593:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/libinput.c:2564:1: enter_function: entry to ‘pointer_notify_axis_continuous’
libinput-1.29.2/src/libinput.c:2573:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2576:22: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2576:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_continuous’
libinput-1.29.2/src/libinput.c:2576:22: return_function: returning to ‘pointer_notify_axis_continuous’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2577:29: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_continuous’
libinput-1.29.2/src/libinput.c:2577:29: return_function: returning to ‘pointer_notify_axis_continuous’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2589:9: call_function: calling ‘post_device_event’ from ‘pointer_notify_axis_continuous’
# 2591|   			  LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS,
# 2592|   			  &axis_event->base);
# 2593|-> 	post_device_event(device,
# 2594|   			  time,
# 2595|   			  LIBINPUT_EVENT_POINTER_AXIS,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
libinput-1.29.2/src/libinput.c:2623:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/libinput.c:2600:1: enter_function: entry to ‘pointer_notify_axis_legacy_wheel’
libinput-1.29.2/src/libinput.c:2609:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2612:22: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2612:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_legacy_wheel’
libinput-1.29.2/src/libinput.c:2612:22: return_function: returning to ‘pointer_notify_axis_legacy_wheel’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2623:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/7)
# 2621|   	};
# 2622|   
# 2623|-> 	post_device_event(device, time, LIBINPUT_EVENT_POINTER_AXIS, &axis_event->base);
# 2624|   }
# 2625|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
libinput-1.29.2/src/libinput.c:2650:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(104)’
libinput-1.29.2/src/libinput.c:2627:1: enter_function: entry to ‘pointer_notify_axis_wheel’
libinput-1.29.2/src/libinput.c:2635:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2638:22: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2638:22: call_function: calling ‘zalloc’ from ‘pointer_notify_axis_wheel’
libinput-1.29.2/src/libinput.c:2638:22: return_function: returning to ‘pointer_notify_axis_wheel’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2650:9: danger: ‘zalloc(104)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/7)
# 2648|   	};
# 2649|   
# 2650|-> 	post_device_event(device,
# 2651|   			  time,
# 2652|   			  LIBINPUT_EVENT_POINTER_SCROLL_WHEEL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
libinput-1.29.2/src/libinput.c:2679:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/src/libinput.c:2659:1: enter_function: entry to ‘touch_notify_touch_down’
libinput-1.29.2/src/libinput.c:2667:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2670:23: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2670:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_down’
libinput-1.29.2/src/libinput.c:2670:23: return_function: returning to ‘touch_notify_touch_down’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2679:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/7)
# 2677|   	};
# 2678|   
# 2679|-> 	post_device_event(device, time, LIBINPUT_EVENT_TOUCH_DOWN, &touch_event->base);
# 2680|   }
# 2681|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
libinput-1.29.2/src/libinput.c:2703:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/src/libinput.c:2683:1: enter_function: entry to ‘touch_notify_touch_motion’
libinput-1.29.2/src/libinput.c:2691:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2694:23: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2694:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_motion’
libinput-1.29.2/src/libinput.c:2694:23: return_function: returning to ‘touch_notify_touch_motion’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2703:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/7)
# 2701|   	};
# 2702|   
# 2703|-> 	post_device_event(device,
# 2704|   			  time,
# 2705|   			  LIBINPUT_EVENT_TOUCH_MOTION,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
libinput-1.29.2/src/libinput.c:2728:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/src/libinput.c:2710:1: enter_function: entry to ‘touch_notify_touch_up’
libinput-1.29.2/src/libinput.c:2717:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2720:23: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2720:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_up’
libinput-1.29.2/src/libinput.c:2720:23: return_function: returning to ‘touch_notify_touch_up’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2728:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/7)
# 2726|   	};
# 2727|   
# 2728|-> 	post_device_event(device, time, LIBINPUT_EVENT_TOUCH_UP, &touch_event->base);
# 2729|   }
# 2730|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
libinput-1.29.2/src/libinput.c:2750:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/src/libinput.c:2732:1: enter_function: entry to ‘touch_notify_touch_cancel’
libinput-1.29.2/src/libinput.c:2739:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2742:23: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2742:23: call_function: calling ‘zalloc’ from ‘touch_notify_touch_cancel’
libinput-1.29.2/src/libinput.c:2742:23: return_function: returning to ‘touch_notify_touch_cancel’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2750:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
# 2748|   	};
# 2749|   
# 2750|-> 	post_device_event(device,
# 2751|   			  time,
# 2752|   			  LIBINPUT_EVENT_TOUCH_CANCEL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
libinput-1.29.2/src/libinput.c:2770:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/src/libinput.c:2757:1: enter_function: entry to ‘touch_notify_frame’
libinput-1.29.2/src/libinput.c:2761:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:2764:23: branch_true: ...to here
libinput-1.29.2/src/libinput.c:2764:23: call_function: calling ‘zalloc’ from ‘touch_notify_frame’
libinput-1.29.2/src/libinput.c:2764:23: return_function: returning to ‘touch_notify_frame’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2770:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/7)
# 2768|   	};
# 2769|   
# 2770|-> 	post_device_event(device, time, LIBINPUT_EVENT_TOUCH_FRAME, &touch_event->base);
# 2771|   }
# 2772|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
libinput-1.29.2/src/libinput.c:2801:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(216)’
libinput-1.29.2/src/libinput.c:2774:1: enter_function: entry to ‘tablet_notify_axis’
libinput-1.29.2/src/libinput.c:2785:22: call_function: calling ‘zalloc’ from ‘tablet_notify_axis’
libinput-1.29.2/src/libinput.c:2785:22: return_function: returning to ‘tablet_notify_axis’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2801:9: danger: ‘zalloc(216)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/5)
# 2799|   	       sizeof(axis_event->changed_axes));
# 2800|   
# 2801|-> 	post_device_event(device,
# 2802|   			  time,
# 2803|   			  LIBINPUT_EVENT_TABLET_TOOL_AXIS,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
libinput-1.29.2/src/libinput.c:2834:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(216)’
libinput-1.29.2/src/libinput.c:2808:1: enter_function: entry to ‘tablet_notify_proximity’
libinput-1.29.2/src/libinput.c:2819:27: call_function: calling ‘zalloc’ from ‘tablet_notify_proximity’
libinput-1.29.2/src/libinput.c:2819:27: return_function: returning to ‘tablet_notify_proximity’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2834:9: danger: ‘zalloc(216)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/5)
# 2832|   	       sizeof(proximity_event->changed_axes));
# 2833|   
# 2834|-> 	post_device_event(device,
# 2835|   			  time,
# 2836|   			  LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
libinput-1.29.2/src/libinput.c:2865:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(216)’
libinput-1.29.2/src/libinput.c:2841:1: enter_function: entry to ‘tablet_notify_tip’
libinput-1.29.2/src/libinput.c:2852:21: call_function: calling ‘zalloc’ from ‘tablet_notify_tip’
libinput-1.29.2/src/libinput.c:2852:21: return_function: returning to ‘tablet_notify_tip’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2865:9: danger: ‘zalloc(216)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/5)
# 2863|   	memcpy(tip_event->changed_axes, changed_axes, sizeof(tip_event->changed_axes));
# 2864|   
# 2865|-> 	post_device_event(device,
# 2866|   			  time,
# 2867|   			  LIBINPUT_EVENT_TABLET_TOOL_TIP,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
libinput-1.29.2/src/libinput.c:2902:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(216)’
libinput-1.29.2/src/libinput.c:2872:1: enter_function: entry to ‘tablet_notify_button’
libinput-1.29.2/src/libinput.c:2885:24: call_function: calling ‘zalloc’ from ‘tablet_notify_button’
libinput-1.29.2/src/libinput.c:2885:24: return_function: returning to ‘tablet_notify_button’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2887:29: call_function: calling ‘update_seat_button_count’ from ‘tablet_notify_button’
libinput-1.29.2/src/libinput.c:2887:29: return_function: returning to ‘tablet_notify_button’ from ‘update_seat_button_count’
libinput-1.29.2/src/libinput.c:2902:9: danger: ‘zalloc(216)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/5)
# 2900|   	};
# 2901|   
# 2902|-> 	post_device_event(device,
# 2903|   			  time,
# 2904|   			  LIBINPUT_EVENT_TABLET_TOOL_BUTTON,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
libinput-1.29.2/src/libinput.c:2930:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(120)’
libinput-1.29.2/src/libinput.c:2909:1: enter_function: entry to ‘tablet_pad_notify_button’
libinput-1.29.2/src/libinput.c:2918:24: call_function: calling ‘zalloc’ from ‘tablet_pad_notify_button’
libinput-1.29.2/src/libinput.c:2918:24: return_function: returning to ‘tablet_pad_notify_button’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2930:9: danger: ‘zalloc(120)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/5)
# 2928|   	};
# 2929|   
# 2930|-> 	post_device_event(device,
# 2931|   			  time,
# 2932|   			  LIBINPUT_EVENT_TABLET_PAD_BUTTON,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
libinput-1.29.2/src/libinput.c:2958:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(120)’
libinput-1.29.2/src/libinput.c:2937:1: enter_function: entry to ‘tablet_pad_notify_dial’
libinput-1.29.2/src/libinput.c:2946:22: call_function: calling ‘zalloc’ from ‘tablet_pad_notify_dial’
libinput-1.29.2/src/libinput.c:2946:22: return_function: returning to ‘tablet_pad_notify_dial’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2958:9: danger: ‘zalloc(120)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/5)
# 2956|   	};
# 2957|   
# 2958|-> 	post_device_event(device,
# 2959|   			  time,
# 2960|   			  LIBINPUT_EVENT_TABLET_PAD_DIAL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
libinput-1.29.2/src/libinput.c:2988:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(120)’
libinput-1.29.2/src/libinput.c:2965:1: enter_function: entry to ‘tablet_pad_notify_ring’
libinput-1.29.2/src/libinput.c:2975:22: call_function: calling ‘zalloc’ from ‘tablet_pad_notify_ring’
libinput-1.29.2/src/libinput.c:2975:22: return_function: returning to ‘tablet_pad_notify_ring’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:2988:9: danger: ‘zalloc(120)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/5)
# 2986|   	};
# 2987|   
# 2988|-> 	post_device_event(device,
# 2989|   			  time,
# 2990|   			  LIBINPUT_EVENT_TABLET_PAD_RING,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
libinput-1.29.2/src/libinput.c:3018:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(120)’
libinput-1.29.2/src/libinput.c:2995:1: enter_function: entry to ‘tablet_pad_notify_strip’
libinput-1.29.2/src/libinput.c:3005:23: call_function: calling ‘zalloc’ from ‘tablet_pad_notify_strip’
libinput-1.29.2/src/libinput.c:3005:23: return_function: returning to ‘tablet_pad_notify_strip’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:3018:9: danger: ‘zalloc(120)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/5)
# 3016|   	};
# 3017|   
# 3018|-> 	post_device_event(device,
# 3019|   			  time,
# 3020|   			  LIBINPUT_EVENT_TABLET_PAD_STRIP,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
libinput-1.29.2/src/libinput.c:3040:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(120)’
libinput-1.29.2/src/libinput.c:3025:1: enter_function: entry to ‘tablet_pad_notify_key’
libinput-1.29.2/src/libinput.c:3032:21: call_function: calling ‘zalloc’ from ‘tablet_pad_notify_key’
libinput-1.29.2/src/libinput.c:3032:21: return_function: returning to ‘tablet_pad_notify_key’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:3040:9: danger: ‘zalloc(120)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/5)
# 3038|   	};
# 3039|   
# 3040|-> 	post_device_event(device,
# 3041|   			  time,
# 3042|   			  LIBINPUT_EVENT_TABLET_PAD_KEY,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
libinput-1.29.2/src/libinput.c:3074:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(80)’
libinput-1.29.2/src/libinput.c:3047:1: enter_function: entry to ‘gesture_notify’
libinput-1.29.2/src/libinput.c:3062:25: call_function: calling ‘zalloc’ from ‘gesture_notify’
libinput-1.29.2/src/libinput.c:3062:25: return_function: returning to ‘gesture_notify’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:3074:9: danger: ‘zalloc(80)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/5)
# 3072|   	};
# 3073|   
# 3074|-> 	post_device_event(device, time, type, &gesture_event->base);
# 3075|   }
# 3076|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
libinput-1.29.2/src/libinput.c:3204:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.29.2/src/libinput.c:3186:1: enter_function: entry to ‘switch_notify_toggle’
libinput-1.29.2/src/libinput.c:3193:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/libinput.c:3196:24: branch_true: ...to here
libinput-1.29.2/src/libinput.c:3196:24: call_function: calling ‘zalloc’ from ‘switch_notify_toggle’
libinput-1.29.2/src/libinput.c:3196:24: return_function: returning to ‘switch_notify_toggle’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:3204:9: danger: ‘zalloc(32)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/7)
# 3202|   	};
# 3203|   
# 3204|-> 	post_device_event(device,
# 3205|   			  time,
# 3206|   			  LIBINPUT_EVENT_SWITCH_TOGGLE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
libinput-1.29.2/src/libinput.c:3917:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/src/libinput.c:3909:1: enter_function: entry to ‘libinput_device_group_create’
libinput-1.29.2/src/libinput.c:3913:17: call_function: calling ‘zalloc’ from ‘libinput_device_group_create’
libinput-1.29.2/src/libinput.c:3913:17: return_function: returning to ‘libinput_device_group_create’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:3915:29: call_function: calling ‘safe_strdup’ from ‘libinput_device_group_create’
libinput-1.29.2/src/libinput.c:3915:29: return_function: returning to ‘libinput_device_group_create’ from ‘safe_strdup’
libinput-1.29.2/src/libinput.c:3917:9: danger: ‘<unknown>’ leaks here; was allocated at [(13)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/12)
# 3915|   	group->identifier = safe_strdup(identifier);
# 3916|   
# 3917|-> 	list_init(&group->link);
# 3918|   	list_insert(&libinput->device_group_list, &group->link);
# 3919|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
libinput-1.29.2/src/libinput.c:3917:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/src/libinput.c:3909:1: enter_function: entry to ‘libinput_device_group_create’
libinput-1.29.2/src/libinput.c:3913:17: call_function: calling ‘zalloc’ from ‘libinput_device_group_create’
libinput-1.29.2/src/libinput.c:3913:17: return_function: returning to ‘libinput_device_group_create’ from ‘zalloc’
libinput-1.29.2/src/libinput.c:3915:29: call_function: calling ‘safe_strdup’ from ‘libinput_device_group_create’
libinput-1.29.2/src/libinput.c:3915:29: return_function: returning to ‘libinput_device_group_create’ from ‘safe_strdup’
libinput-1.29.2/src/libinput.c:3917:9: danger: ‘zalloc(40)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/5)
# 3915|   	group->identifier = safe_strdup(identifier);
# 3916|   
# 3917|-> 	list_init(&group->link);
# 3918|   	list_insert(&libinput->device_group_list, &group->link);
# 3919|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
libinput-1.29.2/src/path-seat.c:141:29: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(<unknown>)’
libinput-1.29.2/src/path-seat.c:254:1: enter_function: entry to ‘path_create_device’
libinput-1.29.2/src/path-seat.c:262:15: call_function: calling ‘zalloc’ from ‘path_create_device’
libinput-1.29.2/src/path-seat.c:262:15: return_function: returning to ‘path_create_device’ from ‘zalloc’
libinput-1.29.2/src/path-seat.c:267:18: call_function: calling ‘path_device_enable’ from ‘path_create_device’
#  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): [#def105]
libinput-1.29.2/src/path-seat.c:166:9: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(<unknown>)’
libinput-1.29.2/src/path-seat.c:254:1: enter_function: entry to ‘path_create_device’
libinput-1.29.2/src/path-seat.c:262:15: call_function: calling ‘zalloc’ from ‘path_create_device’
libinput-1.29.2/src/path-seat.c:262:15: return_function: returning to ‘path_create_device’ from ‘zalloc’
libinput-1.29.2/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): [#def106]
libinput-1.29.2/src/path-seat.c:166:9: warning[-Wanalyzer-malloc-leak]: leak of ‘seat_logical_name’
libinput-1.29.2/src/path-seat.c:254:1: enter_function: entry to ‘path_create_device’
libinput-1.29.2/src/path-seat.c:262:15: call_function: calling ‘zalloc’ from ‘path_create_device’
libinput-1.29.2/src/path-seat.c:262:15: return_function: returning to ‘path_create_device’ from ‘zalloc’
libinput-1.29.2/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): [#def107]
libinput-1.29.2/src/path-seat.c:263:28: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.29.2/src/path-seat.c:254:1: enter_function: entry to ‘path_create_device’
libinput-1.29.2/src/path-seat.c:262:15: call_function: calling ‘zalloc’ from ‘path_create_device’
libinput-1.29.2/src/path-seat.c:262:15: return_function: returning to ‘path_create_device’ from ‘zalloc’
libinput-1.29.2/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): [#def108]
libinput-1.29.2/src/path-seat.c:265:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.29.2/src/path-seat.c:254:1: enter_function: entry to ‘path_create_device’
libinput-1.29.2/src/path-seat.c:262:15: call_function: calling ‘zalloc’ from ‘path_create_device’
libinput-1.29.2/src/path-seat.c:262:15: return_function: returning to ‘path_create_device’ from ‘zalloc’
libinput-1.29.2/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): [#def109]
libinput-1.29.2/src/path-seat.c:314:13: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(352)’
libinput-1.29.2/src/path-seat.c:301:1: enter_function: entry to ‘libinput_path_create_context’
libinput-1.29.2/src/path-seat.c:306:12: branch_false: following ‘false’ branch (when ‘interface’ is non-NULL)...
libinput-1.29.2/src/path-seat.c:309:31: branch_false: ...to here
libinput-1.29.2/src/path-seat.c:310:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/path-seat.c:313:17: branch_false: ...to here
libinput-1.29.2/src/path-seat.c:313:17: call_function: calling ‘zalloc’ from ‘libinput_path_create_context’
libinput-1.29.2/src/path-seat.c:313:17: return_function: returning to ‘libinput_path_create_context’ from ‘zalloc’
libinput-1.29.2/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): [#def110]
libinput-1.29.2/src/quirks.c:225:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ 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): [#def111]
libinput-1.29.2/src/quirks.c:225:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  223|   	}
#  224|   
#  225|-> 	ctx->log_handler(ctx->libinput,
#  226|   			 (enum libinput_log_priority)priority,
#  227|   			 format,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def112]
libinput-1.29.2/src/quirks.c:225:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1227:17: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1227: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-775): [#def113]
libinput-1.29.2/src/quirks.c:388:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  386|   	p = zalloc(sizeof *p);
#  387|   	p->refcount = 1;
#  388|-> 	list_init(&p->link);
#  389|   
#  390|   	return p;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
libinput-1.29.2/src/quirks.c:388:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  386|   	p = zalloc(sizeof *p);
#  387|   	p->refcount = 1;
#  388|-> 	list_init(&p->link);
#  389|   
#  390|   	return p;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
libinput-1.29.2/src/quirks.c:388:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(424)’
libinput-1.29.2/src/quirks.c:1532:1: enter_function: entry to ‘quirk_merge_event_codes’
libinput-1.29.2/src/quirks.c:1558: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-401): [#def116]
libinput-1.29.2/src/quirks.c:457:9: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(modalias)’
libinput-1.29.2/src/quirks.c:1248:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.29.2/src/quirks.c:1254:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.29.2/src/quirks.c:1254:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.29.2/src/quirks.c:1256:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.29.2/src/quirks.c:1258:9: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1265:9: call_function: calling ‘quirk_log_msg’ from ‘quirks_init_subsystem’
libinput-1.29.2/src/quirks.c:1265:9: return_function: returning to ‘quirks_init_subsystem’ from ‘quirk_log_msg’
libinput-1.29.2/src/quirks.c:1267:20: call_function: calling ‘init_dmi’ from ‘quirks_init_subsystem’
#  455|   	copy = safe_strdup(modalias);
#  456|   
#  457|-> 	udev_device_unref(udev_device);
#  458|   	udev_unref(udev);
#  459|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
libinput-1.29.2/src/quirks.c:458:9: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(modalias)’
libinput-1.29.2/src/quirks.c:1248:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.29.2/src/quirks.c:1254:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.29.2/src/quirks.c:1254:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.29.2/src/quirks.c:1256:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.29.2/src/quirks.c:1258:9: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1265:9: call_function: calling ‘quirk_log_msg’ from ‘quirks_init_subsystem’
libinput-1.29.2/src/quirks.c:1265:9: return_function: returning to ‘quirks_init_subsystem’ from ‘quirk_log_msg’
libinput-1.29.2/src/quirks.c:1267:20: call_function: calling ‘init_dmi’ from ‘quirks_init_subsystem’
#  456|   
#  457|   	udev_device_unref(udev_device);
#  458|-> 	udev_unref(udev);
#  459|   
#  460|   	return copy;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def118]
libinput-1.29.2/src/quirks.c:577:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  575|   	xasprintf(&s->name, "%s (%s)", name, basename(path_dup));
#  576|   	free(path_dup);
#  577|-> 	list_init(&s->link);
#  578|   	list_init(&s->properties);
#  579|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
libinput-1.29.2/src/quirks.c:577:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  575|   	xasprintf(&s->name, "%s (%s)", name, basename(path_dup));
#  576|   	free(path_dup);
#  577|-> 	list_init(&s->link);
#  578|   	list_init(&s->properties);
#  579|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def120]
libinput-1.29.2/src/quirks.c:578:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  576|   	free(path_dup);
#  577|   	list_init(&s->link);
#  578|-> 	list_init(&s->properties);
#  579|   
#  580|   	return s;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
libinput-1.29.2/src/quirks.c:578:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  576|   	free(path_dup);
#  577|   	list_init(&s->link);
#  578|-> 	list_init(&s->properties);
#  579|   
#  580|   	return s;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def122]
libinput-1.29.2/src/quirks.c:588:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s’
libinput-1.29.2/src/quirks.c:1248:1: enter_function: entry to ‘quirks_init_subsystem’
libinput-1.29.2/src/quirks.c:1254:40: call_function: calling ‘zalloc’ from ‘quirks_init_subsystem’
libinput-1.29.2/src/quirks.c:1254:40: return_function: returning to ‘quirks_init_subsystem’ from ‘zalloc’
libinput-1.29.2/src/quirks.c:1256:9: branch_true: following ‘true’ branch (when ‘data_path’ is non-NULL)...
libinput-1.29.2/src/quirks.c:1258:9: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1254:34: call_function: inlined call to ‘quirks_context_unrefp’ from ‘quirks_init_subsystem’
#  586|   	struct property *p;
#  587|   
#  588|-> 	free(s->name);
#  589|   	free(s->match.name);
#  590|   	free(s->match.uniq);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
libinput-1.29.2/src/quirks.c:677:31: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  675|   
#  676|   		size_t nelems = 0;
#  677|-> 		char **strs = strv_from_string(value, ";", &nelems);
#  678|   		int rc = strv_for_each_n((const char **)strs,
#  679|   					 max,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
libinput-1.29.2/src/quirks.c:677:31: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  675|   
#  676|   		size_t nelems = 0;
#  677|-> 		char **strs = strv_from_string(value, ";", &nelems);
#  678|   		int rc = strv_for_each_n((const char **)strs,
#  679|   					 max,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
libinput-1.29.2/src/quirks.c:678:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  676|   		size_t nelems = 0;
#  677|   		char **strs = strv_from_string(value, ";", &nelems);
#  678|-> 		int rc = strv_for_each_n((const char **)strs,
#  679|   					 max,
#  680|   					 strv_parse_hex,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
libinput-1.29.2/src/quirks.c:678:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  676|   		size_t nelems = 0;
#  677|   		char **strs = strv_from_string(value, ";", &nelems);
#  678|-> 		int rc = strv_for_each_n((const char **)strs,
#  679|   					 max,
#  680|   					 strv_parse_hex,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
libinput-1.29.2/src/quirks.c:758:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  756|   	assert(strstartswith(key, "Model"));
#  757|   
#  758|-> 	if (!parse_boolean_property(value, &b))
#  759|   		return false;
#  760|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
libinput-1.29.2/src/quirks.c:758:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  756|   	assert(strstartswith(key, "Model"));
#  757|   
#  758|-> 	if (!parse_boolean_property(value, &b))
#  759|   		return false;
#  760|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def129]
libinput-1.29.2/src/quirks.c:766:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  764|   			p->id = q, p->type = PT_BOOL;
#  765|   			p->value.b = b;
#  766|-> 			list_append(&s->properties, &p->link);
#  767|   			s->has_property = true;
#  768|   			return true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
libinput-1.29.2/src/quirks.c:766:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  764|   			p->id = q, p->type = PT_BOOL;
#  765|   			p->value.b = b;
#  766|-> 			list_append(&s->properties, &p->link);
#  767|   			s->has_property = true;
#  768|   			return true;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def131]
libinput-1.29.2/src/quirks.c:984:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  982|   
#  983|   	size_t nelem;
#  984|-> 	char **strv = strv_from_string(line, "=", &nelem);
#  985|   	if (!strv || nelem != 2)
#  986|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
libinput-1.29.2/src/quirks.c:984:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
#  982|   
#  983|   	size_t nelem;
#  984|-> 	char **strv = strv_from_string(line, "=", &nelem);
#  985|   	if (!strv || nelem != 2)
#  986|   		goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def133]
libinput-1.29.2/src/quirks.c:1127:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
# 1125|   			state = STATE_MATCH;
# 1126|   			section = section_new(path, line);
# 1127|-> 			list_append(&ctx->sections, &section->link);
# 1128|   			break;
# 1129|   		default:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
libinput-1.29.2/src/quirks.c:1127:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "r")’
libinput-1.29.2/src/quirks.c:1219:1: enter_function: entry to ‘parse_files’
libinput-1.29.2/src/quirks.c:1226:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/quirks.c:1231:23: branch_true: following ‘true’ branch...
libinput-1.29.2/src/quirks.c:1234:74: branch_true: ...to here
libinput-1.29.2/src/quirks.c:1236:22: call_function: calling ‘parse_file’ from ‘parse_files’
# 1125|   			state = STATE_MATCH;
# 1126|   			section = section_new(path, line);
# 1127|-> 			list_append(&ctx->sections, &section->link);
# 1128|   			break;
# 1129|   		default:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
libinput-1.29.2/src/quirks.c:1326:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(56)’
libinput-1.29.2/src/quirks.c:1319:1: enter_function: entry to ‘quirks_new’
libinput-1.29.2/src/quirks.c:1323:13: call_function: calling ‘zalloc’ from ‘quirks_new’
libinput-1.29.2/src/quirks.c:1323:13: return_function: returning to ‘quirks_new’ from ‘zalloc’
libinput-1.29.2/src/quirks.c:1326:9: danger: ‘zalloc(56)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/5)
# 1324|   	q->refcount = 1;
# 1325|   	q->nproperties = 0;
# 1326|-> 	list_init(&q->link);
# 1327|   	list_init(&q->floating_properties);
# 1328|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
libinput-1.29.2/src/quirks.c:1372:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/src/quirks.c:1510:1: enter_function: entry to ‘match_new’
libinput-1.29.2/src/quirks.c:1512:27: call_function: calling ‘zalloc’ from ‘match_new’
libinput-1.29.2/src/quirks.c:1512:27: return_function: returning to ‘match_new’ from ‘zalloc’
libinput-1.29.2/src/quirks.c:1514:9: call_function: calling ‘match_fill_name’ from ‘match_new’
libinput-1.29.2/src/quirks.c:1514:9: return_function: returning to ‘match_new’ from ‘match_fill_name’
libinput-1.29.2/src/quirks.c:1515:9: call_function: calling ‘match_fill_uniq’ from ‘match_new’
# 1370|   
# 1371|   	do {
# 1372|-> 		value = udev_device_get_property_value(d, prop);
# 1373|   		d = udev_device_get_parent(d);
# 1374|   	} while (value == NULL && d != NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
libinput-1.29.2/src/quirks.c:1372:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(320)’
libinput-1.29.2/src/quirks.c:1510:1: enter_function: entry to ‘match_new’
libinput-1.29.2/src/quirks.c:1512:27: call_function: calling ‘zalloc’ from ‘match_new’
libinput-1.29.2/src/quirks.c:1512:27: return_function: returning to ‘match_new’ from ‘zalloc’
libinput-1.29.2/src/quirks.c:1514:9: call_function: calling ‘match_fill_name’ from ‘match_new’
# 1370|   
# 1371|   	do {
# 1372|-> 		value = udev_device_get_property_value(d, prop);
# 1373|   		d = udev_device_get_parent(d);
# 1374|   	} while (value == NULL && d != NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
libinput-1.29.2/src/quirks.c:1373:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/src/quirks.c:1510:1: enter_function: entry to ‘match_new’
libinput-1.29.2/src/quirks.c:1512:27: call_function: calling ‘zalloc’ from ‘match_new’
libinput-1.29.2/src/quirks.c:1512:27: return_function: returning to ‘match_new’ from ‘zalloc’
libinput-1.29.2/src/quirks.c:1514:9: call_function: calling ‘match_fill_name’ from ‘match_new’
libinput-1.29.2/src/quirks.c:1514:9: return_function: returning to ‘match_new’ from ‘match_fill_name’
libinput-1.29.2/src/quirks.c:1515:9: call_function: calling ‘match_fill_uniq’ from ‘match_new’
# 1371|   	do {
# 1372|   		value = udev_device_get_property_value(d, prop);
# 1373|-> 		d = udev_device_get_parent(d);
# 1374|   	} while (value == NULL && d != NULL);
# 1375|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
libinput-1.29.2/src/quirks.c:1373:21: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(320)’
libinput-1.29.2/src/quirks.c:1510:1: enter_function: entry to ‘match_new’
libinput-1.29.2/src/quirks.c:1512:27: call_function: calling ‘zalloc’ from ‘match_new’
libinput-1.29.2/src/quirks.c:1512:27: return_function: returning to ‘match_new’ from ‘zalloc’
libinput-1.29.2/src/quirks.c:1514:9: call_function: calling ‘match_fill_name’ from ‘match_new’
# 1371|   	do {
# 1372|   		value = udev_device_get_property_value(d, prop);
# 1373|-> 		d = udev_device_get_parent(d);
# 1374|   	} while (value == NULL && d != NULL);
# 1375|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def140]
libinput-1.29.2/src/quirks.h:212:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘libinput_device_get_quirks(&*device.base)’
libinput-1.29.2/src/evdev-mt-touchpad-thumb.c:362:1: enter_function: entry to ‘tp_init_thumb’
libinput-1.29.2/src/evdev-mt-touchpad-thumb.c:372:12: branch_true: following ‘true’ branch...
libinput-1.29.2/src/evdev-mt-touchpad-thumb.c:378:9: branch_true: ...to here
libinput-1.29.2/src/evdev-mt-touchpad-thumb.c:379:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/evdev-mt-touchpad-thumb.c:382:9: branch_false: ...to here
libinput-1.29.2/src/evdev-mt-touchpad-thumb.c:394:17: call_function: calling ‘evdev_device_mm_to_units’ from ‘tp_init_thumb’
libinput-1.29.2/src/evdev-mt-touchpad-thumb.c:397:26: call_function: inlined call to ‘quirks_unrefp’ from ‘tp_init_thumb’
#  210|   quirks_unref(struct quirks *q);
#  211|   
#  212|-> DEFINE_UNREF_CLEANUP_FUNC(quirks);
#  213|   
#  214|   /**

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
libinput-1.29.2/src/udev-seat.c:327:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(3160)’
libinput-1.29.2/src/udev-seat.c:319:1: enter_function: entry to ‘udev_seat_create’
libinput-1.29.2/src/udev-seat.c:325:16: call_function: calling ‘zalloc’ from ‘udev_seat_create’
libinput-1.29.2/src/udev-seat.c:325:16: return_function: returning to ‘udev_seat_create’ from ‘zalloc’
libinput-1.29.2/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): [#def142]
libinput-1.29.2/src/udev-seat.c:385:13: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(360)’
libinput-1.29.2/src/udev-seat.c:374:1: enter_function: entry to ‘libinput_udev_create_context’
libinput-1.29.2/src/udev-seat.c:380:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/udev-seat.c:383:17: branch_false: ...to here
libinput-1.29.2/src/udev-seat.c:383:17: call_function: calling ‘zalloc’ from ‘libinput_udev_create_context’
libinput-1.29.2/src/udev-seat.c:383:17: return_function: returning to ‘libinput_udev_create_context’ from ‘zalloc’
libinput-1.29.2/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): [#def143]
libinput-1.29.2/src/util-files.c:43:14: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.29.2/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.29.2/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
 branch_false: ...to here
libinput-1.29.2/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:97:29: branch_true: ...to here
libinput-1.29.2/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.29.2/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.29.2/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:103:25: branch_true: ...to here
libinput-1.29.2/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:104:59: branch_true: ...to here
libinput-1.29.2/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): [#def144]
libinput-1.29.2/src/util-files.c:44:14: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.29.2/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.29.2/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
 branch_false: ...to here
libinput-1.29.2/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:97:29: branch_true: ...to here
libinput-1.29.2/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.29.2/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.29.2/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:103:25: branch_true: ...to here
libinput-1.29.2/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:104:59: branch_true: ...to here
libinput-1.29.2/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): [#def145]
libinput-1.29.2/src/util-files.c:45:9: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘f’ which points to memory on the stack
libinput-1.29.2/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.29.2/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
 branch_false: ...to here
libinput-1.29.2/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:97:29: branch_true: ...to here
libinput-1.29.2/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.29.2/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.29.2/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:103:25: branch_true: ...to here
libinput-1.29.2/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:104:59: branch_true: ...to here
libinput-1.29.2/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): [#def146]
libinput-1.29.2/src/util-files.c:71:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/src/util-files.c:55:1: enter_function: entry to ‘filenames’
libinput-1.29.2/src/util-files.c:60:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/util-files.c:63:25: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:64:59: branch_true: ...to here
libinput-1.29.2/src/util-files.c:65:22: call_function: calling ‘strendswith’ from ‘filenames’
libinput-1.29.2/src/util-files.c:65:22: return_function: returning to ‘filenames’ from ‘strendswith’
libinput-1.29.2/src/util-files.c:65:20: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:68:34: branch_true: ...to here
libinput-1.29.2/src/util-files.c:68:34: call_function: calling ‘zalloc’ from ‘filenames’
libinput-1.29.2/src/util-files.c:68:34: return_function: returning to ‘filenames’ from ‘zalloc’
libinput-1.29.2/src/util-files.c:69:27: call_function: calling ‘safe_strdup’ from ‘filenames’
libinput-1.29.2/src/util-files.c:69:27: return_function: returning to ‘filenames’ from ‘safe_strdup’
libinput-1.29.2/src/util-files.c:70:32: call_function: calling ‘safe_strdup’ from ‘filenames’
libinput-1.29.2/src/util-files.c:70:32: return_function: returning to ‘filenames’ from ‘safe_strdup’
libinput-1.29.2/src/util-files.c:71:17: danger: ‘<unknown>’ leaks here; was allocated at [(29)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/28)
#   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): [#def147]
libinput-1.29.2/src/util-files.c:71:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(32)’
libinput-1.29.2/src/util-files.c:55:1: enter_function: entry to ‘filenames’
libinput-1.29.2/src/util-files.c:60:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/src/util-files.c:63:25: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:64:59: branch_true: ...to here
libinput-1.29.2/src/util-files.c:65:22: call_function: calling ‘strendswith’ from ‘filenames’
libinput-1.29.2/src/util-files.c:65:22: return_function: returning to ‘filenames’ from ‘strendswith’
libinput-1.29.2/src/util-files.c:65:20: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:68:34: branch_true: ...to here
libinput-1.29.2/src/util-files.c:68:34: call_function: calling ‘zalloc’ from ‘filenames’
libinput-1.29.2/src/util-files.c:68:34: return_function: returning to ‘filenames’ from ‘zalloc’
libinput-1.29.2/src/util-files.c:69:27: call_function: calling ‘safe_strdup’ from ‘filenames’
libinput-1.29.2/src/util-files.c:69:27: return_function: returning to ‘filenames’ from ‘safe_strdup’
libinput-1.29.2/src/util-files.c:70:32: call_function: calling ‘safe_strdup’ from ‘filenames’
libinput-1.29.2/src/util-files.c:70:32: return_function: returning to ‘filenames’ from ‘safe_strdup’
libinput-1.29.2/src/util-files.c:71:17: danger: ‘zalloc(32)’ leaks here; was allocated at [(22)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/21)
#   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): [#def148]
libinput-1.29.2/src/util-files.c:104:43: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.29.2/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.29.2/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
 branch_false: ...to here
libinput-1.29.2/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:97:29: branch_true: ...to here
libinput-1.29.2/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.29.2/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.29.2/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:103:25: branch_true: ...to here
libinput-1.29.2/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:104:59: branch_true: ...to here
libinput-1.29.2/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): [#def149]
libinput-1.29.2/src/util-files.c:104:59: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libinput-1.29.2/src/util-files.c:85:1: enter_function: entry to ‘list_files’
libinput-1.29.2/src/util-files.c:89:12: branch_false: following ‘false’ branch (when ‘directories’ is non-NULL)...
 branch_false: ...to here
libinput-1.29.2/src/util-files.c:96:16: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:97:29: branch_true: ...to here
libinput-1.29.2/src/util-files.c:98:17: call_function: calling ‘filenames’ from ‘list_files’
libinput-1.29.2/src/util-files.c:98:17: return_function: returning to ‘list_files’ from ‘filenames’
libinput-1.29.2/src/util-files.c:101:17: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:103:25: branch_true: ...to here
libinput-1.29.2/src/util-files.c:103:25: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-files.c:104:59: branch_true: ...to here
libinput-1.29.2/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): [#def150]
libinput-1.29.2/src/util-files.c:120:9: warning[-Wanalyzer-infinite-loop]: infinite loop
libinput-1.29.2/src/util-files.c:120:9: danger: infinite loop here
libinput-1.29.2/src/util-files.c:120:9: branch_true: if it ever follows ‘true’ branch, it will always do so...
libinput-1.29.2/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-775): [#def151]
libinput-1.29.2/src/util-files.h:94:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
libinput-1.29.2/tools/libinput-record.c:2627:1: enter_function: entry to ‘main’
libinput-1.29.2/tools/libinput-record.c:2731:12: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/libinput-record.c:2737:32: branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2737:32: call_function: calling ‘safe_strdup’ from ‘main’
libinput-1.29.2/tools/libinput-record.c:2737:32: return_function: returning to ‘main’ from ‘safe_strdup’
libinput-1.29.2/tools/libinput-record.c:2739:12: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2739:43: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2739:13: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/libinput-record.c:2748:19: branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2748:19: branch_false: following ‘false’ branch (when ‘ndevices <= 0’)...
libinput-1.29.2/tools/libinput-record.c:2751:41: branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2751: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): [#def152]
libinput-1.29.2/src/util-mem.h:80:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/tools/libinput-record.c:2362:1: enter_function: entry to ‘init_device’
libinput-1.29.2/tools/libinput-record.c:2364:46: call_function: calling ‘zalloc’ from ‘init_device’
libinput-1.29.2/tools/libinput-record.c:2364:46: return_function: returning to ‘init_device’ from ‘zalloc’
libinput-1.29.2/tools/libinput-record.c:2366:22: call_function: calling ‘safe_strdup’ from ‘init_device’
libinput-1.29.2/tools/libinput-record.c:2366:22: return_function: returning to ‘init_device’ from ‘safe_strdup’
libinput-1.29.2/tools/libinput-record.c:2364:42: call_function: inlined call to ‘_free_ptr_’ from ‘init_device’
#   78|   _free_ptr_(void *p)
#   79|   {
#   80|-> 	free(*(void **)p);
#   81|   }
#   82|   /**

Error: COMPILER_WARNING (CWE-457): [#def153]
libinput-1.29.2/src/util-mem.h:80:9: warning[-Wmaybe-uninitialized]: ‘abs’ may be used uninitialized
#   80 |         free(*(void **)p);
#      |         ^~~~~~~~~~~~~~~~~
libinput-1.29.2/test/litest.c: scope_hint: In function ‘litest_create’
libinput-1.29.2/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): [#def154]
libinput-1.29.2/src/util-mem.h:80:9: warning[-Wmaybe-uninitialized]: ‘events’ may be used uninitialized
#   80 |         free(*(void **)p);
#      |         ^~~~~~~~~~~~~~~~~
libinput-1.29.2/test/litest.c: scope_hint: In function ‘litest_create’
libinput-1.29.2/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: COMPILER_WARNING (CWE-457): [#def155]
libinput-1.29.2/src/util-mem.h:131:20: warning[-Wmaybe-uninitialized]: ‘udev_device’ may be used uninitialized
#  131 |                 if (*_p)                                        \
#      |                    ^
libinput-1.29.2/test/litest.c: scope_hint: In function ‘grab_device’
libinput-1.29.2/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): [#def156]
libinput-1.29.2/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): [#def157]
libinput-1.29.2/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): [#def158]
libinput-1.29.2/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-401): [#def159]
libinput-1.29.2/src/util-strings.c:145:20: warning[-Wanalyzer-malloc-leak]: leak of ‘safe_strdup(*<unknown>)’
libinput-1.29.2/src/util-strings.c:132:1: enter_function: entry to ‘strv_from_argv’
libinput-1.29.2/src/util-strings.c:136:9: branch_true: following ‘true’ branch (when ‘argc >= 0’)...
libinput-1.29.2/src/util-strings.c:137:9: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:137:9: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
libinput-1.29.2/src/util-strings.c:139:12: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:139:12: branch_false: following ‘false’ branch (when ‘argc != 0’)...
libinput-1.29.2/src/util-strings.c:142:23: branch_false: ...to here
libinput-1.29.2/src/util-strings.c:142:16: call_function: calling ‘zalloc’ from ‘strv_from_argv’
libinput-1.29.2/src/util-strings.c:142:16: return_function: returning to ‘strv_from_argv’ from ‘zalloc’
libinput-1.29.2/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.29.2/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.29.2/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.29.2/src/util-strings.c:145:20: branch_false: following ‘false’ branch...
libinput-1.29.2/src/util-strings.c:149:21: branch_false: ...to here
libinput-1.29.2/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.29.2/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.29.2/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.29.2/src/util-strings.c:145:20: branch_false: following ‘false’ branch...
libinput-1.29.2/src/util-strings.c:149:21: branch_false: ...to here
libinput-1.29.2/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.29.2/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.29.2/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.29.2/src/util-strings.c:145:20: branch_false: following ‘false’ branch...
libinput-1.29.2/src/util-strings.c:149:21: branch_false: ...to here
libinput-1.29.2/src/util-strings.c:143:25: branch_true: following ‘true’ branch (when ‘i < argc’)...
libinput-1.29.2/src/util-strings.c:144:46: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:144:30: call_function: calling ‘safe_strdup’ from ‘strv_from_argv’
libinput-1.29.2/src/util-strings.c:144:30: return_function: returning to ‘strv_from_argv’ from ‘safe_strdup’
libinput-1.29.2/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): [#def160]
libinput-1.29.2/src/util-strings.h:153:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(16)’
libinput-1.29.2/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.29.2/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): [#def161]
libinput-1.29.2/src/util-strings.h:153:16: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(72)’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:728:1: enter_function: entry to ‘debounce_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:731:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/libinput-plugin-button-debounce.c:734:13: branch_false: ...to here
libinput-1.29.2/src/libinput-plugin-button-debounce.c:734:12: branch_false: following ‘false’ branch...
libinput-1.29.2/src/libinput-plugin-button-debounce.c:737:45: branch_false: ...to here
libinput-1.29.2/src/libinput-plugin-button-debounce.c:756:36: call_function: calling ‘zalloc’ from ‘debounce_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:756:36: return_function: returning to ‘debounce_plugin_device_added’ from ‘zalloc’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:762:17: call_function: calling ‘strdup_printf’ from ‘debounce_plugin_device_added’
libinput-1.29.2/src/libinput-plugin-button-debounce.c:762:17: return_function: returning to ‘debounce_plugin_device_added’ from ‘strdup_printf’
libinput-1.29.2/src/util-strings.h:153:16: danger: ‘zalloc(72)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9)
#  151|   	if (rc < 0)
#  152|   		abort();
#  153|-> 	return strp;
#  154|   }
#  155|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
libinput-1.29.2/src/util-strings.h:365:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/src/util-strings.c:172:1: enter_function: entry to ‘strv_from_string’
libinput-1.29.2/src/util-strings.c:174:9: branch_true: following ‘true’ branch (when ‘in’ is non-NULL)...
libinput-1.29.2/src/util-strings.c:175:9: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:175:9: branch_true: following ‘true’ branch (when ‘separators’ is non-NULL)...
libinput-1.29.2/src/util-strings.c:177:21: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:179:16: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.29.2/src/util-strings.c:179:16: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.29.2/src/util-strings.c:179:16: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-strings.c:180:17: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:179:16: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.29.2/src/util-strings.c:179:16: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.29.2/src/util-strings.c:179:16: branch_false: following ‘false’ branch...
libinput-1.29.2/src/util-strings.c:182:12: branch_false: ...to here
libinput-1.29.2/src/util-strings.c:182:12: branch_false: following ‘false’ branch (when ‘nelems != 0’)...
libinput-1.29.2/src/util-strings.c:188:16: branch_false: ...to here
libinput-1.29.2/src/util-strings.c:189:23: call_function: calling ‘zalloc’ from ‘strv_from_string’
libinput-1.29.2/src/util-strings.c:189:23: return_function: returning to ‘strv_from_string’ from ‘zalloc’
libinput-1.29.2/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.29.2/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.29.2/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:196:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libinput-1.29.2/src/util-strings.c:203:22: branch_false: ...to here
libinput-1.29.2/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.29.2/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.29.2/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:196:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libinput-1.29.2/src/util-strings.c:203:22: branch_false: ...to here
libinput-1.29.2/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.29.2/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.29.2/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:195:30: acquire_memory: allocated here
libinput-1.29.2/src/util-strings.c:196:20: branch_false: following ‘false’ branch (when ‘copy’ is non-NULL)...
libinput-1.29.2/src/util-strings.c:203:22: branch_false: ...to here
libinput-1.29.2/src/util-strings.c:194:24: call_function: calling ‘next_word’ from ‘strv_from_string’
libinput-1.29.2/src/util-strings.c:194:24: return_function: returning to ‘strv_from_string’ from ‘next_word’
libinput-1.29.2/src/util-strings.c:194:16: branch_true: following ‘true’ branch...
libinput-1.29.2/src/util-strings.c:195:30: branch_true: ...to here
libinput-1.29.2/src/util-strings.c:196:20: branch_true: following ‘true’ branch (when ‘copy’ is NULL)...
 branch_true: ...to here
libinput-1.29.2/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-126): [#def163]
libinput-1.29.2/test/litest-main.c:160:39: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libinput-1.29.2/test/litest-main.c:152:1: enter_function: entry to ‘setup_tests’
libinput-1.29.2/test/litest-main.c:156:52: branch_true: following ‘true’ branch...
libinput-1.29.2/test/litest-main.c:159:21: branch_true: ...to here
libinput-1.29.2/test/litest-main.c:159:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.29.2/test/litest-main.c:159:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.29.2/test/litest-main.c:160:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.29.2/test/litest-main.c:160:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.29.2/test/litest-main.c:156:52: branch_true: following ‘true’ branch...
libinput-1.29.2/test/litest-main.c:159:21: branch_true: ...to here
libinput-1.29.2/test/litest-main.c:159:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.29.2/test/litest-main.c:159:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.29.2/test/litest-main.c:160:39: danger: out-of-bounds read from byte 16 till byte 23 but ‘__start_test_collection_section’ ends at byte 16
#  158|   		struct suite *s;
#  159|   		s = zalloc(sizeof(*s));
#  160|-> 		s->name = safe_strdup(c->name);
#  161|   
#  162|   		list_init(&s->tests);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
libinput-1.29.2/test/litest-main.c:162:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/test/litest-main.c:152:1: enter_function: entry to ‘setup_tests’
libinput-1.29.2/test/litest-main.c:156:52: branch_true: following ‘true’ branch...
libinput-1.29.2/test/litest-main.c:159:21: branch_true: ...to here
libinput-1.29.2/test/litest-main.c:159:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.29.2/test/litest-main.c:159:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.29.2/test/litest-main.c:160:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.29.2/test/litest-main.c:160:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.29.2/test/litest-main.c:162:17: danger: ‘<unknown>’ leaks here; was allocated at [(15)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/14)
#  160|   		s->name = safe_strdup(c->name);
#  161|   
#  162|-> 		list_init(&s->tests);
#  163|   		list_append(&all_test_suites, &s->node);
#  164|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
libinput-1.29.2/test/litest-main.c:162:17: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/test/litest-main.c:152:1: enter_function: entry to ‘setup_tests’
libinput-1.29.2/test/litest-main.c:156:52: branch_true: following ‘true’ branch...
libinput-1.29.2/test/litest-main.c:159:21: branch_true: ...to here
libinput-1.29.2/test/litest-main.c:159:21: call_function: calling ‘zalloc’ from ‘setup_tests’
libinput-1.29.2/test/litest-main.c:159:21: return_function: returning to ‘setup_tests’ from ‘zalloc’
libinput-1.29.2/test/litest-main.c:160:27: call_function: calling ‘safe_strdup’ from ‘setup_tests’
libinput-1.29.2/test/litest-main.c:160:27: return_function: returning to ‘setup_tests’ from ‘safe_strdup’
libinput-1.29.2/test/litest-main.c:162:17: danger: ‘zalloc(40)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  160|   		s->name = safe_strdup(c->name);
#  161|   
#  162|-> 		list_init(&s->tests);
#  163|   		list_append(&all_test_suites, &s->node);
#  164|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
libinput-1.29.2/test/litest-runner.c:381:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
libinput-1.29.2/test/litest-runner.c:545:1: enter_function: entry to ‘litest_runner_test_check_status’
libinput-1.29.2/test/litest-runner.c:549:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/test/litest-runner.c:555:20: branch_false: following ‘false’ branch...
libinput-1.29.2/test/litest-runner.c:558:20: branch_false: ...to here
libinput-1.29.2/test/litest-runner.c:558:20: branch_false: following ‘false’ branch...
libinput-1.29.2/test/litest-runner.c:562:21: branch_false: ...to here
libinput-1.29.2/test/litest-runner.c:568:29: call_function: calling ‘litest_runner_test_collect_child’ from ‘litest_runner_test_check_status’
#  379|   	} else {
#  380|   		stringbuf_append_from_fd(b, fd, 0);
#  381|-> 		close(fd);
#  382|   	}
#  383|   }

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
libinput-1.29.2/test/litest-runner.c:907:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(736)’
libinput-1.29.2/test/litest-runner.c:889:1: enter_function: entry to ‘litest_runner_add_test’
libinput-1.29.2/test/litest-runner.c:892:40: call_function: calling ‘zalloc’ from ‘litest_runner_add_test’
libinput-1.29.2/test/litest-runner.c:892:40: return_function: returning to ‘litest_runner_add_test’ from ‘zalloc’
libinput-1.29.2/test/litest-runner.c:899:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.29.2/test/litest-runner.c:900:17: branch_true: ...to here
libinput-1.29.2/test/litest-runner.c:899:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.29.2/test/litest-runner.c:900:17: branch_true: ...to here
libinput-1.29.2/test/litest-runner.c:899:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.29.2/test/litest-runner.c:900:17: branch_true: ...to here
libinput-1.29.2/test/litest-runner.c:899:25: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.29.2/test/litest-runner.c:900:17: branch_true: ...to here
libinput-1.29.2/test/litest-runner.c:899:25: branch_false: following ‘false’ branch (when ‘i == 4’)...
 branch_false: ...to here
libinput-1.29.2/test/litest-runner.c:903:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.29.2/test/litest-runner.c:904:17: branch_true: ...to here
libinput-1.29.2/test/litest-runner.c:903:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.29.2/test/litest-runner.c:904:17: branch_true: ...to here
libinput-1.29.2/test/litest-runner.c:903:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.29.2/test/litest-runner.c:904:17: branch_true: ...to here
libinput-1.29.2/test/litest-runner.c:903:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
libinput-1.29.2/test/litest-runner.c:904:17: branch_true: ...to here
libinput-1.29.2/test/litest-runner.c:903:28: branch_false: following ‘false’ branch (when ‘i == 4’)...
libinput-1.29.2/test/litest-runner.c:907:9: branch_false: ...to here
libinput-1.29.2/test/litest-runner.c:907:9: danger: ‘zalloc(736)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
#  905|   	}
#  906|   
#  907|-> 	list_append(&runner->tests, &t->node);
#  908|   }
#  909|   

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
libinput-1.29.2/test/litest.c:270:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.29.2/test/litest.c:4839:1: enter_function: entry to ‘litest_logcapture_setup’
libinput-1.29.2/test/litest.c:4841:39: call_function: calling ‘zalloc’ from ‘litest_logcapture_setup’
libinput-1.29.2/test/litest.c:4841:39: return_function: returning to ‘litest_logcapture_setup’ from ‘zalloc’
libinput-1.29.2/test/litest.c:4842:9: call_function: calling ‘litest_context_set_user_data’ from ‘litest_logcapture_setup’
#  268|   	litest_log("in %s() (%s:%d)\n", func, file, line);
#  269|   	litest_backtrace(func);
#  270|-> 	litest_runner_abort();
#  271|   }
#  272|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
libinput-1.29.2/test/litest.c:861:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/test/litest.c:867:1: enter_function: entry to ‘litest_add_tcase_for_device_with_params’
libinput-1.29.2/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): [#def174]
libinput-1.29.2/test/litest.c:861:22: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(80)’
libinput-1.29.2/test/litest.c:867:1: enter_function: entry to ‘litest_add_tcase_for_device_with_params’
libinput-1.29.2/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): [#def175]
libinput-1.29.2/test/litest.c:2168:48: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(24)’
libinput-1.29.2/test/litest.c:4839:1: enter_function: entry to ‘litest_logcapture_setup’
libinput-1.29.2/test/litest.c:4841:39: call_function: calling ‘zalloc’ from ‘litest_logcapture_setup’
libinput-1.29.2/test/litest.c:4841:39: return_function: returning to ‘litest_logcapture_setup’ from ‘zalloc’
libinput-1.29.2/test/litest.c:4842:9: call_function: calling ‘litest_context_set_user_data’ from ‘litest_logcapture_setup’
# 2166|   litest_context_set_user_data(struct libinput *li, void *data)
# 2167|   {
# 2168|-> 	struct litest_user_data *litest_data = libinput_get_user_data(li);
# 2169|   	litest_assert_ptr_notnull(litest_data);
# 2170|   	litest_data->private = data;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def176]
libinput-1.29.2/test/litest.h:651:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘litest_create_context()’
libinput-1.29.2/test/test-pointer.c:303:51: call_function: inlined call to ‘litest_destroy_contextp’ from ‘pointer_absolute_initial_state’
#  649|   void
#  650|   litest_destroy_context(struct libinput *li);
#  651|-> DEFINE_TRIVIAL_CLEANUP_FUNC(struct libinput *, litest_destroy_context);
#  652|   
#  653|   #define _litest_context_destroy_ _cleanup_(litest_destroy_contextp)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def177]
libinput-1.29.2/test/litest.h:869:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘litest_add_device(li, -966)’
libinput-1.29.2/test/test-trackpoint.c:209:1: enter_function: entry to ‘trackpoint_topsoftbuttons_left_handed_touchpad’
libinput-1.29.2/test/test-trackpoint.c:217:9: call_function: calling ‘litest_disable_hold_gestures’ from ‘trackpoint_topsoftbuttons_left_handed_touchpad’
libinput-1.29.2/test/test-trackpoint.c:219:35: call_function: inlined call to ‘litest_device_destroyp’ from ‘trackpoint_topsoftbuttons_left_handed_touchpad’
#  867|   litest_device_destroy(struct litest_device *d);
#  868|   
#  869|-> DEFINE_DESTROY_CLEANUP_FUNC(litest_device);
#  870|   
#  871|   const char *

Error: GCC_ANALYZER_WARNING (CWE-457): [#def178]
libinput-1.29.2/test/litest.h:869:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘litest_add_device(li, -987)’
libinput-1.29.2/test/test-trackpoint.c:437:35: call_function: inlined call to ‘litest_device_destroyp’ from ‘trackpoint_palmdetect_require_min_events_timeout’
#  867|   litest_device_destroy(struct litest_device *d);
#  868|   
#  869|-> DEFINE_DESTROY_CLEANUP_FUNC(litest_device);
#  870|   
#  871|   const char *

Error: GCC_ANALYZER_WARNING (CWE-404): [#def179]
libinput-1.29.2/test/test-misc.c:81:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
libinput-1.29.2/test/test-misc.c:74:9: acquire_resource: ‘va_start’ called here
libinput-1.29.2/test/test-misc.c:76:16: branch_true: following ‘true’ branch (when ‘type != 4294967295’)...
libinput-1.29.2/test/test-misc.c:77:16: branch_true: ...to here
libinput-1.29.2/test/test-misc.c:76:16: branch_true: following ‘true’ branch (when ‘code != 4294967295’)...
libinput-1.29.2/test/test-misc.c:79:20: branch_true: ...to here
libinput-1.29.2/test/test-misc.c:81:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/8/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: GCC_ANALYZER_WARNING (CWE-401): [#def180]
libinput-1.29.2/test/test-quirks.c:54:9: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(16)’
libinput-1.29.2/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.29.2/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): [#def181]
libinput-1.29.2/test/test-quirks.c:62:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.29.2/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): [#def182]
libinput-1.29.2/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): [#def183]
libinput-1.29.2/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.29.2/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.29.2/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): [#def184]
libinput-1.29.2/test/test-quirks.c:67:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(strdup_printf("%s/testfile.quirks", &dirname), "w+")’
libinput-1.29.2/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.29.2/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): [#def185]
libinput-1.29.2/test/test-quirks.c:67:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.29.2/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): [#def186]
libinput-1.29.2/test/test-quirks.c:67:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(strdup_printf("%s/testfile.quirks", &dirname), "w+")’
libinput-1.29.2/test/test-quirks.c:1511:1: enter_function: entry to ‘quirks_ctx_ref’
libinput-1.29.2/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): [#def187]
libinput-1.29.2/test/test-quirks.c:985:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/test/test-quirks.c:956:1: enter_function: entry to ‘test_attr_parse’
libinput-1.29.2/test/test-quirks.c:975:35: call_function: calling ‘data_dir_new’ from ‘test_attr_parse’
libinput-1.29.2/test/test-quirks.c:975:35: return_function: returning to ‘test_attr_parse’ from ‘data_dir_new’
libinput-1.29.2/test/test-quirks.c:982:12: branch_true: following ‘true’ branch...
libinput-1.29.2/test/test-quirks.c:983:38: branch_true: ...to here
libinput-1.29.2/test/test-quirks.c:985:17: danger: ‘<unknown>’ leaks here; was allocated at [(15)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/14)
#  983|   		_unref_(quirks) *q = quirks_fetch_for_device(ctx, ud);
#  984|   		litest_assert_notnull(q);
#  985|-> 		litest_assert(func(q, which, data));
#  986|   		litest_assert(quirks_has_quirk(q, which));
#  987|   		result = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
libinput-1.29.2/test/test-quirks.c:985:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data_dir_new(&buf)’
libinput-1.29.2/test/test-quirks.c:956:1: enter_function: entry to ‘test_attr_parse’
libinput-1.29.2/test/test-quirks.c:975:35: call_function: calling ‘data_dir_new’ from ‘test_attr_parse’
libinput-1.29.2/test/test-quirks.c:975:35: return_function: returning to ‘test_attr_parse’ from ‘data_dir_new’
libinput-1.29.2/test/test-quirks.c:982:12: branch_true: following ‘true’ branch...
libinput-1.29.2/test/test-quirks.c:983:38: branch_true: ...to here
libinput-1.29.2/test/test-quirks.c:985:17: danger: ‘data_dir_new(&buf)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/7)
#  983|   		_unref_(quirks) *q = quirks_fetch_for_device(ctx, ud);
#  984|   		litest_assert_notnull(q);
#  985|-> 		litest_assert(func(q, which, data));
#  986|   		litest_assert(quirks_has_quirk(q, which));
#  987|   		result = true;

Error: CPPCHECK_WARNING (CWE-457): [#def189]
libinput-1.29.2/test/test-tablet.c:7260: 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
# 7258|   	}
# 7259|   
# 7260|-> 	if (!libinput_tablet_tool_config_eraser_button_get_modes(tool)) {
# 7261|   		libinput_tablet_tool_unref(tool);
# 7262|   		return LITEST_NOT_APPLICABLE;

Error: COMPILER_WARNING (CWE-252): [#def190]
libinput-1.29.2/test/test-utils.c: scope_hint: In function ‘find_files_test’
libinput-1.29.2/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): [#def191]
libinput-1.29.2/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.29.2/tools/libinput-debug-tablet-pad.c:246:12: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/libinput-debug-tablet-pad.c:249:14: branch_false: ...to here
libinput-1.29.2/tools/libinput-debug-tablet-pad.c:249:12: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/libinput-debug-tablet-pad.c:252:23: branch_false: ...to here
libinput-1.29.2/tools/libinput-debug-tablet-pad.c:256:12: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/libinput-debug-tablet-pad.c:259:19: branch_false: ...to here
libinput-1.29.2/tools/libinput-debug-tablet-pad.c:260:12: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-debug-tablet-pad.c:261:26: branch_true: ...to here
libinput-1.29.2/tools/libinput-debug-tablet-pad.c:261:26: acquire_resource: opened here
libinput-1.29.2/tools/libinput-debug-tablet-pad.c:262:17: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-debug-tablet-pad.c:263:17: branch_true: ...to here
libinput-1.29.2/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/0/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: COMPILER_WARNING (CWE-252): [#def192]
libinput-1.29.2/tools/libinput-record.c: scope_hint: In function ‘signalfd_dispatch’
libinput-1.29.2/tools/libinput-record.c:2105:15: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 2105 |         (void)read(fd, &fdsi, sizeof(fdsi));
#      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2103|   	struct signalfd_siginfo fdsi;
# 2104|   
# 2105|-> 	(void)read(fd, &fdsi, sizeof(fdsi));
# 2106|   
# 2107|   	ctx->stop = true;

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
libinput-1.29.2/tools/libinput-record.c:2477:33: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&syspath)’
libinput-1.29.2/tools/libinput-record.c:2464:9: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2472:40: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2473:23: acquire_memory: allocated here
libinput-1.29.2/tools/libinput-record.c:2474:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2477:33: danger: ‘opendir(&syspath)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 2475|   			continue;
# 2476|   
# 2477|-> 		while ((entry = readdir(dir))) {
# 2478|   			char hidraw_node[PATH_MAX];
# 2479|   			int fd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
libinput-1.29.2/tools/libinput-record.c:2497:25: warning[-Wanalyzer-malloc-leak]: leak of ‘zalloc(40)’
libinput-1.29.2/tools/libinput-record.c:2460:1: enter_function: entry to ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2464:9: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2472:40: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2474:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2477:24: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2482:44: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2482:30: call_function: calling ‘strstartswith’ from ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2482:30: return_function: returning to ‘init_hidraw’ from ‘strstartswith’
libinput-1.29.2/tools/libinput-record.c:2482:28: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2485:25: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2490:28: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/libinput-record.c:2493:34: branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2493:34: call_function: calling ‘zalloc’ from ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2493:34: return_function: returning to ‘init_hidraw’ from ‘zalloc’
libinput-1.29.2/tools/libinput-record.c:2495:40: call_function: calling ‘safe_strdup’ from ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2495:40: return_function: returning to ‘init_hidraw’ from ‘safe_strdup’
libinput-1.29.2/tools/libinput-record.c:2497:25: danger: ‘zalloc(40)’ leaks here; was allocated at [(28)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/27)
# 2495|   			hidraw->name = safe_strdup(entry->d_name);
# 2496|   			hidraw->device = dev;
# 2497|-> 			list_insert(&dev->hidraw_devices, &hidraw->link);
# 2498|   		}
# 2499|   		closedir(dir);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def196]
libinput-1.29.2/tools/libinput-record.c:2503:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor
libinput-1.29.2/tools/libinput-record.c:2460:1: enter_function: entry to ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2464:9: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2472:40: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2474:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2477:24: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2482:44: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2482:30: call_function: calling ‘strstartswith’ from ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2482:30: return_function: returning to ‘init_hidraw’ from ‘strstartswith’
libinput-1.29.2/tools/libinput-record.c:2482:28: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2485:25: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2489:30: acquire_resource: opened here
libinput-1.29.2/tools/libinput-record.c:2490:28: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/libinput-record.c:2493:34: branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2493:34: call_function: calling ‘zalloc’ from ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2493:34: return_function: returning to ‘init_hidraw’ from ‘zalloc’
libinput-1.29.2/tools/libinput-record.c:2495:40: call_function: calling ‘safe_strdup’ from ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2495:40: return_function: returning to ‘init_hidraw’ from ‘safe_strdup’
libinput-1.29.2/tools/libinput-record.c:2503:1: danger: leaks here; was opened at [(22)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/21)
# 2501|   
# 2502|   	return true;
# 2503|-> }
# 2504|   
# 2505|   static void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
libinput-1.29.2/tools/libinput-record.c:2503:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libinput-1.29.2/tools/libinput-record.c:2460:1: enter_function: entry to ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2464:9: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2472:40: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2474:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2477:24: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2482:44: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2482:30: call_function: calling ‘strstartswith’ from ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2482:30: return_function: returning to ‘init_hidraw’ from ‘strstartswith’
libinput-1.29.2/tools/libinput-record.c:2482:28: branch_true: following ‘true’ branch...
libinput-1.29.2/tools/libinput-record.c:2485:25: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2490:28: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/libinput-record.c:2493:34: branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2493:34: call_function: calling ‘zalloc’ from ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2493:34: return_function: returning to ‘init_hidraw’ from ‘zalloc’
libinput-1.29.2/tools/libinput-record.c:2495:40: call_function: calling ‘safe_strdup’ from ‘init_hidraw’
libinput-1.29.2/tools/libinput-record.c:2495:40: return_function: returning to ‘init_hidraw’ from ‘safe_strdup’
libinput-1.29.2/tools/libinput-record.c:2503:1: danger: ‘<unknown>’ leaks here; was allocated at [(35)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/34)
# 2501|   
# 2502|   	return true;
# 2503|-> }
# 2504|   
# 2505|   static void

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

Error: GCC_ANALYZER_WARNING (CWE-476): [#def199]
libinput-1.29.2/tools/libinput-record.c:2758:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
libinput-1.29.2/tools/libinput-record.c:2627:1: enter_function: entry to ‘main’
libinput-1.29.2/tools/libinput-record.c:2737:32: call_function: calling ‘safe_strdup’ from ‘main’
libinput-1.29.2/tools/libinput-record.c:2737:32: return_function: returning to ‘main’ from ‘safe_strdup’
libinput-1.29.2/tools/libinput-record.c:2739:12: branch_false: following ‘false’ branch...
libinput-1.29.2/tools/libinput-record.c:2746:12: branch_false: ...to here
libinput-1.29.2/tools/libinput-record.c:2746:12: branch_true: following ‘true’ branch (when ‘all != 0’)...
libinput-1.29.2/tools/libinput-record.c:2747:25: branch_true: ...to here
libinput-1.29.2/tools/libinput-record.c:2747:25: call_function: calling ‘all_devices’ from ‘main’
libinput-1.29.2/tools/libinput-record.c:2747:25: return_function: returning to ‘main’ from ‘all_devices’
libinput-1.29.2/tools/libinput-record.c:2758:32: danger: dereference of NULL ‘p’
# 2756|   	}
# 2757|   
# 2758|-> 	for (char **p = paths; *p; p++) {
# 2759|   		if (!init_device(&ctx, *p, grab)) {
# 2760|   			goto out;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def200]
libinput-1.29.2/udev/libinput-fuzz-extract.c:64:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(udev_device_get_devnode(device), 0)’
libinput-1.29.2/udev/libinput-fuzz-extract.c:57:12: branch_false: following ‘false’ branch...
libinput-1.29.2/udev/libinput-fuzz-extract.c:60:14: branch_false: ...to here
libinput-1.29.2/udev/libinput-fuzz-extract.c:60:14: acquire_resource: opened here
libinput-1.29.2/udev/libinput-fuzz-extract.c:61:12: branch_false: following ‘false’ branch...
libinput-1.29.2/udev/libinput-fuzz-extract.c:64:14: branch_false: ...to here
libinput-1.29.2/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): [#def201]
libinput-1.29.2/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.29.2/udev/libinput-fuzz-to-zero.c:50:12: branch_false: following ‘false’ branch...
libinput-1.29.2/udev/libinput-fuzz-to-zero.c:53:14: branch_false: ...to here
libinput-1.29.2/udev/libinput-fuzz-to-zero.c:53:14: acquire_resource: opened here
libinput-1.29.2/udev/libinput-fuzz-to-zero.c:54:12: branch_false: following ‘false’ branch...
libinput-1.29.2/udev/libinput-fuzz-to-zero.c:57:14: branch_false: ...to here
libinput-1.29.2/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.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
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-164.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-gcc-latest-x86_64
project-namelibinput-1.29.2-1.fc44
store-results-to/tmp/tmpmkj5shp2/libinput-1.29.2-1.fc44.tar.xz
time-created2025-10-28 19:09:44
time-finished2025-10-28 19:12:06
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpmkj5shp2/libinput-1.29.2-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpmkj5shp2/libinput-1.29.2-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9