libdecor-0.2.5-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libdecor-0.2.5/src/libdecor-fallback.c:184:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 16)’
libdecor-0.2.5/src/libdecor-fallback.c:179:1: enter_function: entry to ‘libdecor_fallback_plugin_new’
libdecor-0.2.5/src/libdecor-fallback.c:183:18: call_function: inlined call to ‘zalloc’ from ‘libdecor_fallback_plugin_new’
libdecor-0.2.5/src/libdecor-fallback.c:184:9: throw: if ‘libdecor_plugin_init’ throws an exception...
libdecor-0.2.5/src/libdecor-fallback.c:184:9: danger: ‘calloc(1, 16)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  182|   
#  183|   	plugin = zalloc(sizeof *plugin);
#  184|-> 	libdecor_plugin_init(&plugin->plugin, context, &fallback_plugin_iface);
#  185|   	plugin->context = context;
#  186|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
libdecor-0.2.5/src/libdecor-fallback.c:185:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 16)’
libdecor-0.2.5/src/libdecor-fallback.c:179:1: enter_function: entry to ‘libdecor_fallback_plugin_new’
libdecor-0.2.5/src/libdecor-fallback.c:183:18: call_function: inlined call to ‘zalloc’ from ‘libdecor_fallback_plugin_new’
libdecor-0.2.5/src/libdecor-fallback.c:185:9: danger: ‘calloc(1, 16)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  183|   	plugin = zalloc(sizeof *plugin);
#  184|   	libdecor_plugin_init(&plugin->plugin, context, &fallback_plugin_iface);
#  185|-> 	plugin->context = context;
#  186|   
#  187|   	libdecor_notify_plugin_ready(context);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
libdecor-0.2.5/src/libdecor.c:218:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 12)’
libdecor-0.2.5/src/libdecor.c:212:1: enter_function: entry to ‘libdecor_state_new’
libdecor-0.2.5/src/libdecor.c:217:17: call_function: inlined call to ‘zalloc’ from ‘libdecor_state_new’
libdecor-0.2.5/src/libdecor.c:218:9: danger: ‘calloc(1, 12)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  216|   
#  217|   	state = zalloc(sizeof *state);
#  218|-> 	state->content_width = width;
#  219|   	state->content_height = height;
#  220|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
libdecor-0.2.5/src/libdecor.c:366:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘configuration’
libdecor-0.2.5/src/libdecor.c:352:1: enter_function: entry to ‘xdg_surface_configure’
libdecor-0.2.5/src/libdecor.c:363:12: branch_true: following ‘true’ branch (when ‘configuration’ is NULL)...
libdecor-0.2.5/src/libdecor.c:364:33: call_function: inlined call to ‘libdecor_configuration_new’ from ‘xdg_surface_configure’
libdecor-0.2.5/src/libdecor.c:366:9: danger: ‘configuration’ could be NULL: unchecked value from [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  364|   		configuration = libdecor_configuration_new();
#  365|   
#  366|-> 	configuration->serial = serial;
#  367|   
#  368|   	frame_priv->iface->configure(frame,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libdecor-0.2.5/src/libdecor.c:368:9: warning[-Wanalyzer-malloc-leak]: leak of ‘configuration’
libdecor-0.2.5/src/libdecor.c:352:1: enter_function: entry to ‘xdg_surface_configure’
libdecor-0.2.5/src/libdecor.c:363:12: branch_true: following ‘true’ branch (when ‘configuration’ is NULL)...
libdecor-0.2.5/src/libdecor.c:364:33: call_function: inlined call to ‘libdecor_configuration_new’ from ‘xdg_surface_configure’
libdecor-0.2.5/src/libdecor.c:368:9: throw: if the called function throws an exception...
libdecor-0.2.5/src/libdecor.c:368:9: danger: ‘configuration’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  366|   	configuration->serial = serial;
#  367|   
#  368|-> 	frame_priv->iface->configure(frame,
#  369|   				     configuration,
#  370|   				     frame_priv->user_data);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
libdecor-0.2.5/src/libdecor.c:438:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*((struct libdecor_frame)*(void *)user_data).priv.pending_configuration’
libdecor-0.2.5/src/libdecor.c:424:1: enter_function: entry to ‘xdg_toplevel_configure’
libdecor-0.2.5/src/libdecor.c:436:45: call_function: inlined call to ‘libdecor_configuration_new’ from ‘xdg_toplevel_configure’
libdecor-0.2.5/src/libdecor.c:438:9: danger: ‘calloc(1, 24)’ could be NULL: unchecked value from [(4)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/3)
#  436|   	frame_priv->pending_configuration = libdecor_configuration_new();
#  437|   
#  438|-> 	frame_priv->pending_configuration->has_size = true;
#  439|   	frame_priv->pending_configuration->window_width = width;
#  440|   	frame_priv->pending_configuration->window_height = height;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
libdecor-0.2.5/src/libdecor.c:443:9: warning[-Wanalyzer-malloc-leak]: leak of ‘*((struct libdecor_frame)*(void *)user_data).priv.pending_configuration’
libdecor-0.2.5/src/libdecor.c:424:1: enter_function: entry to ‘xdg_toplevel_configure’
libdecor-0.2.5/src/libdecor.c:436:45: call_function: inlined call to ‘libdecor_configuration_new’ from ‘xdg_toplevel_configure’
libdecor-0.2.5/src/libdecor.c:443:9: danger: ‘*((struct libdecor_frame)*(void *)user_data).priv.pending_configuration’ leaks here; was allocated at [(4)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/3)
#  441|   
#  442|   	frame_priv->pending_configuration->has_window_state = true;
#  443|-> 	frame_priv->pending_configuration->window_state = window_state;
#  444|   }
#  445|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
libdecor-0.2.5/src/libdecor.c:583:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 168)’
libdecor-0.2.5/src/libdecor.c:564:1: enter_function: entry to ‘libdecor_decorate’
libdecor-0.2.5/src/libdecor.c:573:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:576:17: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:577:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:580:22: call_function: inlined call to ‘zalloc’ from ‘libdecor_decorate’
libdecor-0.2.5/src/libdecor.c:583:9: danger: ‘calloc(1, 168)’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  581|   	frame->priv = frame_priv;
#  582|   
#  583|-> 	frame_priv->ref_count = 1;
#  584|   	frame_priv->context = context;
#  585|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
libdecor-0.2.5/src/libdecor.c:1162:39: warning[-Wanalyzer-malloc-leak]: leak of ‘libdecor_state_new(*frame_22(D)->priv.content_width, *frame_22(D)->priv.content_height)’
libdecor-0.2.5/src/libdecor.c:758:1: enter_function: entry to ‘notify_on_capability_change’
libdecor-0.2.5/src/libdecor.c:764:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:767:13: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:767:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:768:13: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:767:13: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:771:9: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:787:17: call_function: calling ‘libdecor_state_new’ from ‘notify_on_capability_change’
libdecor-0.2.5/src/libdecor.c:787:17: return_function: returning to ‘notify_on_capability_change’ from ‘libdecor_state_new’
libdecor-0.2.5/src/libdecor.c:789:9: call_function: calling ‘libdecor_frame_commit’ from ‘notify_on_capability_change’
# 1160|   		state->window_state = configuration->window_state;
# 1161|   	} else {
# 1162|-> 		state->window_state = frame_priv->window_state;
# 1163|   	}
# 1164|   

Error: COMPILER_WARNING (CWE-704): [#def10]
libdecor-0.2.5/src/libdecor.c: scope_hint: In function ‘load_plugin_loader’
libdecor-0.2.5/src/libdecor.c:1479:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1479 |         ext = strrchr(name, '.');
#      |             ^
# 1477|   	struct plugin_loader *plugin_loader;
# 1478|   
# 1479|-> 	ext = strrchr(name, '.');
# 1480|   	if (ext == NULL || strcmp(ext, ".so") != 0)
# 1481|   		return NULL;

Error: COMPILER_WARNING (CWE-704): [#def11]
libdecor-0.2.5/src/libdecor.c:1479:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1477|   	struct plugin_loader *plugin_loader;
# 1478|   
# 1479|-> 	ext = strrchr(name, '.');
# 1480|   	if (ext == NULL || strcmp(ext, ".so") != 0)
# 1481|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
libdecor-0.2.5/src/libdecor.c:1533:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 48)’
libdecor-0.2.5/src/libdecor.c:1468:1: enter_function: entry to ‘load_plugin_loader’
libdecor-0.2.5/src/libdecor.c:1480:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:1483:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:1486:15: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:1488:12: branch_false: following ‘false’ branch (when ‘lib’ is non-NULL)...
libdecor-0.2.5/src/libdecor.c:1493:30: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:1494:12: branch_false: following ‘false’ branch (when ‘plugin_description’ is non-NULL)...
libdecor-0.2.5/src/libdecor.c:1502:13: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:1502:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:1513:15: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:1513:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:1518:14: branch_false: ...to here
libdecor-0.2.5/src/libdecor.c:1518:12: branch_true: following ‘true’ branch...
libdecor-0.2.5/src/libdecor.c:1523:20: branch_true: ...to here
libdecor-0.2.5/src/libdecor.c:1524:12: branch_false: following ‘false’ branch...
libdecor-0.2.5/src/libdecor.c:1532:25: call_function: inlined call to ‘zalloc’ from ‘load_plugin_loader’
libdecor-0.2.5/src/libdecor.c:1533:9: danger: ‘calloc(1, 48)’ could be NULL: unchecked value from [(19)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/18)
# 1531|   
# 1532|   	plugin_loader = zalloc(sizeof *plugin_loader);
# 1533|-> 	plugin_loader->description = plugin_description;
# 1534|   	plugin_loader->lib = lib;
# 1535|   	plugin_loader->priority = priority;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
libdecor-0.2.5/src/libdecor.c:1567:9: warning[-Wanalyzer-malloc-leak]: leak of ‘all_plugin_dirs’
libdecor-0.2.5/src/libdecor.c:1565:27: acquire_memory: allocated here
libdecor-0.2.5/src/libdecor.c:1567:9: throw: if ‘wl_list_init’ throws an exception...
libdecor-0.2.5/src/libdecor.c:1567:9: danger: ‘all_plugin_dirs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 1565|   	all_plugin_dirs = strdup(plugin_dir_env);
# 1566|   
# 1567|-> 	wl_list_init(&plugin_loaders);
# 1568|   	plugin_dir = strtok_r(all_plugin_dirs, ":", &saveptr);
# 1569|   	while (plugin_dir) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
libdecor-0.2.5/src/libdecor.c:1579:38: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(plugin_dir)’
libdecor-0.2.5/src/libdecor.c:1569:16: branch_true: following ‘true’ branch (when ‘plugin_dir’ is non-NULL)...
libdecor-0.2.5/src/libdecor.c:1570:23: branch_true: ...to here
libdecor-0.2.5/src/libdecor.c:1570:23: acquire_memory: allocated here
libdecor-0.2.5/src/libdecor.c:1579:38: throw: if ‘readdir’ throws an exception...
libdecor-0.2.5/src/libdecor.c:1579:38: danger: ‘opendir(plugin_dir)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 1577|   				struct dirent *de;
# 1578|   
# 1579|-> 				de = readdir(dir);
# 1580|   				if (!de)
# 1581|   					break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
libdecor-0.2.5/src/libdecor.c:1725:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 96)’
libdecor-0.2.5/src/libdecor.c:1718:1: enter_function: entry to ‘libdecor_new’
libdecor-0.2.5/src/libdecor.c:1723:19: call_function: inlined call to ‘zalloc’ from ‘libdecor_new’
libdecor-0.2.5/src/libdecor.c:1725:9: danger: ‘calloc(1, 96)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
# 1723|   	context = zalloc(sizeof *context);
# 1724|   
# 1725|-> 	context->ref_count = 1;
# 1726|   	context->iface = iface;
# 1727|   	context->wl_display = wl_display;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
libdecor-0.2.5/src/os-compatibility.c:76:14: warning[-Wanalyzer-malloc-leak]: leak of ‘name’
libdecor-0.2.5/src/os-compatibility.c:151:1: enter_function: entry to ‘libdecor_os_create_anonymous_file’
libdecor-0.2.5/src/os-compatibility.c:160:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
libdecor-0.2.5/src/os-compatibility.c:171:24: branch_false: ...to here
libdecor-0.2.5/src/os-compatibility.c:172:20: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
libdecor-0.2.5/src/os-compatibility.c:177:31: branch_false: ...to here
libdecor-0.2.5/src/os-compatibility.c:177:24: acquire_memory: allocated here
libdecor-0.2.5/src/os-compatibility.c:178:20: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
libdecor-0.2.5/src/os-compatibility.c:181:17: branch_false: ...to here
libdecor-0.2.5/src/os-compatibility.c:184:22: call_function: calling ‘create_tmpfile_cloexec’ from ‘libdecor_os_create_anonymous_file’
#   74|   		unlink(tmpname);
#   75|   #else
#   76|-> 	fd = mkstemp(tmpname);
#   77|   	if (fd >= 0) {
#   78|   		fd = set_cloexec_or_close(fd);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:887:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 24)’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:893:1: enter_function: entry to ‘surface_enter’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:903:17: call_function: inlined call to ‘get_component_for_surface’ from ‘surface_enter’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:907:14: call_function: calling ‘add_surface_output’ from ‘surface_enter’
#  885|   
#  886|   	surface_output = zalloc(sizeof *surface_output);
#  887|-> 	surface_output->output = output;
#  888|   	wl_list_insert(list, &surface_output->link);
#  889|   	return true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:888:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 24)’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:893:1: enter_function: entry to ‘surface_enter’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:903:17: call_function: inlined call to ‘get_component_for_surface’ from ‘surface_enter’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:907:14: call_function: calling ‘add_surface_output’ from ‘surface_enter’
#  886|   	surface_output = zalloc(sizeof *surface_output);
#  887|   	surface_output->output = output;
#  888|-> 	wl_list_insert(list, &surface_output->link);
#  889|   	return true;
#  890|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:1566:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘border_component’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2271:1: enter_function: entry to ‘pointer_leave’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2284:9: call_function: calling ‘synthesize_pointer_leave’ from ‘pointer_leave’
# 1564|   		      struct border_component *border_component)
# 1565|   {
# 1566|-> 	enum component component = border_component->type;
# 1567|   	struct buffer *buffer;
# 1568|   	cairo_t *cr;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:1985:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 24)’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:1976:1: enter_function: entry to ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:1984:33: call_function: inlined call to ‘zalloc’ from ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:1985:17: danger: ‘calloc(1, 24)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1983|   		struct cursor_output *cursor_output;
# 1984|   		cursor_output = zalloc(sizeof *cursor_output);
# 1985|-> 		cursor_output->output = wl_output_get_user_data(wl_output);
# 1986|   		wl_list_insert(&seat->cursor_outputs, &cursor_output->link);
# 1987|   		if (update_local_cursor(seat))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:1986:17: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 24)’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:1976:1: enter_function: entry to ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:1984:33: call_function: inlined call to ‘zalloc’ from ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:1986:17: danger: ‘calloc(1, 24)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1984|   		cursor_output = zalloc(sizeof *cursor_output);
# 1985|   		cursor_output->output = wl_output_get_user_data(wl_output);
# 1986|-> 		wl_list_insert(&seat->cursor_outputs, &cursor_output->link);
# 1987|   		if (update_local_cursor(seat))
# 1988|   			send_cursor(seat);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2486:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 200)’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2471:1: enter_function: entry to ‘init_wl_seat’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2485:16: call_function: inlined call to ‘zalloc’ from ‘init_wl_seat’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2486:9: danger: ‘calloc(1, 200)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 2484|   
# 2485|   	seat = zalloc(sizeof *seat);
# 2486|-> 	seat->cursor_scale = 1;
# 2487|   	seat->plugin_cairo = plugin_cairo;
# 2488|   	wl_list_init(&seat->cursor_outputs);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2488:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 200)’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2471:1: enter_function: entry to ‘init_wl_seat’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2485:16: call_function: inlined call to ‘zalloc’ from ‘init_wl_seat’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2488:9: throw: if ‘wl_list_init’ throws an exception...
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2488:9: danger: ‘calloc(1, 200)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 2486|   	seat->cursor_scale = 1;
# 2487|   	seat->plugin_cairo = plugin_cairo;
# 2488|-> 	wl_list_init(&seat->cursor_outputs);
# 2489|   	wl_list_insert(&plugin_cairo->seat_list, &seat->link);
# 2490|   	seat->wl_seat =

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2575:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 40)’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2560:1: enter_function: entry to ‘init_wl_output’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2574:18: call_function: inlined call to ‘zalloc’ from ‘init_wl_output’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2575:9: danger: ‘calloc(1, 40)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 2573|   
# 2574|   	output = zalloc(sizeof *output);
# 2575|-> 	output->plugin_cairo = plugin_cairo;
# 2576|   	wl_list_insert(&plugin_cairo->output_list, &output->link);
# 2577|   	output->id = id;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2576:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 40)’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2560:1: enter_function: entry to ‘init_wl_output’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2574:18: call_function: inlined call to ‘zalloc’ from ‘init_wl_output’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2576:9: throw: if ‘wl_list_insert’ throws an exception...
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2576:9: danger: ‘calloc(1, 40)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 2574|   	output = zalloc(sizeof *output);
# 2575|   	output->plugin_cairo = plugin_cairo;
# 2576|-> 	wl_list_insert(&plugin_cairo->output_list, &output->link);
# 2577|   	output->id = id;
# 2578|   	output->wl_output =

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2706:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 152)’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2700:1: enter_function: entry to ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2705:24: call_function: inlined call to ‘zalloc’ from ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2706:9: throw: if ‘libdecor_plugin_init’ throws an exception...
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2706:9: danger: ‘calloc(1, 152)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
# 2704|   
# 2705|   	plugin_cairo = zalloc(sizeof *plugin_cairo);
# 2706|-> 	libdecor_plugin_init(&plugin_cairo->plugin,
# 2707|   			     context,
# 2708|   			     &cairo_plugin_iface);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2709:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 152)’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2700:1: enter_function: entry to ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2705:24: call_function: inlined call to ‘zalloc’ from ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/cairo/libdecor-cairo.c:2709:9: danger: ‘calloc(1, 152)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 2707|   			     context,
# 2708|   			     &cairo_plugin_iface);
# 2709|-> 	plugin_cairo->context = context;
# 2710|   
# 2711|   	wl_list_init(&plugin_cairo->visible_frame_list);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:114:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 16)’
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:109:1: enter_function: entry to ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:113:24: call_function: inlined call to ‘zalloc’ from ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:114:9: throw: if ‘libdecor_plugin_init’ throws an exception...
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:114:9: danger: ‘calloc(1, 16)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  112|   
#  113|   	plugin_dummy = zalloc(sizeof *plugin_dummy);
#  114|-> 	libdecor_plugin_init(&plugin_dummy->plugin, context, &dummy_plugin_iface);
#  115|   	plugin_dummy->context = context;
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:115:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 16)’
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:109:1: enter_function: entry to ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:113:24: call_function: inlined call to ‘zalloc’ from ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/dummy/libdecor-dummy.c:115:9: danger: ‘calloc(1, 16)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  113|   	plugin_dummy = zalloc(sizeof *plugin_dummy);
#  114|   	libdecor_plugin_init(&plugin_dummy->plugin, context, &dummy_plugin_iface);
#  115|-> 	plugin_dummy->context = context;
#  116|   
#  117|   	libdecor_notify_plugin_ready(context);

Error: CPPCHECK_WARNING (CWE-457): [#def30]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:411: error[uninitvar]: Uninitialized variable: seat->wl_pointer
#  409|   		struct cursor_output *cursor_output, *tmp;
#  410|   
#  411|-> 		if (seat->wl_pointer)
#  412|   			wl_pointer_destroy(seat->wl_pointer);
#  413|   		if (seat->wl_touch)

Error: CPPCHECK_WARNING (CWE-457): [#def31]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:423: error[uninitvar]: Uninitialized variable: cursor_output.output
#  421|   		wl_list_for_each_safe(cursor_output, tmp, &seat->cursor_outputs, link) {
#  422|   			wl_list_remove(&cursor_output->link);
#  423|-> 			free(cursor_output);
#  424|   		}
#  425|   

Error: CPPCHECK_WARNING (CWE-457): [#def32]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:667: error[uninitvar]: Uninitialized variable: surface_output.output
#  665|   				      &border_component->output_list, link) {
#  666|   			wl_list_remove(&surface_output->link);
#  667|-> 			free(surface_output);
#  668|   		}
#  669|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def33]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:741: error[uninitvar]: Uninitialized variable: surface_output->output
#  739|   
#  740|   	wl_list_for_each(surface_output, &cmpnt->output_list, link) {
#  741|-> 		scale = MAX(scale, surface_output->output->scale);
#  742|   	}
#  743|   	if (scale != cmpnt->scale) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:771:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 24)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:777:1: enter_function: entry to ‘surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:787:17: call_function: inlined call to ‘get_component_for_surface’ from ‘surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:791:14: call_function: calling ‘add_surface_output’ from ‘surface_enter’
#  769|   
#  770|   	surface_output = zalloc(sizeof *surface_output);
#  771|-> 	surface_output->output = output;
#  772|   	wl_list_insert(list, &surface_output->link);
#  773|   	return true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:772:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 24)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:777:1: enter_function: entry to ‘surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:787:17: call_function: inlined call to ‘get_component_for_surface’ from ‘surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:791:14: call_function: calling ‘add_surface_output’ from ‘surface_enter’
#  770|   	surface_output = zalloc(sizeof *surface_output);
#  771|   	surface_output->output = output;
#  772|-> 	wl_list_insert(list, &surface_output->link);
#  773|   	return true;
#  774|   }

Error: CPPCHECK_WARNING (CWE-457): [#def36]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:804: error[uninitvar]: Uninitialized variable: surface_output->output
#  802|   	struct surface_output *surface_output;
#  803|   	wl_list_for_each(surface_output, list, link) {
#  804|-> 		if (surface_output->output->wl_output == wl_output) {
#  805|   			wl_list_remove(&surface_output->link);
#  806|   			free(surface_output);

Error: CPPCHECK_WARNING (CWE-457): [#def37]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1686: error[uninitvar]: Uninitialized variable: seat->name
# 1684|   
# 1685|   	wl_list_for_each(seat, &plugin_gtk->seat_list, link) {
# 1686|-> 		if (streq(seat->name, seat_name)) {
# 1687|   			if (seat->grabbed) {
# 1688|   				fprintf(stderr, "libdecor-WARNING: Application "

Error: CPPCHECK_WARNING (CWE-457): [#def38]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1712: error[uninitvar]: Uninitialized variable: seat->name
# 1710|   
# 1711|   	wl_list_for_each(seat, &plugin_gtk->seat_list, link) {
# 1712|-> 		if (streq(seat->name, seat_name)) {
# 1713|   			if (!seat->grabbed) {
# 1714|   				fprintf(stderr, "libdecor-WARNING: Application "

Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1884:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 24)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1875:1: enter_function: entry to ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1883:33: call_function: inlined call to ‘zalloc’ from ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1884:17: danger: ‘calloc(1, 24)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 1882|   		struct cursor_output *cursor_output;
# 1883|   		cursor_output = zalloc(sizeof *cursor_output);
# 1884|-> 		cursor_output->output = wl_output_get_user_data(wl_output);
# 1885|   		wl_list_insert(&seat->cursor_outputs, &cursor_output->link);
# 1886|   		if (update_local_cursor(seat))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1885:17: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 24)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1875:1: enter_function: entry to ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1883:33: call_function: inlined call to ‘zalloc’ from ‘cursor_surface_enter’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1885:17: danger: ‘calloc(1, 24)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1883|   		cursor_output = zalloc(sizeof *cursor_output);
# 1884|   		cursor_output->output = wl_output_get_user_data(wl_output);
# 1885|-> 		wl_list_insert(&seat->cursor_outputs, &cursor_output->link);
# 1886|   		if (update_local_cursor(seat))
# 1887|   			send_cursor(seat);

Error: CPPCHECK_WARNING (CWE-457): [#def41]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1901: error[uninitvar]: Uninitialized variable: cursor_output->output
# 1899|   		struct cursor_output *cursor_output, *tmp;
# 1900|   		wl_list_for_each_safe(cursor_output, tmp, &seat->cursor_outputs, link) {
# 1901|-> 			if (cursor_output->output->wl_output == wl_output) {
# 1902|   				wl_list_remove(&cursor_output->link);
# 1903|   				free(cursor_output);

Error: CPPCHECK_WARNING (CWE-457): [#def42]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:1939: error[uninitvar]: Uninitialized variable: cursor_output->output
# 1937|   
# 1938|   	wl_list_for_each(cursor_output, &seat->cursor_outputs, link) {
# 1939|-> 		scale = MAX(scale, cursor_output->output->scale);
# 1940|   	}
# 1941|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2574:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 216)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2558:1: enter_function: entry to ‘init_wl_seat’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2573:16: call_function: inlined call to ‘zalloc’ from ‘init_wl_seat’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2574:9: danger: ‘calloc(1, 216)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 2572|   
# 2573|   	seat = zalloc(sizeof *seat);
# 2574|-> 	seat->cursor_scale = 1;
# 2575|   	seat->plugin_gtk = plugin_gtk;
# 2576|   	wl_list_init(&seat->cursor_outputs);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2576:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 216)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2558:1: enter_function: entry to ‘init_wl_seat’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2573:16: call_function: inlined call to ‘zalloc’ from ‘init_wl_seat’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2576:9: throw: if ‘wl_list_init’ throws an exception...
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2576:9: danger: ‘calloc(1, 216)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 2574|   	seat->cursor_scale = 1;
# 2575|   	seat->plugin_gtk = plugin_gtk;
# 2576|-> 	wl_list_init(&seat->cursor_outputs);
# 2577|   	wl_list_insert(&plugin_gtk->seat_list, &seat->link);
# 2578|   	seat->wl_seat =

Error: CPPCHECK_WARNING (CWE-457): [#def45]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2619: error[uninitvar]: Uninitialized variables: frame_gtk.frame, frame_gtk.plugin_gtk, frame_gtk.content_width, frame_gtk.content_height, frame_gtk.window_state, frame_gtk.decoration_type, frame_gtk.title, frame_gtk.capabilities, frame_gtk.active, frame_gtk.touch_active, frame_gtk.focus, frame_gtk.grab, frame_gtk.shadow_showing, frame_gtk.shadow, frame_gtk.window, frame_gtk.header, frame_gtk.headerbar, frame_gtk.hdr_focus, frame_gtk.shadow_blur, frame_gtk.link
# 2617|   			 &output->plugin_gtk->visible_frame_list, link) {
# 2618|   		bool updated = false;
# 2619|-> 		updated |= redraw_scale(frame_gtk, &frame_gtk->shadow);
# 2620|   		if (updated)
# 2621|   			libdecor_frame_toplevel_commit(&frame_gtk->frame);

Error: CPPCHECK_WARNING (CWE-457): [#def46]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2624: error[uninitvar]: Uninitialized variables: seat.plugin_gtk, seat.name, seat.wl_seat, seat.wl_pointer, seat.wl_touch, seat.cursor_surface, seat.current_cursor, seat.cursor_scale, seat.cursor_outputs, seat.cursor_theme, seat.cursor_left_ptr, seat.pointer_focus, seat.touch_focus, seat.pointer_x, seat.pointer_y, seat.pointer_button_time_stamp, seat.touch_down_time_stamp, seat.serial, seat.grabbed, seat.link
# 2622|   	}
# 2623|   	wl_list_for_each(seat, &output->plugin_gtk->seat_list, link) {
# 2624|-> 		if (update_local_cursor(seat))
# 2625|   			send_cursor(seat);
# 2626|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2663:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 40)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2647:1: enter_function: entry to ‘init_wl_output’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2662:18: call_function: inlined call to ‘zalloc’ from ‘init_wl_output’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2663:9: danger: ‘calloc(1, 40)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 2661|   
# 2662|   	output = zalloc(sizeof *output);
# 2663|-> 	output->plugin_gtk = plugin_gtk;
# 2664|   	wl_list_insert(&plugin_gtk->output_list, &output->link);
# 2665|   	output->id = id;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2664:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 40)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2647:1: enter_function: entry to ‘init_wl_output’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2662:18: call_function: inlined call to ‘zalloc’ from ‘init_wl_output’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2664:9: throw: if ‘wl_list_insert’ throws an exception...
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2664:9: danger: ‘calloc(1, 40)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 2662|   	output = zalloc(sizeof *output);
# 2663|   	output->plugin_gtk = plugin_gtk;
# 2664|-> 	wl_list_insert(&plugin_gtk->output_list, &output->link);
# 2665|   	output->id = id;
# 2666|   	output->wl_output =

Error: CPPCHECK_WARNING (CWE-457): [#def49]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2701: error[uninitvar]: Uninitialized variable: surface_output->output
# 2699|   	struct surface_output *surface_output;
# 2700|   	wl_list_for_each(surface_output, &cmpnt->output_list, link) {
# 2701|-> 		if (surface_output->output == output) {
# 2702|   			wl_list_remove(&surface_output->link);
# 2703|   			free(surface_output);

Error: CPPCHECK_WARNING (CWE-457): [#def50]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2722: error[uninitvar]: Uninitialized variable: cursor_output->output
# 2720|   		struct cursor_output *cursor_output;
# 2721|   		wl_list_for_each(cursor_output, &seat->cursor_outputs, link) {
# 2722|-> 			if (cursor_output->output == output) {
# 2723|   				wl_list_remove(&cursor_output->link);
# 2724|   				free(cursor_output);

Error: CPPCHECK_WARNING (CWE-457): [#def51]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2743: error[uninitvar]: Uninitialized variable: output->id
# 2741|   
# 2742|   	wl_list_for_each(output, &plugin_gtk->output_list, link) {
# 2743|-> 		if (output->id == name) {
# 2744|   			output_removed(plugin_gtk, output);
# 2745|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2796:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 152)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2784:1: enter_function: entry to ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2795:22: call_function: inlined call to ‘zalloc’ from ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2796:9: throw: if ‘libdecor_plugin_init’ throws an exception...
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2796:9: danger: ‘calloc(1, 152)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 2794|   
# 2795|   	plugin_gtk = zalloc(sizeof *plugin_gtk);
# 2796|-> 	libdecor_plugin_init(&plugin_gtk->plugin,
# 2797|   			     context,
# 2798|   			     &gtk_plugin_iface);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def53]
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2799:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 152)’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2784:1: enter_function: entry to ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2795:22: call_function: inlined call to ‘zalloc’ from ‘libdecor_plugin_new’
libdecor-0.2.5/src/plugins/gtk/libdecor-gtk.c:2799:9: danger: ‘calloc(1, 152)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
# 2797|   			     context,
# 2798|   			     &gtk_plugin_iface);
# 2799|-> 	plugin_gtk->context = context;
# 2800|   
# 2801|   	wl_list_init(&plugin_gtk->visible_frame_list);

Scan Properties

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