bluez-5.85-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
bluez-5.85/attrib/gattrib.c:199:24: warning[-Wanalyzer-malloc-leak]: leak of ‘construct_full_pdu(opcode,  pdu,  length)’
bluez-5.85/attrib/gattrib.c:212:13: enter_function: entry to ‘attrib_callback_result’
bluez-5.85/attrib/gattrib.c:222:15: call_function: calling ‘construct_full_pdu’ from ‘attrib_callback_result’
bluez-5.85/attrib/gattrib.c:222:15: return_function: returning to ‘attrib_callback_result’ from ‘construct_full_pdu’
bluez-5.85/attrib/gattrib.c:223:12: branch_false: following ‘false’ branch...
bluez-5.85/attrib/gattrib.c:226:12: branch_false: ...to here
bluez-5.85/attrib/gattrib.c:234:12: branch_true: following ‘true’ branch...
bluez-5.85/attrib/gattrib.c:235:17: branch_true: ...to here
bluez-5.85/attrib/gattrib.c:235:17: throw: if the called function throws an exception...
bluez-5.85/attrib/gattrib.c:199:24: danger: ‘construct_full_pdu(opcode,  pdu,  length)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  197|   								uint16_t length)
#  198|   {
#  199|-> 	uint8_t *buf = malloc0(length + 1);
#  200|   
#  201|   	if (!buf)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def2]
bluez-5.85/attrib/gattrib.c:207:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pdu’
bluez-5.85/attrib/gattrib.c:348:13: enter_function: entry to ‘client_notify_cb’
bluez-5.85/attrib/gattrib.c:355:12: branch_false: following ‘false’ branch (when ‘length == 0’)...
bluez-5.85/attrib/gattrib.c:358:9: branch_false: ...to here
bluez-5.85/attrib/gattrib.c:358:9: call_function: calling ‘attrib_callback_notify’ from ‘client_notify_cb’
#  205|   
#  206|   	if (pdu && length)
#  207|-> 		memcpy(buf + 1, pdu, length);
#  208|   
#  209|   	return buf;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
bluez-5.85/btio/btio.c:255:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘g_io_channel_unix_get_fd(io)’
#  253|   	srv_sock = g_io_channel_unix_get_fd(io);
#  254|   
#  255|-> 	cli_sock = accept(srv_sock, NULL, NULL);
#  256|   	if (cli_sock < 0) {
#  257|   		if (errno == EBADFD)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
bluez-5.85/btio/btio.c:262:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’
bluez-5.85/btio/btio.c:256:12: branch_false: following ‘false’ branch...
bluez-5.85/btio/btio.c:262:18: branch_false: ...to here
bluez-5.85/btio/btio.c:262:18: danger: ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’ leaks here
#  260|   	}
#  261|   
#  262|-> 	cli_io = g_io_channel_unix_new(cli_sock);
#  263|   
#  264|   	g_io_channel_set_close_on_unref(cli_io, TRUE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
bluez-5.85/btio/btio.c:346:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
bluez-5.85/btio/btio.c:1979:20: enter_function: entry to ‘create_io’
bluez-5.85/btio/btio.c:1987:24: acquire_resource: socket created here
bluez-5.85/btio/btio.c:1988:20: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/btio/btio.c:1992:21: branch_false: ...to here
bluez-5.85/btio/btio.c:1992:21: call_function: calling ‘l2cap_bind’ from ‘create_io’
#  344|   	if (bind(sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  345|   		int error = -errno;
#  346|-> 		ERROR_FAILED(err, "l2cap_bind", errno);
#  347|   		return error;
#  348|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
bluez-5.85/btio/btio.c:462:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
bluez-5.85/btio/btio.c:1979:20: enter_function: entry to ‘create_io’
bluez-5.85/btio/btio.c:2002:24: acquire_resource: stream socket created here
bluez-5.85/btio/btio.c:2003:20: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/btio/btio.c:2007:21: branch_false: ...to here
bluez-5.85/btio/btio.c:2007:21: call_function: calling ‘rfcomm_bind’ from ‘create_io’
bluez-5.85/btio/btio.c:2007:21: return_function: returning to ‘create_io’ from ‘rfcomm_bind’
bluez-5.85/btio/btio.c:2007:20: branch_false: following ‘false’ branch...
bluez-5.85/btio/btio.c:2010:22: branch_false: ...to here
bluez-5.85/btio/btio.c:2010:22: call_function: calling ‘rfcomm_set’ from ‘create_io’
#  460|   
#  461|   	if (level < BT_SECURITY_LOW || level > BT_SECURITY_FIPS) {
#  462|-> 		g_set_error(err, BT_IO_ERROR, EINVAL,
#  463|   				"Valid security level range is %d-%d",
#  464|   				BT_SECURITY_LOW, BT_SECURITY_HIGH);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
bluez-5.85/btio/btio.c:742:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
bluez-5.85/btio/btio.c:1979:20: enter_function: entry to ‘create_io’
bluez-5.85/btio/btio.c:2002:24: acquire_resource: stream socket created here
bluez-5.85/btio/btio.c:2003:20: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/btio/btio.c:2007:21: branch_false: ...to here
bluez-5.85/btio/btio.c:2007:21: call_function: calling ‘rfcomm_bind’ from ‘create_io’
#  740|   	if (bind(sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  741|   		int error = -errno;
#  742|-> 		ERROR_FAILED(err, "rfcomm_bind", errno);
#  743|   		return error;
#  744|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
bluez-5.85/btio/btio.c:789:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
bluez-5.85/btio/btio.c:1979:20: enter_function: entry to ‘create_io’
bluez-5.85/btio/btio.c:2014:24: acquire_resource: socket created here
bluez-5.85/btio/btio.c:2015:20: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/btio/btio.c:2019:36: branch_false: ...to here
bluez-5.85/btio/btio.c:2019:21: call_function: calling ‘sco_bind’ from ‘create_io’
#  787|   	if (bind(sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  788|   		int error = -errno;
#  789|-> 		ERROR_FAILED(err, "sco_bind", errno);
#  790|   		return error;
#  791|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
bluez-5.85/btio/btio.c:838:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
bluez-5.85/btio/btio.c:1979:20: enter_function: entry to ‘create_io’
bluez-5.85/btio/btio.c:2025:24: acquire_resource: socket created here
bluez-5.85/btio/btio.c:2026:20: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/btio/btio.c:2033:52: branch_false: ...to here
bluez-5.85/btio/btio.c:2031:21: call_function: calling ‘iso_bind’ from ‘create_io’
#  836|   
#  837|   	ret = -errno;
#  838|-> 	ERROR_FAILED(err, "iso_bind", errno);
#  839|   
#  840|   done:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
bluez-5.85/btio/btio.c:838:9: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/btio/btio.c:1979:20: enter_function: entry to ‘create_io’
bluez-5.85/btio/btio.c:2026:20: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/btio/btio.c:2033:52: branch_false: ...to here
bluez-5.85/btio/btio.c:2031:21: call_function: calling ‘iso_bind’ from ‘create_io’
#  836|   
#  837|   	ret = -errno;
#  838|-> 	ERROR_FAILED(err, "iso_bind", errno);
#  839|   
#  840|   done:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def11]
bluez-5.85/btio/btio.c:960:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/btio/btio.c:2130:13: enter_function: entry to ‘bt_io_listen’
bluez-5.85/btio/btio.c:2140:9: acquire_resource: ‘va_start’ called here
bluez-5.85/btio/btio.c:2141:15: call_function: calling ‘parse_set_opts’ from ‘bt_io_listen’
#  958|   		case BT_IO_OPT_SOURCE:
#  959|   			str = va_arg(args, const char *);
#  960|-> 			str2ba(str, &opts->src);
#  961|   			break;
#  962|   		case BT_IO_OPT_SOURCE_BDADDR:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def12]
bluez-5.85/btio/btio.c:969:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/btio/btio.c:2130:13: enter_function: entry to ‘bt_io_listen’
bluez-5.85/btio/btio.c:2140:9: acquire_resource: ‘va_start’ called here
bluez-5.85/btio/btio.c:2141:15: call_function: calling ‘parse_set_opts’ from ‘bt_io_listen’
#  967|   			break;
#  968|   		case BT_IO_OPT_DEST:
#  969|-> 			str2ba(va_arg(args, const char *), &opts->dst);
#  970|   			break;
#  971|   		case BT_IO_OPT_DEST_BDADDR:

Error: GCC_ANALYZER_WARNING (CWE-404): [#def13]
bluez-5.85/btio/btio.c:1056:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/btio/btio.c:2130:13: enter_function: entry to ‘bt_io_listen’
bluez-5.85/btio/btio.c:2140:9: acquire_resource: ‘va_start’ called here
bluez-5.85/btio/btio.c:2141:15: call_function: calling ‘parse_set_opts’ from ‘bt_io_listen’
# 1054|   		case BT_IO_OPT_PHY:
# 1055|   		default:
# 1056|-> 			g_set_error(err, BT_IO_ERROR, EINVAL,
# 1057|   					"Unknown option %d", opt);
# 1058|   			return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def14]
bluez-5.85/btio/btio.c:1870:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/btio/btio.c:1849:10: enter_function: entry to ‘bt_io_bcast_accept’
bluez-5.85/btio/btio.c:1861:9: acquire_resource: ‘va_start’ called here
bluez-5.85/btio/btio.c:1863:16: branch_true: following ‘true’ branch (when ‘opt != 0’)...
bluez-5.85/btio/btio.c:1864:20: branch_true: ...to here
bluez-5.85/btio/btio.c:1864:20: branch_false: following ‘false’ branch (when ‘opt != 29’)...
bluez-5.85/btio/btio.c:1866:27: branch_false: ...to here
bluez-5.85/btio/btio.c:1866:27: branch_false: following ‘false’ branch (when ‘opt != 30’)...
bluez-5.85/btio/btio.c:1870:25: call_function: inlined call to ‘bt_io_error_quark’ from ‘bt_io_bcast_accept’
bluez-5.85/btio/btio.c:1870:25: throw: if ‘g_set_error’ throws an exception...
bluez-5.85/btio/btio.c:1870:25: danger: missing call to ‘va_end’ to match ‘va_start’ at [(2)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/1)
# 1868|   					bc_num_bis);
# 1869|   		} else {
# 1870|-> 			g_set_error(err, BT_IO_ERROR, EINVAL,
# 1871|   					"Invalid option %d", opt);
# 1872|   			break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
bluez-5.85/btio/btio.c:1902:25: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/btio/btio.c:1863:16: branch_true: following ‘true’ branch (when ‘opt != 0’)...
bluez-5.85/btio/btio.c:1864:20: branch_true: ...to here
bluez-5.85/btio/btio.c:1880:12: branch_false: following ‘false’ branch...
bluez-5.85/btio/btio.c:1883:16: branch_false: ...to here
bluez-5.85/btio/btio.c:1885:12: branch_true: following ‘true’ branch (when ‘bc_num_bis != 0’)...
bluez-5.85/btio/btio.c:1886:24: branch_true: ...to here
bluez-5.85/btio/btio.c:1886:24: acquire_memory: allocated here
bluez-5.85/btio/btio.c:1888:20: branch_false: following ‘false’ branch (when ‘addr’ is non-NULL)...
bluez-5.85/btio/btio.c:1888:20: branch_false: ...to here
bluez-5.85/btio/btio.c:1900:20: branch_true: following ‘true’ branch...
bluez-5.85/btio/btio.c:1902:25: branch_true: ...to here
bluez-5.85/btio/btio.c:1902:25: throw: if ‘g_set_error’ throws an exception...
bluez-5.85/btio/btio.c:1902:25: danger: ‘addr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
# 1900|   		if (bind(sock, (struct sockaddr *)addr,
# 1901|   			sizeof(*addr) + sizeof(*addr->iso_bc)) < 0) {
# 1902|-> 			ERROR_FAILED(err, "bind", errno);
# 1903|   		}
# 1904|   

Error: GCC_ANALYZER_WARNING: [#def16]
bluez-5.85/btio/btio.c:1911:13: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘g_io_channel_unix_get_fd(io)’
bluez-5.85/btio/btio.c:1863:16: branch_true: following ‘true’ branch (when ‘opt != 0’)...
bluez-5.85/btio/btio.c:1864:20: branch_true: ...to here
bluez-5.85/btio/btio.c:1880:12: branch_false: following ‘false’ branch...
bluez-5.85/btio/btio.c:1883:16: branch_false: ...to here
bluez-5.85/btio/btio.c:1885:12: branch_true: following ‘true’ branch (when ‘bc_num_bis != 0’)...
bluez-5.85/btio/btio.c:1886:24: branch_true: ...to here
bluez-5.85/btio/btio.c:1888:20: branch_false: following ‘false’ branch (when ‘addr’ is non-NULL)...
bluez-5.85/btio/btio.c:1888:20: branch_false: ...to here
bluez-5.85/btio/btio.c:1900:21: acquire_resource: socket created here
bluez-5.85/btio/btio.c:1900:20: branch_true: following ‘true’ branch...
bluez-5.85/btio/btio.c:1902:25: branch_true: ...to here
bluez-5.85/btio/btio.c:1907:20: branch_false: following ‘false’ branch...
bluez-5.85/btio/btio.c:1911:13: branch_false: ...to here
bluez-5.85/btio/btio.c:1911:13: danger: ‘g_io_channel_unix_get_fd(io)’ could be invalid
# 1909|   	}
# 1910|   
# 1911|-> 	if (read(sock, &c, 1) < 0) {
# 1912|   		ERROR_FAILED(err, "read", errno);
# 1913|   		return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def17]
bluez-5.85/btio/btio.c:2048:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
bluez-5.85/btio/btio.c:1979:20: enter_function: entry to ‘create_io’
bluez-5.85/btio/btio.c:2014:24: acquire_resource: socket created here
bluez-5.85/btio/btio.c:2015:20: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/btio/btio.c:2019:36: branch_false: ...to here
bluez-5.85/btio/btio.c:2019:21: call_function: calling ‘sco_bind’ from ‘create_io’
bluez-5.85/btio/btio.c:2019:21: return_function: returning to ‘create_io’ from ‘sco_bind’
bluez-5.85/btio/btio.c:2019:20: branch_false: following ‘false’ branch...
bluez-5.85/btio/btio.c:2021:22: branch_false: ...to here
bluez-5.85/btio/btio.c:2021:22: call_function: calling ‘sco_set’ from ‘create_io’
bluez-5.85/btio/btio.c:2021:22: return_function: returning to ‘create_io’ from ‘sco_set’
bluez-5.85/btio/btio.c:2021:20: branch_false: following ‘false’ branch...
bluez-5.85/btio/btio.c:2048:14: branch_false: ...to here
bluez-5.85/btio/btio.c:2048:14: throw: if ‘g_io_channel_unix_new’ throws an exception...
bluez-5.85/btio/btio.c:2048:14: danger: ‘sock’ leaks here
# 2046|   	}
# 2047|   
# 2048|-> 	io = g_io_channel_unix_new(sock);
# 2049|   
# 2050|   	g_io_channel_set_close_on_unref(io, TRUE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def18]
bluez-5.85/btio/btio.c:2056:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
bluez-5.85/btio/btio.c:1979:20: enter_function: entry to ‘create_io’
bluez-5.85/btio/btio.c:2002:24: acquire_resource: stream socket created here
bluez-5.85/btio/btio.c:2003:20: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/btio/btio.c:2007:21: branch_false: ...to here
bluez-5.85/btio/btio.c:2007:21: call_function: calling ‘rfcomm_bind’ from ‘create_io’
bluez-5.85/btio/btio.c:2007:21: return_function: returning to ‘create_io’ from ‘rfcomm_bind’
bluez-5.85/btio/btio.c:2007:20: branch_true: following ‘true’ branch...
bluez-5.85/btio/btio.c:2009:25: branch_true: ...to here
bluez-5.85/btio/btio.c:2056:9: throw: if ‘close’ throws an exception...
bluez-5.85/btio/btio.c:2056:9: danger: ‘sock’ leaks here
# 2054|   
# 2055|   failed:
# 2056|-> 	close(sock);
# 2057|   
# 2058|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
bluez-5.85/btio/btio.c:2173:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
bluez-5.85/btio/btio.c:1979:20: enter_function: entry to ‘create_io’
bluez-5.85/btio/btio.c:2014:24: acquire_resource: socket created here
bluez-5.85/btio/btio.c:2015:20: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/btio/btio.c:2019:36: branch_false: ...to here
bluez-5.85/btio/btio.c:2019:21: call_function: calling ‘sco_bind’ from ‘create_io’
# 2171|   GQuark bt_io_error_quark(void)
# 2172|   {
# 2173|-> 	return g_quark_from_static_string("bt-io-error-quark");
# 2174|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
bluez-5.85/btio/btio.c:2173:16: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/btio/btio.c:1979:20: enter_function: entry to ‘create_io’
bluez-5.85/btio/btio.c:2026:20: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/btio/btio.c:2033:52: branch_false: ...to here
bluez-5.85/btio/btio.c:2031:21: call_function: calling ‘iso_bind’ from ‘create_io’
# 2171|   GQuark bt_io_error_quark(void)
# 2172|   {
# 2173|-> 	return g_quark_from_static_string("bt-io-error-quark");
# 2174|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def21]
bluez-5.85/btio/btio.c:2173:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/btio/btio.c:1849:10: enter_function: entry to ‘bt_io_bcast_accept’
bluez-5.85/btio/btio.c:1861:9: acquire_resource: ‘va_start’ called here
bluez-5.85/btio/btio.c:1863:16: branch_true: following ‘true’ branch (when ‘opt != 0’)...
bluez-5.85/btio/btio.c:1864:20: branch_true: ...to here
bluez-5.85/btio/btio.c:1864:20: branch_false: following ‘false’ branch (when ‘opt != 29’)...
bluez-5.85/btio/btio.c:1866:27: branch_false: ...to here
bluez-5.85/btio/btio.c:1866:27: branch_false: following ‘false’ branch (when ‘opt != 30’)...
bluez-5.85/btio/btio.c:1870:25: call_function: inlined call to ‘bt_io_error_quark’ from ‘bt_io_bcast_accept’
# 2171|   GQuark bt_io_error_quark(void)
# 2172|   {
# 2173|-> 	return g_quark_from_static_string("bt-io-error-quark");
# 2174|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def22]
bluez-5.85/client/advertising.c:709:14: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
bluez-5.85/client/advertising.c:699:6: enter_function: entry to ‘ad_register’
bluez-5.85/client/advertising.c:701:12: branch_false: following ‘false’ branch...
bluez-5.85/client/advertising.c:706:9: branch_false: ...to here
bluez-5.85/client/advertising.c:707:9: release_memory: using NULL here
bluez-5.85/client/advertising.c:709:14: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#  707|   	ad.type = g_strdup(type);
#  708|   
#  709|-> 	if (!strcasecmp(ad.type, "Broadcast"))
#  710|   		ad.discoverable = false;
#  711|   

Error: CPPCHECK_WARNING (CWE-457): [#def23]
bluez-5.85/client/assistant.c:185: warning[uninitvar]: Uninitialized variable: value
#  183|   	*val_len = i;
#  184|   
#  185|-> 	return util_memdup(value, i);
#  186|   }
#  187|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def24]
bluez-5.85/client/display.c:54:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘saved_line’
bluez-5.85/client/display.c:40:12: branch_false: following ‘false’ branch...
bluez-5.85/client/display.c:48:9: branch_false: ...to here
bluez-5.85/client/display.c:52:12: branch_true: following ‘true’ branch...
bluez-5.85/client/display.c:53:17: branch_true: ...to here
bluez-5.85/client/display.c:54:17: danger: use of uninitialized value ‘saved_line’ here
#   52|   	if (save_input) {
#   53|   		rl_restore_prompt();
#   54|-> 		rl_replace_line(saved_line, 0);
#   55|   		rl_point = saved_point;
#   56|   		rl_forced_update_display();

Error: CPPCHECK_WARNING (CWE-457): [#def25]
bluez-5.85/client/gatt.c:732: warning[uninitvar]: Uninitialized variable: value
#  730|   	*val_len = i;
#  731|   
#  732|-> 	return util_memdup(value, i);
#  733|   }
#  734|   

Error: CPPCHECK_WARNING (CWE-457): [#def26]
bluez-5.85/client/hci.c:102: warning[uninitvar]: Uninitialized variable: value
#  100|   	*val_len = i;
#  101|   
#  102|-> 	return util_memdup(value, i);
#  103|   }
#  104|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
bluez-5.85/client/main.c:2358:13: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
bluez-5.85/client/main.c:2342:13: enter_function: entry to ‘cmd_bearer’
bluez-5.85/client/main.c:2347:17: call_function: calling ‘find_device’ from ‘cmd_bearer’
bluez-5.85/client/main.c:2347:17: return_function: returning to ‘cmd_bearer’ from ‘find_device’
bluez-5.85/client/main.c:2348:12: branch_false: following ‘false’ branch...
bluez-5.85/client/main.c:2351:12: branch_false: ...to here
bluez-5.85/client/main.c:2351:12: branch_false: following ‘false’ branch (when ‘argc > 2’)...
bluez-5.85/client/main.c:2356:15: branch_false: ...to here
bluez-5.85/client/main.c:2356:15: acquire_memory: allocated here
bluez-5.85/client/main.c:2358:13: throw: if ‘g_dbus_proxy_set_property_basic’ throws an exception...
bluez-5.85/client/main.c:2358:13: danger: ‘str’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 2356|   	str = strdup(argv[2]);
# 2357|   
# 2358|-> 	if (g_dbus_proxy_set_property_basic(proxy, "PreferredBearer",
# 2359|   					DBUS_TYPE_STRING, &str,
# 2360|   					generic_callback, str, free))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
bluez-5.85/client/mgmt.c:600:16: warning[-Wanalyzer-malloc-leak]: leak of ‘eir_get_name(&*(const struct mgmt_ev_device_found *)param.eir, ((struct <anonymous> *)param)[6].__v)’
bluez-5.85/client/mgmt.c:649:13: enter_function: entry to ‘device_found’
bluez-5.85/client/mgmt.c:657:12: branch_false: following ‘false’ branch (when ‘len > 13’)...
bluez-5.85/client/mgmt.c:662:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:665:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:671:13: branch_false: ...to here
bluez-5.85/client/mgmt.c:671:12: branch_true: following ‘true’ branch...
bluez-5.85/client/mgmt.c:674:17: branch_true: ...to here
bluez-5.85/client/mgmt.c:683:24: call_function: calling ‘eir_get_name’ from ‘device_found’
bluez-5.85/client/mgmt.c:683:24: return_function: returning to ‘device_found’ from ‘eir_get_name’
bluez-5.85/client/mgmt.c:684:20: branch_true: following ‘true’ branch...
bluez-5.85/client/mgmt.c:685:25: branch_true: ...to here
bluez-5.85/client/mgmt.c:685:25: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/mgmt.c:600:16: danger: ‘eir_get_name(&*(const struct mgmt_ev_device_found *)param.eir, ((struct <anonymous> *)param)[6].__v)’ leaks here; was allocated at [(18)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/17)
#  598|   		return NULL;
#  599|   
#  600|-> 	while (parsed < eir_len - 1) {
#  601|   		uint8_t field_len = eir[0];
#  602|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
bluez-5.85/client/mgmt.c:2697:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
bluez-5.85/client/mgmt.c:2681:12: branch_false: following ‘false’ branch (when ‘argc <= 2’)...
bluez-5.85/client/mgmt.c:2690:22: branch_false: ...to here
bluez-5.85/client/mgmt.c:2690:22: acquire_resource: opened here
bluez-5.85/client/mgmt.c:2691:20: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:2696:21: branch_false: ...to here
bluez-5.85/client/mgmt.c:2696:20: branch_true: following ‘true’ branch...
bluez-5.85/client/mgmt.c:2697:25: branch_true: ...to here
bluez-5.85/client/mgmt.c:2697:25: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/mgmt.c:2697:25: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 2695|   
# 2696|   		if (read(fd, cp.irk, sizeof(cp.irk)) != sizeof(cp.irk)) {
# 2697|-> 			error("Reading from urandom failed");
# 2698|   			close(fd);
# 2699|   			return bt_shell_noninteractive_quit(EXIT_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
bluez-5.85/client/mgmt.c:2698:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
bluez-5.85/client/mgmt.c:2681:12: branch_false: following ‘false’ branch (when ‘argc <= 2’)...
bluez-5.85/client/mgmt.c:2690:22: branch_false: ...to here
bluez-5.85/client/mgmt.c:2690:22: acquire_resource: opened here
bluez-5.85/client/mgmt.c:2691:20: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:2696:21: branch_false: ...to here
bluez-5.85/client/mgmt.c:2696:20: branch_true: following ‘true’ branch...
bluez-5.85/client/mgmt.c:2697:25: branch_true: ...to here
bluez-5.85/client/mgmt.c:2698:25: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 2696|   		if (read(fd, cp.irk, sizeof(cp.irk)) != sizeof(cp.irk)) {
# 2697|   			error("Reading from urandom failed");
# 2698|-> 			close(fd);
# 2699|   			return bt_shell_noninteractive_quit(EXIT_FAILURE);
# 2700|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
bluez-5.85/client/mgmt.c:2702:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
bluez-5.85/client/mgmt.c:2681:12: branch_false: following ‘false’ branch (when ‘argc <= 2’)...
bluez-5.85/client/mgmt.c:2690:22: branch_false: ...to here
bluez-5.85/client/mgmt.c:2690:22: acquire_resource: opened here
bluez-5.85/client/mgmt.c:2691:20: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:2696:21: branch_false: ...to here
bluez-5.85/client/mgmt.c:2696:20: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:2702:17: branch_false: ...to here
bluez-5.85/client/mgmt.c:2702:17: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 2700|   		}
# 2701|   
# 2702|-> 		close(fd);
# 2703|   	}
# 2704|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
bluez-5.85/client/mgmt.c:4972:14: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/client/mgmt.c:4934:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
bluez-5.85/client/mgmt.c:4939:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:4939:12: branch_false: following ‘false’ branch (when ‘uuid_bytes == 0’)...
bluez-5.85/client/mgmt.c:4942:20: branch_false: ...to here
bluez-5.85/client/mgmt.c:4949:14: acquire_memory: allocated here
bluez-5.85/client/mgmt.c:4950:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/client/mgmt.c:4953:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:4960:12: branch_false: following ‘false’ branch (when ‘uuid_bytes == 0’)...
bluez-5.85/client/mgmt.c:4966:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:4966:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:4969:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:4969:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:4972:14: branch_false: ...to here
bluez-5.85/client/mgmt.c:4972:14: throw: if ‘mgmt_send’ throws an exception...
bluez-5.85/client/mgmt.c:4972:14: danger: ‘cp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 4970|   		memcpy(cp->data + uuid_bytes + adv_len, scan_rsp, scan_rsp_len);
# 4971|   
# 4972|-> 	if (!mgmt_send(mgmt, MGMT_OP_ADD_ADVERTISING, index, cp_len, cp,
# 4973|   						add_adv_rsp, NULL, NULL)) {
# 4974|   		error("Unable to send \"Add Advertising\" command");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
bluez-5.85/client/mgmt.c:4974:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/client/mgmt.c:4934:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
bluez-5.85/client/mgmt.c:4939:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:4939:12: branch_false: following ‘false’ branch (when ‘uuid_bytes == 0’)...
bluez-5.85/client/mgmt.c:4942:20: branch_false: ...to here
bluez-5.85/client/mgmt.c:4949:14: acquire_memory: allocated here
bluez-5.85/client/mgmt.c:4950:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/client/mgmt.c:4953:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:4960:12: branch_false: following ‘false’ branch (when ‘uuid_bytes == 0’)...
bluez-5.85/client/mgmt.c:4966:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:4966:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:4969:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:4969:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:4972:14: branch_false: ...to here
bluez-5.85/client/mgmt.c:4972:12: branch_true: following ‘true’ branch...
bluez-5.85/client/mgmt.c:4974:17: branch_true: ...to here
bluez-5.85/client/mgmt.c:4974:17: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/mgmt.c:4974:17: danger: ‘cp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
# 4972|   	if (!mgmt_send(mgmt, MGMT_OP_ADD_ADVERTISING, index, cp_len, cp,
# 4973|   						add_adv_rsp, NULL, NULL)) {
# 4974|-> 		error("Unable to send \"Add Advertising\" command");
# 4975|   		goto done;
# 4976|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
bluez-5.85/client/mgmt.c:5217:14: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/client/mgmt.c:5190:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
bluez-5.85/client/mgmt.c:5196:13: branch_false: ...to here
bluez-5.85/client/mgmt.c:5196:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:5199:20: branch_false: ...to here
bluez-5.85/client/mgmt.c:5205:14: acquire_memory: allocated here
bluez-5.85/client/mgmt.c:5206:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/client/mgmt.c:5209:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:5217:14: throw: if ‘mgmt_send’ throws an exception...
bluez-5.85/client/mgmt.c:5217:14: danger: ‘cp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
# 5215|   	cp->tx_power = tx_power;
# 5216|   
# 5217|-> 	if (!mgmt_send(mgmt, MGMT_OP_ADD_EXT_ADV_PARAMS, index, sizeof(*cp), cp,
# 5218|   					add_ext_adv_params_rsp, NULL, NULL)) {
# 5219|   		error("Unable to send \"Add Ext Advertising Params\" command");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
bluez-5.85/client/mgmt.c:5219:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/client/mgmt.c:5190:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
bluez-5.85/client/mgmt.c:5196:13: branch_false: ...to here
bluez-5.85/client/mgmt.c:5196:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:5199:20: branch_false: ...to here
bluez-5.85/client/mgmt.c:5205:14: acquire_memory: allocated here
bluez-5.85/client/mgmt.c:5206:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/client/mgmt.c:5209:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:5217:12: branch_true: following ‘true’ branch...
bluez-5.85/client/mgmt.c:5219:17: branch_true: ...to here
bluez-5.85/client/mgmt.c:5219:17: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/mgmt.c:5219:17: danger: ‘cp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
# 5217|   	if (!mgmt_send(mgmt, MGMT_OP_ADD_EXT_ADV_PARAMS, index, sizeof(*cp), cp,
# 5218|   					add_ext_adv_params_rsp, NULL, NULL)) {
# 5219|-> 		error("Unable to send \"Add Ext Advertising Params\" command");
# 5220|   		goto done;
# 5221|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
bluez-5.85/client/mgmt.c:5396:14: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/client/mgmt.c:5361:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
bluez-5.85/client/mgmt.c:5366:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:5366:12: branch_false: following ‘false’ branch (when ‘uuid_bytes == 0’)...
bluez-5.85/client/mgmt.c:5369:20: branch_false: ...to here
bluez-5.85/client/mgmt.c:5376:14: acquire_memory: allocated here
bluez-5.85/client/mgmt.c:5377:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/client/mgmt.c:5380:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:5384:12: branch_false: following ‘false’ branch (when ‘uuid_bytes == 0’)...
bluez-5.85/client/mgmt.c:5390:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:5390:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:5393:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:5393:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:5396:14: branch_false: ...to here
bluez-5.85/client/mgmt.c:5396:14: throw: if ‘mgmt_send’ throws an exception...
bluez-5.85/client/mgmt.c:5396:14: danger: ‘cp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
# 5394|   		memcpy(cp->data + uuid_bytes + adv_len, scan_rsp, scan_rsp_len);
# 5395|   
# 5396|-> 	if (!mgmt_send(mgmt, MGMT_OP_ADD_EXT_ADV_DATA, index, cp_len, cp,
# 5397|   					add_ext_adv_data_rsp, NULL, NULL)) {
# 5398|   		error("Unable to send \"Add Ext Advertising Data\" command");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
bluez-5.85/client/mgmt.c:5398:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/client/mgmt.c:5361:12: branch_false: following ‘false’ branch (when ‘argc == 1’)...
bluez-5.85/client/mgmt.c:5366:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:5366:12: branch_false: following ‘false’ branch (when ‘uuid_bytes == 0’)...
bluez-5.85/client/mgmt.c:5369:20: branch_false: ...to here
bluez-5.85/client/mgmt.c:5376:14: acquire_memory: allocated here
bluez-5.85/client/mgmt.c:5377:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/client/mgmt.c:5380:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:5384:12: branch_false: following ‘false’ branch (when ‘uuid_bytes == 0’)...
bluez-5.85/client/mgmt.c:5390:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:5390:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:5393:12: branch_false: ...to here
bluez-5.85/client/mgmt.c:5393:12: branch_false: following ‘false’ branch...
bluez-5.85/client/mgmt.c:5396:14: branch_false: ...to here
bluez-5.85/client/mgmt.c:5396:12: branch_true: following ‘true’ branch...
bluez-5.85/client/mgmt.c:5398:17: branch_true: ...to here
bluez-5.85/client/mgmt.c:5398:17: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/mgmt.c:5398:17: danger: ‘cp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
# 5396|   	if (!mgmt_send(mgmt, MGMT_OP_ADD_EXT_ADV_DATA, index, cp_len, cp,
# 5397|   					add_ext_adv_data_rsp, NULL, NULL)) {
# 5398|-> 		error("Unable to send \"Add Ext Advertising Data\" command");
# 5399|   		goto done;
# 5400|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
bluez-5.85/client/mgmt.c:5878:14: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/client/mgmt.c:5821:16: branch_false: following ‘false’ branch (when ‘opt == -1’)...
bluez-5.85/client/mgmt.c:5847:14: branch_false: ...to here
bluez-5.85/client/mgmt.c:5852:14: acquire_memory: allocated here
bluez-5.85/client/mgmt.c:5853:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/client/mgmt.c:5859:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:5866:21: branch_false: following ‘false’ branch (when ‘i >= argc’)...
bluez-5.85/client/mgmt.c:5874:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:5878:14: throw: if ‘mgmt_send’ throws an exception...
bluez-5.85/client/mgmt.c:5878:14: danger: ‘cp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 5876|   		index = 0;
# 5877|   
# 5878|-> 	if (!mgmt_send(mgmt, MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI, index,
# 5879|   				cp_len, cp, advmon_add_rsp, NULL, NULL)) {
# 5880|   		error("Unable to send Add Advertising Monitor RSSI command");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
bluez-5.85/client/mgmt.c:5880:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/client/mgmt.c:5821:16: branch_false: following ‘false’ branch (when ‘opt == -1’)...
bluez-5.85/client/mgmt.c:5847:14: branch_false: ...to here
bluez-5.85/client/mgmt.c:5852:14: acquire_memory: allocated here
bluez-5.85/client/mgmt.c:5853:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/client/mgmt.c:5859:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:5866:21: branch_false: following ‘false’ branch (when ‘i >= argc’)...
bluez-5.85/client/mgmt.c:5874:9: branch_false: ...to here
bluez-5.85/client/mgmt.c:5878:12: branch_true: following ‘true’ branch...
bluez-5.85/client/mgmt.c:5880:17: branch_true: ...to here
bluez-5.85/client/mgmt.c:5880:17: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/mgmt.c:5880:17: danger: ‘cp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
# 5878|   	if (!mgmt_send(mgmt, MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI, index,
# 5879|   				cp_len, cp, advmon_add_rsp, NULL, NULL)) {
# 5880|-> 		error("Unable to send Add Advertising Monitor RSSI command");
# 5881|   		success = false;
# 5882|   		goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
bluez-5.85/client/player.c:1113:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
# 1111|   static struct transport *find_transport(GDBusProxy *proxy)
# 1112|   {
# 1113|-> 	return queue_find(ios, match_proxy, proxy);
# 1114|   }
# 1115|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
bluez-5.85/client/player.c:5353:13: warning[-Wanalyzer-malloc-leak]: leak of ‘bcode’
bluez-5.85/client/player.c:5340:12: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5347:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5348:44: branch_true: ...to here
bluez-5.85/client/player.c:5348:44: acquire_memory: allocated here
bluez-5.85/client/player.c:5353:13: throw: if ‘g_dbus_proxy_set_property_dict’ throws an exception...
bluez-5.85/client/player.c:5353:13: danger: ‘bcode’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 5351|   	}
# 5352|   
# 5353|-> 	if (g_dbus_proxy_set_property_dict(args->proxy, "QoS",
# 5354|   				set_bcode_cb, user_data,
# 5355|   				NULL, "BCode", DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
bluez-5.85/client/player.c:5640:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5628:12: enter_function: entry to ‘open_file’
bluez-5.85/client/player.c:5634:12: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5637:22: branch_false: ...to here
bluez-5.85/client/player.c:5637:22: acquire_resource: opened here
bluez-5.85/client/player.c:5639:12: branch_true: following ‘true’ branch (when ‘fd <= 0’)...
 branch_true: ...to here
 call_function: calling ‘open_file’ from ‘open_file’
# 5638|   
# 5639|   	if (fd <= 0)
# 5640|-> 		bt_shell_printf("Can't open file %s: %s\n", filename,
# 5641|   						strerror(errno));
# 5642|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
bluez-5.85/client/player.c:5643:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5643:16: danger: ‘fd’ leaks here; was opened at [(15)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/14)
# 5641|   						strerror(errno));
# 5642|   
# 5643|-> 	return fd;
# 5644|   }
# 5645|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
bluez-5.85/client/player.c:5653:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5869:66: branch_true: ...to here
bluez-5.85/client/player.c:5870:31: call_function: calling ‘transport_send’ from ‘cmd_send_transport’
# 5651|   	if (reset) {
# 5652|   		if (clock_gettime(CLOCK_MONOTONIC, &start) < 0) {
# 5653|-> 			bt_shell_printf("clock_gettime: %s (%d)",
# 5654|   						strerror(errno), errno);
# 5655|   			return -errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
bluez-5.85/client/player.c:5653:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/client/player.c:5675:12: enter_function: entry to ‘transport_send_seq’
bluez-5.85/client/player.c:5683:15: acquire_memory: allocated here
bluez-5.85/client/player.c:5684:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/client/player.c:5684:12: branch_false: ...to here
bluez-5.85/client/player.c:5687:21: branch_true: following ‘true’ branch (when ‘i < num’)...
bluez-5.85/client/player.c:5689:21: branch_true: ...to here
bluez-5.85/client/player.c:5693:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5701:23: branch_false: ...to here
bluez-5.85/client/player.c:5702:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5709:31: branch_false: ...to here
bluez-5.85/client/player.c:5709:17: call_function: calling ‘elapsed_time’ from ‘transport_send_seq’
# 5651|   	if (reset) {
# 5652|   		if (clock_gettime(CLOCK_MONOTONIC, &start) < 0) {
# 5653|-> 			bt_shell_printf("clock_gettime: %s (%d)",
# 5654|   						strerror(errno), errno);
# 5655|   			return -errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
bluez-5.85/client/player.c:5660:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5869:66: branch_true: ...to here
bluez-5.85/client/player.c:5870:31: call_function: calling ‘transport_send’ from ‘cmd_send_transport’
# 5658|   
# 5659|   	if (clock_gettime(CLOCK_MONOTONIC, &curr) < 0) {
# 5660|-> 		bt_shell_printf("clock_gettime: %s (%d)", strerror(errno),
# 5661|   						errno);
# 5662|   		return -errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
bluez-5.85/client/player.c:5660:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/client/player.c:5675:12: enter_function: entry to ‘transport_send_seq’
bluez-5.85/client/player.c:5683:15: acquire_memory: allocated here
bluez-5.85/client/player.c:5684:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/client/player.c:5684:12: branch_false: ...to here
bluez-5.85/client/player.c:5687:21: branch_true: following ‘true’ branch (when ‘i < num’)...
bluez-5.85/client/player.c:5689:21: branch_true: ...to here
bluez-5.85/client/player.c:5693:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5701:23: branch_false: ...to here
bluez-5.85/client/player.c:5702:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5709:31: branch_false: ...to here
bluez-5.85/client/player.c:5709:17: call_function: calling ‘elapsed_time’ from ‘transport_send_seq’
# 5658|   
# 5659|   	if (clock_gettime(CLOCK_MONOTONIC, &curr) < 0) {
# 5660|-> 		bt_shell_printf("clock_gettime: %s (%d)", strerror(errno),
# 5661|   						errno);
# 5662|   		return -errno;

Error: GCC_ANALYZER_WARNING: [#def48]
bluez-5.85/client/player.c:5692:23: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5869:66: branch_true: ...to here
bluez-5.85/client/player.c:5870:31: call_function: calling ‘transport_send’ from ‘cmd_send_transport’
# 5690|   		off_t offset;
# 5691|   
# 5692|-> 		ret = read(fd, buf, transport->mtu[1]);
# 5693|   		if (ret <= 0) {
# 5694|   			if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
bluez-5.85/client/player.c:5695:33: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/client/player.c:5683:15: acquire_memory: allocated here
bluez-5.85/client/player.c:5684:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/client/player.c:5684:12: branch_false: ...to here
bluez-5.85/client/player.c:5687:21: branch_true: following ‘true’ branch (when ‘i < num’)...
bluez-5.85/client/player.c:5689:21: branch_true: ...to here
bluez-5.85/client/player.c:5694:28: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5696:66: branch_true: ...to here
bluez-5.85/client/player.c:5695:33: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/player.c:5695:33: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 5693|   		if (ret <= 0) {
# 5694|   			if (ret < 0)
# 5695|-> 				bt_shell_printf("read failed: %s (%d)",
# 5696|   						strerror(errno), errno);
# 5697|   			free(buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
bluez-5.85/client/player.c:5701:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5869:66: branch_true: ...to here
bluez-5.85/client/player.c:5870:31: call_function: calling ‘transport_send’ from ‘cmd_send_transport’
# 5699|   		}
# 5700|   
# 5701|-> 		ret = send(transport->sk, buf, ret, 0);
# 5702|   		if (ret <= 0) {
# 5703|   			bt_shell_printf("send failed: %s (%d)",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
bluez-5.85/client/player.c:5701:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/client/player.c:5683:15: acquire_memory: allocated here
bluez-5.85/client/player.c:5684:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/client/player.c:5684:12: branch_false: ...to here
bluez-5.85/client/player.c:5687:21: branch_true: following ‘true’ branch (when ‘i < num’)...
bluez-5.85/client/player.c:5689:21: branch_true: ...to here
bluez-5.85/client/player.c:5693:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5701:23: branch_false: ...to here
bluez-5.85/client/player.c:5701:23: throw: if ‘send’ throws an exception...
bluez-5.85/client/player.c:5701:23: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 5699|   		}
# 5700|   
# 5701|-> 		ret = send(transport->sk, buf, ret, 0);
# 5702|   		if (ret <= 0) {
# 5703|   			bt_shell_printf("send failed: %s (%d)",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
bluez-5.85/client/player.c:5703:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/client/player.c:5683:15: acquire_memory: allocated here
bluez-5.85/client/player.c:5684:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/client/player.c:5684:12: branch_false: ...to here
bluez-5.85/client/player.c:5687:21: branch_true: following ‘true’ branch (when ‘i < num’)...
bluez-5.85/client/player.c:5689:21: branch_true: ...to here
bluez-5.85/client/player.c:5693:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5701:23: branch_false: ...to here
bluez-5.85/client/player.c:5703:25: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/player.c:5703:25: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 5701|   		ret = send(transport->sk, buf, ret, 0);
# 5702|   		if (ret <= 0) {
# 5703|-> 			bt_shell_printf("send failed: %s (%d)",
# 5704|   							strerror(errno), errno);
# 5705|   			free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
bluez-5.85/client/player.c:5712:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/client/player.c:5683:15: acquire_memory: allocated here
bluez-5.85/client/player.c:5684:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/client/player.c:5684:12: branch_false: ...to here
bluez-5.85/client/player.c:5687:21: branch_true: following ‘true’ branch (when ‘i < num’)...
bluez-5.85/client/player.c:5689:21: branch_true: ...to here
bluez-5.85/client/player.c:5693:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5701:23: branch_false: ...to here
bluez-5.85/client/player.c:5702:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5709:31: branch_false: ...to here
bluez-5.85/client/player.c:5712:25: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/player.c:5712:25: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 5710|   
# 5711|   		if (!transport->seq && fstat(fd, &transport->stat) < 0) {
# 5712|-> 			bt_shell_printf("fstat failed: %s (%d)",
# 5713|   							strerror(errno), errno);
# 5714|   			free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
bluez-5.85/client/player.c:5720:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/client/player.c:5683:15: acquire_memory: allocated here
bluez-5.85/client/player.c:5684:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/client/player.c:5684:12: branch_false: ...to here
bluez-5.85/client/player.c:5687:21: branch_true: following ‘true’ branch (when ‘i < num’)...
bluez-5.85/client/player.c:5689:21: branch_true: ...to here
bluez-5.85/client/player.c:5693:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5701:23: branch_false: ...to here
bluez-5.85/client/player.c:5702:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5709:31: branch_false: ...to here
bluez-5.85/client/player.c:5720:17: throw: if ‘bt_shell_echo’ throws an exception...
bluez-5.85/client/player.c:5720:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 5718|   		offset = lseek(fd, 0, SEEK_CUR);
# 5719|   
# 5720|-> 		bt_shell_echo("[seq %d %d.%03ds] send: %lld/%lld bytes",
# 5721|   				transport->seq, secs,
# 5722|   				(nsecs + 500000) / 1000000,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
bluez-5.85/client/player.c:5836:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5836:25: throw: if ‘g_dbus_proxy_lookup’ throws an exception...
bluez-5.85/client/player.c:5836:25: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/16)
# 5834|   
# 5835|   	for (i = 1; i < argc; i++) {
# 5836|-> 		proxy = g_dbus_proxy_lookup(transports, NULL, argv[i],
# 5837|   					BLUEZ_MEDIA_TRANSPORT_INTERFACE);
# 5838|   		if (!proxy) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
bluez-5.85/client/player.c:5839:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5839:25: branch_true: ...to here
bluez-5.85/client/player.c:5839:25: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/player.c:5839:25: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/16)
# 5837|   					BLUEZ_MEDIA_TRANSPORT_INTERFACE);
# 5838|   		if (!proxy) {
# 5839|-> 			bt_shell_printf("Transport %s not found\n", argv[i]);
# 5840|   			return bt_shell_noninteractive_quit(EXIT_FAILURE);
# 5841|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
bluez-5.85/client/player.c:5840:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5839:25: branch_true: ...to here
bluez-5.85/client/player.c:5840:32: throw: if ‘bt_shell_noninteractive_quit’ throws an exception...
bluez-5.85/client/player.c:5840:32: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/16)
# 5838|   		if (!proxy) {
# 5839|   			bt_shell_printf("Transport %s not found\n", argv[i]);
# 5840|-> 			return bt_shell_noninteractive_quit(EXIT_FAILURE);
# 5841|   		}
# 5842|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
bluez-5.85/client/player.c:5845:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5845:25: branch_true: ...to here
bluez-5.85/client/player.c:5845:25: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/player.c:5845:25: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/16)
# 5843|   		transport = find_transport(proxy);
# 5844|   		if (!transport) {
# 5845|-> 			bt_shell_printf("Transport %s not acquired\n", argv[i]);
# 5846|   			return bt_shell_noninteractive_quit(EXIT_FAILURE);
# 5847|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
bluez-5.85/client/player.c:5846:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5845:25: branch_true: ...to here
bluez-5.85/client/player.c:5846:32: throw: if ‘bt_shell_noninteractive_quit’ throws an exception...
bluez-5.85/client/player.c:5846:32: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/16)
# 5844|   		if (!transport) {
# 5845|   			bt_shell_printf("Transport %s not acquired\n", argv[i]);
# 5846|-> 			return bt_shell_noninteractive_quit(EXIT_FAILURE);
# 5847|   		}
# 5848|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
bluez-5.85/client/player.c:5850:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5850:25: branch_true: ...to here
bluez-5.85/client/player.c:5850:25: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/player.c:5850:25: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/16)
# 5848|   
# 5849|   		if (transport->sk < 0) {
# 5850|-> 			bt_shell_printf("No Transport Socked found\n");
# 5851|   			return bt_shell_noninteractive_quit(EXIT_FAILURE);
# 5852|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
bluez-5.85/client/player.c:5851:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5850:25: branch_true: ...to here
bluez-5.85/client/player.c:5851:32: throw: if ‘bt_shell_noninteractive_quit’ throws an exception...
bluez-5.85/client/player.c:5851:32: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/16)
# 5849|   		if (transport->sk < 0) {
# 5850|   			bt_shell_printf("No Transport Socked found\n");
# 5851|-> 			return bt_shell_noninteractive_quit(EXIT_FAILURE);
# 5852|   		}
# 5853|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
bluez-5.85/client/player.c:5861:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5861:17: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/player.c:5861:17: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/16)
# 5859|   		}
# 5860|   
# 5861|-> 		bt_shell_printf("Sending ...\n");
# 5862|   
# 5863|   		/* Read QoS if available */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def63]
bluez-5.85/client/player.c:5866:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename,  flags)’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
# 5864|   		memset(&qos, 0, sizeof(qos));
# 5865|   		len = sizeof(qos);
# 5866|-> 		if (getsockopt(transport->sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos,
# 5867|   							&len) < 0) {
# 5868|   			bt_shell_printf("Unable to getsockopt(BT_ISO_QOS): %s",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
bluez-5.85/client/player.c:5868:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5869:66: branch_true: ...to here
bluez-5.85/client/player.c:5868:25: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/player.c:5868:25: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/16)
# 5866|   		if (getsockopt(transport->sk, SOL_BLUETOOTH, BT_ISO_QOS, &qos,
# 5867|   							&len) < 0) {
# 5868|-> 			bt_shell_printf("Unable to getsockopt(BT_ISO_QOS): %s",
# 5869|   							strerror(errno));
# 5870|   			err = transport_send(transport, fd, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
bluez-5.85/client/player.c:5888:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_true: following ‘true’ branch (when ‘err < 0’)...
bluez-5.85/client/player.c:5888:25: branch_true: ...to here
bluez-5.85/client/player.c:5888:25: throw: if ‘bt_shell_printf’ throws an exception...
bluez-5.85/client/player.c:5888:25: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/16)
# 5886|   
# 5887|   		if (err < 0) {
# 5888|-> 			bt_shell_printf("Unable to send: %s (%d)\n",
# 5889|   						strerror(-err), -err);
# 5890|   			close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def66]
bluez-5.85/client/player.c:5890:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5854:20: branch_true: following ‘true’ branch...
bluez-5.85/client/player.c:5855:45: branch_true: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_true: following ‘true’ branch (when ‘err < 0’)...
bluez-5.85/client/player.c:5888:25: branch_true: ...to here
bluez-5.85/client/player.c:5890:25: throw: if ‘close’ throws an exception...
bluez-5.85/client/player.c:5890:25: danger: ‘fd’ leaks here; was opened at [(17)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/16)
# 5888|   			bt_shell_printf("Unable to send: %s (%d)\n",
# 5889|   						strerror(-err), -err);
# 5890|-> 			close(fd);
# 5891|   			return bt_shell_noninteractive_quit(EXIT_FAILURE);
# 5892|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
bluez-5.85/client/player.c:5895:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/client/player.c:5826:13: enter_function: entry to ‘cmd_send_transport’
bluez-5.85/client/player.c:5835:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/client/player.c:5836:67: branch_true: ...to here
bluez-5.85/client/player.c:5838:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5843:29: call_function: inlined call to ‘find_transport’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5844:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5849:21: branch_false: ...to here
bluez-5.85/client/player.c:5849:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5854:21: branch_false: ...to here
bluez-5.85/client/player.c:5855:30: call_function: calling ‘open_file’ from ‘cmd_send_transport’
bluez-5.85/client/player.c:5855:30: return_function: returning to ‘cmd_send_transport’ from ‘open_file’
bluez-5.85/client/player.c:5856:28: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5861:17: branch_false: ...to here
bluez-5.85/client/player.c:5866:20: branch_false: following ‘false’ branch...
bluez-5.85/client/player.c:5873:35: branch_false: ...to here
bluez-5.85/client/player.c:5877:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/client/player.c:5896:1: branch_false: ...to here
bluez-5.85/client/player.c:5887:20: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/client/player.c:5835:31: branch_false: ...to here
bluez-5.85/client/player.c:5895:16: throw: if ‘bt_shell_noninteractive_quit’ throws an exception...
bluez-5.85/client/player.c:5895:16: danger: ‘fd’ leaks here; was opened at [(15)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/14)
# 5893|   	}
# 5894|   
# 5895|-> 	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
# 5896|   }
# 5897|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def68]
bluez-5.85/emulator/b1ee.c:153:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘server_pkt_data’ where non-null expected
bluez-5.85/emulator/b1ee.c:124:16: branch_true: following ‘true’ branch (when ‘count != 0’)...
bluez-5.85/emulator/b1ee.c:127:21: branch_true: ...to here
bluez-5.85/emulator/b1ee.c:127:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/b1ee.c:128:43: branch_true: ...to here
bluez-5.85/emulator/b1ee.c:130:25: branch_true: following ‘true’ branch...
bluez-5.85/emulator/b1ee.c:131:25: branch_true: ...to here
bluez-5.85/emulator/b1ee.c:132:36: branch_false: following ‘false’ branch (when ‘count > 2’)...
bluez-5.85/emulator/b1ee.c:138:57: branch_false: ...to here
bluez-5.85/emulator/b1ee.c:139:51: acquire_memory: this call could return NULL
bluez-5.85/emulator/b1ee.c:150:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/b1ee.c:153:25: branch_true: ...to here
bluez-5.85/emulator/b1ee.c:153:25: danger: argument 1 (‘server_pkt_data + (sizetype)server_pkt_len’) from [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected
#  151|   			ssize_t written;
#  152|   
#  153|-> 			memcpy(server_pkt_data + server_pkt_len,
#  154|   						ptr, server_pkt_expect);
#  155|   			ptr += server_pkt_expect;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def69]
bluez-5.85/emulator/b1ee.c:166:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘server_pkt_data’ where non-null expected
bluez-5.85/emulator/b1ee.c:124:16: branch_true: following ‘true’ branch (when ‘count != 0’)...
bluez-5.85/emulator/b1ee.c:127:21: branch_true: ...to here
bluez-5.85/emulator/b1ee.c:127:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/b1ee.c:128:43: branch_true: ...to here
bluez-5.85/emulator/b1ee.c:130:25: branch_true: following ‘true’ branch...
bluez-5.85/emulator/b1ee.c:131:25: branch_true: ...to here
bluez-5.85/emulator/b1ee.c:132:36: branch_false: following ‘false’ branch (when ‘count > 2’)...
bluez-5.85/emulator/b1ee.c:138:57: branch_false: ...to here
bluez-5.85/emulator/b1ee.c:139:51: acquire_memory: this call could return NULL
bluez-5.85/emulator/b1ee.c:150:20: branch_false: following ‘false’ branch...
bluez-5.85/emulator/b1ee.c:166:25: branch_false: ...to here
bluez-5.85/emulator/b1ee.c:166:25: danger: argument 1 (‘server_pkt_data + (sizetype)server_pkt_len’) from [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected
#  164|   			server_pkt_data = NULL;
#  165|   		} else {
#  166|-> 			memcpy(server_pkt_data + server_pkt_len, ptr, count);
#  167|   			server_pkt_len += count;
#  168|   			server_pkt_expect -= count;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def70]
bluez-5.85/emulator/b1ee.c:230:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/b1ee.c:212:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/b1ee.c:217:14: branch_false: ...to here
bluez-5.85/emulator/b1ee.c:217:26: branch_true: following ‘true’ branch (when ‘info’ is non-NULL)...
bluez-5.85/emulator/b1ee.c:220:44: branch_true: ...to here
bluez-5.85/emulator/b1ee.c:223:22: acquire_resource: socket created here
bluez-5.85/emulator/b1ee.c:225:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/b1ee.c:228:17: branch_false: ...to here
bluez-5.85/emulator/b1ee.c:230:21: throw: if ‘connect’ throws an exception...
bluez-5.85/emulator/b1ee.c:230:21: danger: ‘fd’ leaks here
#  228|   		printf("Trying to connect to %s on port %s\n", str, service);
#  229|   
#  230|-> 		if (connect(fd, res->ai_addr, res->ai_addrlen) < 0) {
#  231|   			perror("Failed to connect");
#  232|   			close(fd);

Error: GCC_ANALYZER_WARNING (CWE-910): [#def71]
bluez-5.85/emulator/b1ee.c:300:19: warning[-Wanalyzer-fd-use-after-close]: ‘write’ on closed file descriptor ‘sniffer_fd’
bluez-5.85/emulator/b1ee.c:249:5: enter_function: entry to ‘main’
bluez-5.85/emulator/b1ee.c:261:20: branch_true: following ‘true’ branch (when ‘opt < 0’)...
bluez-5.85/emulator/b1ee.c:289:16: branch_true: ...to here
bluez-5.85/emulator/b1ee.c:293:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/b1ee.c:296:21: branch_false: following ‘false’ branch (when ‘server_port’ is NULL)...
bluez-5.85/emulator/b1ee.c:296:21: branch_false: ...to here
bluez-5.85/emulator/b1ee.c:296:21: call_function: calling ‘do_connect’ from ‘main’
bluez-5.85/emulator/b1ee.c:296:21: return_function: returning to ‘main’ from ‘do_connect’
bluez-5.85/emulator/b1ee.c:297:22: branch_false: following ‘false’ branch (when ‘sniffer_port’ is NULL)...
bluez-5.85/emulator/b1ee.c:297:22: branch_false: ...to here
bluez-5.85/emulator/b1ee.c:297:22: call_function: calling ‘do_connect’ from ‘main’
bluez-5.85/emulator/b1ee.c:297:22: return_function: returning to ‘main’ from ‘do_connect’
bluez-5.85/emulator/b1ee.c:300:19: danger: ‘write’ on closed file descriptor ‘sniffer_fd’; ‘close’ was at [(29)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/28)
#  298|   				sniffer_port ? : DEFAULT_SNIFFER_PORT);
#  299|   
#  300|-> 	written = write(sniffer_fd, sniff_cmd, sizeof(sniff_cmd));
#  301|   	if (written < 0)
#  302|   		perror("Failed to enable sniffer");

Error: GCC_ANALYZER_WARNING: [#def72]
bluez-5.85/emulator/b1ee.c:300:19: warning[-Wanalyzer-fd-use-without-check]: ‘write’ on possibly invalid file descriptor ‘-1’
bluez-5.85/emulator/b1ee.c:249:5: enter_function: entry to ‘main’
bluez-5.85/emulator/b1ee.c:261:20: branch_true: following ‘true’ branch (when ‘opt < 0’)...
bluez-5.85/emulator/b1ee.c:289:16: branch_true: ...to here
bluez-5.85/emulator/b1ee.c:293:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/b1ee.c:296:21: branch_false: following ‘false’ branch (when ‘server_port’ is NULL)...
bluez-5.85/emulator/b1ee.c:296:21: branch_false: ...to here
bluez-5.85/emulator/b1ee.c:296:21: call_function: calling ‘do_connect’ from ‘main’
bluez-5.85/emulator/b1ee.c:296:21: return_function: returning to ‘main’ from ‘do_connect’
bluez-5.85/emulator/b1ee.c:297:22: branch_false: following ‘false’ branch (when ‘sniffer_port’ is NULL)...
bluez-5.85/emulator/b1ee.c:297:22: branch_false: ...to here
bluez-5.85/emulator/b1ee.c:297:22: call_function: calling ‘do_connect’ from ‘main’
bluez-5.85/emulator/b1ee.c:297:22: return_function: returning to ‘main’ from ‘do_connect’
bluez-5.85/emulator/b1ee.c:300:19: danger: ‘-1’ could be invalid
#  298|   				sniffer_port ? : DEFAULT_SNIFFER_PORT);
#  299|   
#  300|-> 	written = write(sniffer_fd, sniff_cmd, sizeof(sniff_cmd));
#  301|   	if (written < 0)
#  302|   		perror("Failed to enable sniffer");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
bluez-5.85/emulator/btdev.c:315:16: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6934:17: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6969:9: call_function: calling ‘le_meta_event’ from ‘cmd_create_big_complete’
#  313|   		return true;
#  314|   
#  315|-> 	return btdev->hook_list[index]->handler(data, len,
#  316|   					btdev->hook_list[index]->user_data);
#  317|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
bluez-5.85/emulator/btdev.c:447:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6934:17: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6969:9: call_function: calling ‘le_meta_event’ from ‘cmd_create_big_complete’
#  445|   	for (i = 0; i < iovlen; i++) {
#  446|   		if (!i)
#  447|-> 			util_hexdump('<', iov[i].iov_base, iov[i].iov_len,
#  448|   				btdev->debug_callback, btdev->debug_data);
#  449|   		else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
bluez-5.85/emulator/btdev.c:608:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
#  606|   	struct le_big *big = data;
#  607|   
#  608|-> 	queue_destroy(big->bis, NULL);
#  609|   
#  610|   	free(big);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
bluez-5.85/emulator/btdev.c:755:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6934:17: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6969:9: call_function: calling ‘le_meta_event’ from ‘cmd_create_big_complete’
#  753|   	uint8_t pkt = BT_H4_EVT_PKT;
#  754|   
#  755|-> 	util_debug(btdev->debug_callback, btdev->debug_data,
#  756|   				"event 0x%02x", event);
#  757|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
bluez-5.85/emulator/btdev.c:1142:16: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/btdev.c:6938:9: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6942:21: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6945:24: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6945:24: call_function: calling ‘conn_add_bis’ from ‘cmd_create_big_complete’
# 1140|   	struct btdev_conn *conn;
# 1141|   
# 1142|-> 	while (queue_find(dev->conns, match_handle, UINT_TO_PTR(handle)))
# 1143|   		handle++;
# 1144|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
bluez-5.85/emulator/btdev.c:1145:16: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/btdev.c:6938:9: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6942:21: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6945:24: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6945:24: call_function: calling ‘conn_add_bis’ from ‘cmd_create_big_complete’
# 1143|   		handle++;
# 1144|   
# 1145|-> 	conn = new0(struct btdev_conn, 1);
# 1146|   	conn->handle = handle;
# 1147|   	conn->type = type;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
bluez-5.85/emulator/btdev.c:1150:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/btdev.c:6938:9: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6942:21: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6945:24: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6945:24: call_function: calling ‘conn_add_bis’ from ‘cmd_create_big_complete’
# 1148|   	conn->dev = dev;
# 1149|   
# 1150|-> 	if (!queue_push_tail(dev->conns, conn)) {
# 1151|   		free(conn);
# 1152|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
bluez-5.85/emulator/btdev.c:1222:22: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/btdev.c:6938:9: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6942:21: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6945:24: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6945:24: call_function: calling ‘conn_add_bis’ from ‘cmd_create_big_complete’
# 1220|   		return conn;
# 1221|   
# 1222|-> 	conn->data = util_memdup(bis, sizeof(*bis));
# 1223|   
# 1224|   	return conn;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
bluez-5.85/emulator/btdev.c:3907:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6934:17: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6969:9: call_function: calling ‘le_meta_event’ from ‘cmd_create_big_complete’
# 3905|   	void *pkt_data;
# 3906|   
# 3907|-> 	util_debug(btdev->debug_callback, btdev->debug_data,
# 3908|   				"meta event 0x%02x", event);
# 3909|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def82]
bluez-5.85/emulator/btdev.c:3917:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6934:17: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6969:9: call_function: calling ‘le_meta_event’ from ‘cmd_create_big_complete’
# 3915|   
# 3916|   	if (len > 0)
# 3917|-> 		memcpy(pkt_data + 1, data, len);
# 3918|   
# 3919|   	send_event(btdev, BT_HCI_EVT_LE_META_EVENT, pkt_data, 1 + len);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def83]
bluez-5.85/emulator/btdev.c:6321:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘acl’
bluez-5.85/emulator/btdev.c:6283:12: enter_function: entry to ‘cmd_past’
bluez-5.85/emulator/btdev.c:6318:9: call_function: calling ‘cmd_complete’ from ‘cmd_past’
bluez-5.85/emulator/btdev.c:6318:9: return_function: returning to ‘cmd_past’ from ‘cmd_complete’
bluez-5.85/emulator/btdev.c:6320:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6321:17: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6321:17: danger: dereference of NULL ‘acl’
# 6319|   
# 6320|   	if (rsp.status == BT_HCI_ERR_SUCCESS)
# 6321|-> 		le_past_received(acl->link, pa);
# 6322|   
# 6323|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
bluez-5.85/emulator/btdev.c:6895:15: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
# 6893|   	struct le_big *big;
# 6894|   
# 6895|-> 	big = new0(struct le_big, 1);
# 6896|   
# 6897|   	big->dev = btdev;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
bluez-5.85/emulator/btdev.c:6899:20: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
# 6897|   	big->dev = btdev;
# 6898|   	big->handle = handle;
# 6899|-> 	big->bis = queue_new();
# 6900|   
# 6901|   	/* Add to queue */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
bluez-5.85/emulator/btdev.c:6902:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
# 6900|   
# 6901|   	/* Add to queue */
# 6902|-> 	if (!queue_push_tail(btdev->le_big, big)) {
# 6903|   		le_big_free(big);
# 6904|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
bluez-5.85/emulator/btdev.c:6947:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/btdev.c:6938:9: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6942:21: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6945:24: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6945:24: call_function: calling ‘conn_add_bis’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6945:24: return_function: returning to ‘cmd_create_big_complete’ from ‘conn_add_bis’
bluez-5.85/emulator/btdev.c:6946:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6947:25: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6947:25: throw: if ‘queue_remove’ throws an exception...
bluez-5.85/emulator/btdev.c:6947:25: danger: ‘pdu’ leaks here; was allocated at [(2)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/1)
# 6945|   		conn = conn_add_bis(dev, BIS_HANDLE + i, bis);
# 6946|   		if (!conn) {
# 6947|-> 			queue_remove(dev->le_big, big);
# 6948|   			le_big_free(big);
# 6949|   			evt.status = BT_HCI_ERR_MEM_CAPACITY_EXCEEDED;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
bluez-5.85/emulator/btdev.c:6953:17: warning[-Wanalyzer-malloc-leak]: leak of ‘pdu’
bluez-5.85/emulator/btdev.c:6910:12: enter_function: entry to ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6924:15: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:6925:12: branch_false: following ‘false’ branch (when ‘pdu’ is non-NULL)...
bluez-5.85/emulator/btdev.c:6932:31: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6932:15: call_function: calling ‘le_big_new’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6932:15: return_function: returning to ‘cmd_create_big_complete’ from ‘le_big_new’
bluez-5.85/emulator/btdev.c:6933:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/btdev.c:6938:9: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6942:21: branch_true: following ‘true’ branch...
bluez-5.85/emulator/btdev.c:6945:24: branch_true: ...to here
bluez-5.85/emulator/btdev.c:6945:24: call_function: calling ‘conn_add_bis’ from ‘cmd_create_big_complete’
bluez-5.85/emulator/btdev.c:6945:24: return_function: returning to ‘cmd_create_big_complete’ from ‘conn_add_bis’
bluez-5.85/emulator/btdev.c:6946:20: branch_false: following ‘false’ branch...
bluez-5.85/emulator/btdev.c:6953:17: branch_false: ...to here
bluez-5.85/emulator/btdev.c:6953:17: throw: if ‘queue_push_tail’ throws an exception...
bluez-5.85/emulator/btdev.c:6953:17: danger: ‘pdu’ leaks here; was allocated at [(2)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/1)
# 6951|   		}
# 6952|   
# 6953|-> 		queue_push_tail(big->bis, conn);
# 6954|   		*bis_handle = cpu_to_le16(conn->handle);
# 6955|   		bis_handle++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
bluez-5.85/emulator/btdev.c:7850:33: warning[-Wanalyzer-malloc-leak]: leak of ‘btdev’
bluez-5.85/emulator/btdev.c:7838:17: acquire_memory: allocated here
bluez-5.85/emulator/btdev.c:7839:12: branch_false: following ‘false’ branch (when ‘btdev’ is non-NULL)...
bluez-5.85/emulator/btdev.c:7842:9: branch_false: ...to here
bluez-5.85/emulator/btdev.c:7850:33: throw: if ‘bt_crypto_new’ throws an exception...
bluez-5.85/emulator/btdev.c:7850:33: danger: ‘btdev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 7848|   	case BTDEV_TYPE_BREDRLE52:
# 7849|   	case BTDEV_TYPE_BREDRLE60:
# 7850|-> 		btdev->crypto = bt_crypto_new();
# 7851|   		if (!btdev->crypto) {
# 7852|   			free(btdev);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def90]
bluez-5.85/emulator/bthost.c:631:46: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
bluez-5.85/emulator/bthost.c:3704:6: enter_function: entry to ‘bthost_set_pa_data’
bluez-5.85/emulator/bthost.c:3707:9: call_function: calling ‘set_pa_data’ from ‘bthost_set_pa_data’
#  629|   
#  630|   	for (i = 0; i < iovlen; i++) {
#  631|-> 		memcpy(cmd->data + cmd->len, iov[i].iov_base, iov[i].iov_len);
#  632|   		cmd->len += iov[i].iov_len;
#  633|   	}

Error: GCC_ANALYZER_WARNING (CWE-126): [#def91]
bluez-5.85/emulator/bthost.c:631:63: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
bluez-5.85/emulator/bthost.c:3704:6: enter_function: entry to ‘bthost_set_pa_data’
bluez-5.85/emulator/bthost.c:3707:9: call_function: calling ‘set_pa_data’ from ‘bthost_set_pa_data’
#  629|   
#  630|   	for (i = 0; i < iovlen; i++) {
#  631|-> 		memcpy(cmd->data + cmd->len, iov[i].iov_base, iov[i].iov_len);
#  632|   		cmd->len += iov[i].iov_len;
#  633|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
bluez-5.85/emulator/bthost.c:654:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/emulator/bthost.c:3844:6: enter_function: entry to ‘bthost_create_cis’
bluez-5.85/emulator/bthost.c:3849:14: acquire_memory: allocated here
bluez-5.85/emulator/bthost.c:3855:9: call_function: calling ‘send_command’ from ‘bthost_create_cis’
#  652|   	for (i = 0; i < iovlen; i++) {
#  653|   		if (!i)
#  654|-> 			util_hexdump('<', iov[i].iov_base, iov[i].iov_len,
#  655|   				bthost->debug_callback, bthost->debug_data);
#  656|   		else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
bluez-5.85/emulator/bthost.c:657:25: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/emulator/bthost.c:3844:6: enter_function: entry to ‘bthost_create_cis’
bluez-5.85/emulator/bthost.c:3849:14: acquire_memory: allocated here
bluez-5.85/emulator/bthost.c:3855:9: call_function: calling ‘send_command’ from ‘bthost_create_cis’
#  655|   				bthost->debug_callback, bthost->debug_data);
#  656|   		else
#  657|-> 			util_hexdump(' ', iov[i].iov_base, iov[i].iov_len,
#  658|   				bthost->debug_callback, bthost->debug_data);
#  659|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
bluez-5.85/emulator/bthost.c:661:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/emulator/bthost.c:3844:6: enter_function: entry to ‘bthost_create_cis’
bluez-5.85/emulator/bthost.c:3849:14: acquire_memory: allocated here
bluez-5.85/emulator/bthost.c:3855:9: call_function: calling ‘send_command’ from ‘bthost_create_cis’
#  659|   	}
#  660|   
#  661|-> 	bthost->send_handler(iov, iovlen, bthost->send_data);
#  662|   }
#  663|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
bluez-5.85/emulator/bthost.c:1195:9: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/emulator/bthost.c:3844:6: enter_function: entry to ‘bthost_create_cis’
bluez-5.85/emulator/bthost.c:3849:14: acquire_memory: allocated here
bluez-5.85/emulator/bthost.c:3855:9: call_function: calling ‘send_command’ from ‘bthost_create_cis’
# 1193|   
# 1194|   	va_start(ap, format);
# 1195|-> 	util_debug_va(host->debug_callback, host->debug_data, format, ap);
# 1196|   	va_end(ap);
# 1197|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def96]
bluez-5.85/emulator/bthost.c:1195:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/emulator/bthost.c:3860:6: enter_function: entry to ‘bthost_write_ssp_mode’
bluez-5.85/emulator/bthost.c:3862:9: call_function: calling ‘send_command’ from ‘bthost_write_ssp_mode’
# 1193|   
# 1194|   	va_start(ap, format);
# 1195|-> 	util_debug_va(host->debug_callback, host->debug_data, format, ap);
# 1196|   	va_end(ap);
# 1197|   }

Error: CPPCHECK_WARNING (CWE-476): [#def97]
bluez-5.85/emulator/bthost.c:3818: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3816|   
# 3817|   	cp = malloc(sizeof(*cp) + sizeof(*cp->cis));
# 3818|-> 	memset(cp, 0, sizeof(*cp) + sizeof(*cp->cis));
# 3819|   	cp->cig_id = cig_id;
# 3820|   	put_le24(qos->ucast.in.interval ? qos->ucast.in.interval :

Error: CPPCHECK_WARNING (CWE-476): [#def98]
bluez-5.85/emulator/bthost.c:3819: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3817|   	cp = malloc(sizeof(*cp) + sizeof(*cp->cis));
# 3818|   	memset(cp, 0, sizeof(*cp) + sizeof(*cp->cis));
# 3819|-> 	cp->cig_id = cig_id;
# 3820|   	put_le24(qos->ucast.in.interval ? qos->ucast.in.interval :
# 3821|   				qos->ucast.out.interval, cp->c_interval);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def99]
bluez-5.85/emulator/bthost.c:3819:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘cp’
bluez-5.85/emulator/bthost.c:3817:14: acquire_memory: this call could return NULL
bluez-5.85/emulator/bthost.c:3819:9: danger: ‘cp’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
# 3817|   	cp = malloc(sizeof(*cp) + sizeof(*cp->cis));
# 3818|   	memset(cp, 0, sizeof(*cp) + sizeof(*cp->cis));
# 3819|-> 	cp->cig_id = cig_id;
# 3820|   	put_le24(qos->ucast.in.interval ? qos->ucast.in.interval :
# 3821|   				qos->ucast.out.interval, cp->c_interval);

Error: CPPCHECK_WARNING (CWE-476): [#def100]
bluez-5.85/emulator/bthost.c:3821: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3819|   	cp->cig_id = cig_id;
# 3820|   	put_le24(qos->ucast.in.interval ? qos->ucast.in.interval :
# 3821|-> 				qos->ucast.out.interval, cp->c_interval);
# 3822|   	put_le24(qos->ucast.out.interval ? qos->ucast.out.interval :
# 3823|   				qos->ucast.in.interval, cp->p_interval);

Error: CPPCHECK_WARNING (CWE-476): [#def101]
bluez-5.85/emulator/bthost.c:3823: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3821|   				qos->ucast.out.interval, cp->c_interval);
# 3822|   	put_le24(qos->ucast.out.interval ? qos->ucast.out.interval :
# 3823|-> 				qos->ucast.in.interval, cp->p_interval);
# 3824|   	cp->c_latency = cpu_to_le16(qos->ucast.in.latency ?
# 3825|   				qos->ucast.in.latency : qos->ucast.out.latency);

Error: CPPCHECK_WARNING (CWE-476): [#def102]
bluez-5.85/emulator/bthost.c:3824: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3822|   	put_le24(qos->ucast.out.interval ? qos->ucast.out.interval :
# 3823|   				qos->ucast.in.interval, cp->p_interval);
# 3824|-> 	cp->c_latency = cpu_to_le16(qos->ucast.in.latency ?
# 3825|   				qos->ucast.in.latency : qos->ucast.out.latency);
# 3826|   	cp->p_latency = cpu_to_le16(qos->ucast.out.latency ?

Error: CPPCHECK_WARNING (CWE-476): [#def103]
bluez-5.85/emulator/bthost.c:3826: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3824|   	cp->c_latency = cpu_to_le16(qos->ucast.in.latency ?
# 3825|   				qos->ucast.in.latency : qos->ucast.out.latency);
# 3826|-> 	cp->p_latency = cpu_to_le16(qos->ucast.out.latency ?
# 3827|   				qos->ucast.out.latency : qos->ucast.in.latency);
# 3828|   	cp->num_cis = 0x01;

Error: CPPCHECK_WARNING (CWE-476): [#def104]
bluez-5.85/emulator/bthost.c:3828: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3826|   	cp->p_latency = cpu_to_le16(qos->ucast.out.latency ?
# 3827|   				qos->ucast.out.latency : qos->ucast.in.latency);
# 3828|-> 	cp->num_cis = 0x01;
# 3829|   	cp->cis[0].cis_id = cis_id;
# 3830|   	cp->cis[0].c_sdu = qos->ucast.in.sdu;

Error: CPPCHECK_WARNING (CWE-476): [#def105]
bluez-5.85/emulator/bthost.c:3829: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3827|   				qos->ucast.out.latency : qos->ucast.in.latency);
# 3828|   	cp->num_cis = 0x01;
# 3829|-> 	cp->cis[0].cis_id = cis_id;
# 3830|   	cp->cis[0].c_sdu = qos->ucast.in.sdu;
# 3831|   	cp->cis[0].p_sdu = qos->ucast.out.sdu;

Error: CPPCHECK_WARNING (CWE-476): [#def106]
bluez-5.85/emulator/bthost.c:3830: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3828|   	cp->num_cis = 0x01;
# 3829|   	cp->cis[0].cis_id = cis_id;
# 3830|-> 	cp->cis[0].c_sdu = qos->ucast.in.sdu;
# 3831|   	cp->cis[0].p_sdu = qos->ucast.out.sdu;
# 3832|   	cp->cis[0].c_phy = qos->ucast.in.phy ? qos->ucast.in.phy :

Error: CPPCHECK_WARNING (CWE-476): [#def107]
bluez-5.85/emulator/bthost.c:3831: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3829|   	cp->cis[0].cis_id = cis_id;
# 3830|   	cp->cis[0].c_sdu = qos->ucast.in.sdu;
# 3831|-> 	cp->cis[0].p_sdu = qos->ucast.out.sdu;
# 3832|   	cp->cis[0].c_phy = qos->ucast.in.phy ? qos->ucast.in.phy :
# 3833|   							qos->ucast.out.phy;

Error: CPPCHECK_WARNING (CWE-476): [#def108]
bluez-5.85/emulator/bthost.c:3832: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3830|   	cp->cis[0].c_sdu = qos->ucast.in.sdu;
# 3831|   	cp->cis[0].p_sdu = qos->ucast.out.sdu;
# 3832|-> 	cp->cis[0].c_phy = qos->ucast.in.phy ? qos->ucast.in.phy :
# 3833|   							qos->ucast.out.phy;
# 3834|   	cp->cis[0].p_phy = qos->ucast.out.phy ? qos->ucast.out.phy :

Error: CPPCHECK_WARNING (CWE-476): [#def109]
bluez-5.85/emulator/bthost.c:3834: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3832|   	cp->cis[0].c_phy = qos->ucast.in.phy ? qos->ucast.in.phy :
# 3833|   							qos->ucast.out.phy;
# 3834|-> 	cp->cis[0].p_phy = qos->ucast.out.phy ? qos->ucast.out.phy :
# 3835|   							qos->ucast.in.phy;
# 3836|   	cp->cis[0].c_rtn = qos->ucast.in.rtn;

Error: CPPCHECK_WARNING (CWE-476): [#def110]
bluez-5.85/emulator/bthost.c:3836: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3834|   	cp->cis[0].p_phy = qos->ucast.out.phy ? qos->ucast.out.phy :
# 3835|   							qos->ucast.in.phy;
# 3836|-> 	cp->cis[0].c_rtn = qos->ucast.in.rtn;
# 3837|   	cp->cis[0].p_rtn = qos->ucast.out.rtn;
# 3838|   

Error: CPPCHECK_WARNING (CWE-476): [#def111]
bluez-5.85/emulator/bthost.c:3837: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3835|   							qos->ucast.in.phy;
# 3836|   	cp->cis[0].c_rtn = qos->ucast.in.rtn;
# 3837|-> 	cp->cis[0].p_rtn = qos->ucast.out.rtn;
# 3838|   
# 3839|   	send_command(bthost, BT_HCI_CMD_LE_SET_CIG_PARAMS, cp,

Error: CPPCHECK_WARNING (CWE-476): [#def112]
bluez-5.85/emulator/bthost.c:3850: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3848|   
# 3849|   	cp = malloc(sizeof(*cp) + sizeof(*cp->cis));
# 3850|-> 	memset(cp, 0, sizeof(*cp) + sizeof(*cp->cis));
# 3851|   	cp->num_cis = 0x01;
# 3852|   	cp->cis[0].cis_handle = cpu_to_le16(cis_handle);

Error: CPPCHECK_WARNING (CWE-476): [#def113]
bluez-5.85/emulator/bthost.c:3851: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3849|   	cp = malloc(sizeof(*cp) + sizeof(*cp->cis));
# 3850|   	memset(cp, 0, sizeof(*cp) + sizeof(*cp->cis));
# 3851|-> 	cp->num_cis = 0x01;
# 3852|   	cp->cis[0].cis_handle = cpu_to_le16(cis_handle);
# 3853|   	cp->cis[0].acl_handle = cpu_to_le16(acl_handle);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def114]
bluez-5.85/emulator/bthost.c:3851:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘cp’
bluez-5.85/emulator/bthost.c:3849:14: acquire_memory: this call could return NULL
bluez-5.85/emulator/bthost.c:3851:9: danger: ‘cp’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
# 3849|   	cp = malloc(sizeof(*cp) + sizeof(*cp->cis));
# 3850|   	memset(cp, 0, sizeof(*cp) + sizeof(*cp->cis));
# 3851|-> 	cp->num_cis = 0x01;
# 3852|   	cp->cis[0].cis_handle = cpu_to_le16(cis_handle);
# 3853|   	cp->cis[0].acl_handle = cpu_to_le16(acl_handle);

Error: CPPCHECK_WARNING (CWE-476): [#def115]
bluez-5.85/emulator/bthost.c:3852: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3850|   	memset(cp, 0, sizeof(*cp) + sizeof(*cp->cis));
# 3851|   	cp->num_cis = 0x01;
# 3852|-> 	cp->cis[0].cis_handle = cpu_to_le16(cis_handle);
# 3853|   	cp->cis[0].acl_handle = cpu_to_le16(acl_handle);
# 3854|   

Error: CPPCHECK_WARNING (CWE-476): [#def116]
bluez-5.85/emulator/bthost.c:3853: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cp
# 3851|   	cp->num_cis = 0x01;
# 3852|   	cp->cis[0].cis_handle = cpu_to_le16(cis_handle);
# 3853|-> 	cp->cis[0].acl_handle = cpu_to_le16(acl_handle);
# 3854|   
# 3855|   	send_command(bthost, BT_HCI_CMD_LE_CREATE_CIS, cp,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def117]
bluez-5.85/emulator/hfp.c:61:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/hfp.c:50:14: acquire_resource: socket created here
bluez-5.85/emulator/hfp.c:51:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/hfp.c:56:9: branch_false: ...to here
bluez-5.85/emulator/hfp.c:60:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/hfp.c:61:17: branch_true: ...to here
bluez-5.85/emulator/hfp.c:61:17: throw: if ‘perror’ throws an exception...
bluez-5.85/emulator/hfp.c:61:17: danger: ‘fd’ leaks here
#   59|   
#   60|   	if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   61|-> 		perror("Failed to connect Unix socket");
#   62|   		close(fd);
#   63|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def118]
bluez-5.85/emulator/hfp.c:62:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/hfp.c:50:14: acquire_resource: socket created here
bluez-5.85/emulator/hfp.c:51:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/hfp.c:56:9: branch_false: ...to here
bluez-5.85/emulator/hfp.c:60:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/hfp.c:61:17: branch_true: ...to here
bluez-5.85/emulator/hfp.c:62:17: throw: if ‘close’ throws an exception...
bluez-5.85/emulator/hfp.c:62:17: danger: ‘fd’ leaks here
#   60|   	if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   61|   		perror("Failed to connect Unix socket");
#   62|-> 		close(fd);
#   63|   		return false;
#   64|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def119]
bluez-5.85/emulator/phy.c:60:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
bluez-5.85/emulator/phy.c:54:14: acquire_resource: opened here
bluez-5.85/emulator/phy.c:55:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/phy.c:58:15: branch_false: ...to here
bluez-5.85/emulator/phy.c:60:9: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   58|   	len = read(fd, buf, num_bytes);
#   59|   
#   60|-> 	close(fd);
#   61|   
#   62|   	if (len < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
bluez-5.85/emulator/phy.c:119:17: warning[-Wanalyzer-malloc-leak]: leak of ‘phy’
bluez-5.85/emulator/phy.c:152:16: enter_function: entry to ‘bt_phy_new’
bluez-5.85/emulator/phy.c:156:15: acquire_memory: allocated here
bluez-5.85/emulator/phy.c:157:12: branch_false: following ‘false’ branch (when ‘phy’ is non-NULL)...
bluez-5.85/emulator/phy.c:160:22: branch_false: ...to here
bluez-5.85/emulator/phy.c:160:22: call_function: calling ‘create_rx_socket’ from ‘bt_phy_new’
#  117|   
#  118|   	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) < 0) {
#  119|-> 		close(fd);
#  120|   		return -1;
#  121|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
bluez-5.85/emulator/phy.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘phy’
bluez-5.85/emulator/phy.c:152:16: enter_function: entry to ‘bt_phy_new’
bluez-5.85/emulator/phy.c:156:15: acquire_memory: allocated here
bluez-5.85/emulator/phy.c:157:12: branch_false: following ‘false’ branch (when ‘phy’ is non-NULL)...
bluez-5.85/emulator/phy.c:160:22: branch_false: ...to here
bluez-5.85/emulator/phy.c:160:22: call_function: calling ‘create_rx_socket’ from ‘bt_phy_new’
#  127|   
#  128|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  129|-> 		close(fd);
#  130|   		return -1;
#  131|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
bluez-5.85/emulator/phy.c:145:17: warning[-Wanalyzer-malloc-leak]: leak of ‘phy’
bluez-5.85/emulator/phy.c:152:16: enter_function: entry to ‘bt_phy_new’
bluez-5.85/emulator/phy.c:156:15: acquire_memory: allocated here
bluez-5.85/emulator/phy.c:157:12: branch_false: following ‘false’ branch (when ‘phy’ is non-NULL)...
bluez-5.85/emulator/phy.c:160:22: branch_false: ...to here
bluez-5.85/emulator/phy.c:160:22: call_function: calling ‘create_rx_socket’ from ‘bt_phy_new’
bluez-5.85/emulator/phy.c:160:22: return_function: returning to ‘bt_phy_new’ from ‘create_rx_socket’
bluez-5.85/emulator/phy.c:161:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/phy.c:166:22: branch_false: ...to here
bluez-5.85/emulator/phy.c:166:22: call_function: calling ‘create_tx_socket’ from ‘bt_phy_new’
#  143|   
#  144|   	if (setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &opt, sizeof(opt)) < 0) {
#  145|-> 		close(fd);
#  146|   		return -1;
#  147|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
bluez-5.85/emulator/phy.c:168:17: warning[-Wanalyzer-malloc-leak]: leak of ‘phy’
bluez-5.85/emulator/phy.c:152:16: enter_function: entry to ‘bt_phy_new’
bluez-5.85/emulator/phy.c:156:15: acquire_memory: allocated here
bluez-5.85/emulator/phy.c:157:12: branch_false: following ‘false’ branch (when ‘phy’ is non-NULL)...
bluez-5.85/emulator/phy.c:160:22: branch_false: ...to here
bluez-5.85/emulator/phy.c:160:22: call_function: calling ‘create_rx_socket’ from ‘bt_phy_new’
bluez-5.85/emulator/phy.c:160:22: return_function: returning to ‘bt_phy_new’ from ‘create_rx_socket’
bluez-5.85/emulator/phy.c:161:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/phy.c:166:22: branch_false: ...to here
bluez-5.85/emulator/phy.c:166:22: call_function: calling ‘create_tx_socket’ from ‘bt_phy_new’
bluez-5.85/emulator/phy.c:166:22: return_function: returning to ‘bt_phy_new’ from ‘create_tx_socket’
bluez-5.85/emulator/phy.c:167:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/phy.c:168:17: branch_true: ...to here
bluez-5.85/emulator/phy.c:168:17: throw: if ‘close’ throws an exception...
bluez-5.85/emulator/phy.c:168:17: danger: ‘phy’ leaks here; was allocated at [(2)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/1)
#  166|   	phy->tx_fd = create_tx_socket();
#  167|   	if (phy->tx_fd < 0) {
#  168|-> 		close(phy->rx_fd);
#  169|   		free(phy);
#  170|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
bluez-5.85/emulator/phy.c:173:9: warning[-Wanalyzer-malloc-leak]: leak of ‘phy’
bluez-5.85/emulator/phy.c:152:16: enter_function: entry to ‘bt_phy_new’
bluez-5.85/emulator/phy.c:156:15: acquire_memory: allocated here
bluez-5.85/emulator/phy.c:157:12: branch_false: following ‘false’ branch (when ‘phy’ is non-NULL)...
bluez-5.85/emulator/phy.c:160:22: branch_false: ...to here
bluez-5.85/emulator/phy.c:160:22: call_function: calling ‘create_rx_socket’ from ‘bt_phy_new’
bluez-5.85/emulator/phy.c:160:22: return_function: returning to ‘bt_phy_new’ from ‘create_rx_socket’
bluez-5.85/emulator/phy.c:161:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/phy.c:166:22: branch_false: ...to here
bluez-5.85/emulator/phy.c:166:22: call_function: calling ‘create_tx_socket’ from ‘bt_phy_new’
bluez-5.85/emulator/phy.c:166:22: return_function: returning to ‘bt_phy_new’ from ‘create_tx_socket’
bluez-5.85/emulator/phy.c:167:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/phy.c:173:9: branch_false: ...to here
bluez-5.85/emulator/phy.c:173:9: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/emulator/phy.c:173:9: danger: ‘phy’ leaks here; was allocated at [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
#  171|   	}
#  172|   
#  173|-> 	mainloop_add_fd(phy->rx_fd, EPOLLIN, phy_rx_callback, phy, NULL);
#  174|   
#  175|   	if (!get_random_bytes(&phy->id, sizeof(phy->id))) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def125]
bluez-5.85/emulator/serial.c:129:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*(struct serial *)user_data.pkt_data + (sizetype)*(struct serial *)user_data.pkt_len’ where non-null expected
bluez-5.85/emulator/serial.c:83:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/serial.c:83:12: branch_false: ...to here
bluez-5.85/emulator/serial.c:97:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/serial.c:100:9: branch_false: ...to here
bluez-5.85/emulator/serial.c:102:16: branch_true: following ‘true’ branch (when ‘count != 0’)...
bluez-5.85/emulator/serial.c:105:22: branch_true: ...to here
bluez-5.85/emulator/serial.c:105:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/serial.c:106:44: branch_true: ...to here
bluez-5.85/emulator/serial.c:108:25: branch_true: following ‘true’ branch...
bluez-5.85/emulator/serial.c:109:25: branch_true: ...to here
bluez-5.85/emulator/serial.c:110:36: branch_false: following ‘false’ branch (when ‘count > 3’)...
bluez-5.85/emulator/serial.c:116:57: branch_false: ...to here
bluez-5.85/emulator/serial.c:117:52: acquire_memory: this call could return NULL
bluez-5.85/emulator/serial.c:128:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/serial.c:129:25: branch_true: ...to here
bluez-5.85/emulator/serial.c:129:25: danger: argument 1 (‘*(struct serial *)user_data.pkt_data + (sizetype)*(struct serial *)user_data.pkt_len’) from [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12) could be NULL where non-null expected
#  127|   
#  128|   		if (count >= serial->pkt_expect) {
#  129|-> 			memcpy(serial->pkt_data + serial->pkt_len,
#  130|   						ptr, serial->pkt_expect);
#  131|   			ptr += serial->pkt_expect;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def126]
bluez-5.85/emulator/serial.c:140:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*(struct serial *)user_data.pkt_data + (sizetype)*(struct serial *)user_data.pkt_len’ where non-null expected
bluez-5.85/emulator/serial.c:83:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/serial.c:83:12: branch_false: ...to here
bluez-5.85/emulator/serial.c:97:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/serial.c:100:9: branch_false: ...to here
bluez-5.85/emulator/serial.c:102:16: branch_true: following ‘true’ branch (when ‘count != 0’)...
bluez-5.85/emulator/serial.c:105:22: branch_true: ...to here
bluez-5.85/emulator/serial.c:105:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/serial.c:106:44: branch_true: ...to here
bluez-5.85/emulator/serial.c:108:25: branch_true: following ‘true’ branch...
bluez-5.85/emulator/serial.c:109:25: branch_true: ...to here
bluez-5.85/emulator/serial.c:110:36: branch_false: following ‘false’ branch (when ‘count > 3’)...
bluez-5.85/emulator/serial.c:116:57: branch_false: ...to here
bluez-5.85/emulator/serial.c:117:52: acquire_memory: this call could return NULL
bluez-5.85/emulator/serial.c:128:20: branch_false: following ‘false’ branch...
bluez-5.85/emulator/serial.c:140:25: branch_false: ...to here
bluez-5.85/emulator/serial.c:140:25: danger: argument 1 (‘*(struct serial *)user_data.pkt_data + (sizetype)*(struct serial *)user_data.pkt_len’) from [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12) could be NULL where non-null expected
#  138|   			serial->pkt_data = NULL;
#  139|   		} else {
#  140|-> 			memcpy(serial->pkt_data + serial->pkt_len, ptr, count);
#  141|   			serial->pkt_len += count;
#  142|   			serial->pkt_expect -= count;

Error: CPPCHECK_WARNING (CWE-457): [#def127]
bluez-5.85/emulator/serial.c:150: error[legacyUninitvar]: Uninitialized variable: type
#  148|   static void open_pty(struct serial *serial)
#  149|   {
#  150|-> 	enum btdev_type uninitialized_var(type);
#  151|   
#  152|   	serial->fd = posix_openpt(O_RDWR | O_NOCTTY);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
bluez-5.85/emulator/serial.c:152:22: warning[-Wanalyzer-malloc-leak]: leak of ‘serial’
bluez-5.85/emulator/serial.c:210:16: enter_function: entry to ‘serial_open’
bluez-5.85/emulator/serial.c:215:18: acquire_memory: allocated here
bluez-5.85/emulator/serial.c:216:12: branch_false: following ‘false’ branch (when ‘serial’ is non-NULL)...
bluez-5.85/emulator/serial.c:219:9: branch_false: ...to here
bluez-5.85/emulator/serial.c:223:9: call_function: calling ‘open_pty’ from ‘serial_open’
#  150|   	enum btdev_type uninitialized_var(type);
#  151|   
#  152|-> 	serial->fd = posix_openpt(O_RDWR | O_NOCTTY);
#  153|   	if (serial->fd < 0) {
#  154|   		perror("Failed to get central pseudo terminal");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
bluez-5.85/emulator/serial.c:154:17: warning[-Wanalyzer-malloc-leak]: leak of ‘serial’
bluez-5.85/emulator/serial.c:210:16: enter_function: entry to ‘serial_open’
bluez-5.85/emulator/serial.c:215:18: acquire_memory: allocated here
bluez-5.85/emulator/serial.c:216:12: branch_false: following ‘false’ branch (when ‘serial’ is non-NULL)...
bluez-5.85/emulator/serial.c:219:9: branch_false: ...to here
bluez-5.85/emulator/serial.c:223:9: call_function: calling ‘open_pty’ from ‘serial_open’
#  152|   	serial->fd = posix_openpt(O_RDWR | O_NOCTTY);
#  153|   	if (serial->fd < 0) {
#  154|-> 		perror("Failed to get central pseudo terminal");
#  155|   		return;
#  156|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
bluez-5.85/emulator/serial.c:159:17: warning[-Wanalyzer-malloc-leak]: leak of ‘serial’
bluez-5.85/emulator/serial.c:210:16: enter_function: entry to ‘serial_open’
bluez-5.85/emulator/serial.c:215:18: acquire_memory: allocated here
bluez-5.85/emulator/serial.c:216:12: branch_false: following ‘false’ branch (when ‘serial’ is non-NULL)...
bluez-5.85/emulator/serial.c:219:9: branch_false: ...to here
bluez-5.85/emulator/serial.c:223:9: call_function: calling ‘open_pty’ from ‘serial_open’
#  157|   
#  158|   	if (grantpt(serial->fd) < 0) {
#  159|-> 		perror("Failed to grant peripheral pseudo terminal");
#  160|   		close(serial->fd);
#  161|   		serial->fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
bluez-5.85/emulator/serial.c:160:17: warning[-Wanalyzer-malloc-leak]: leak of ‘serial’
bluez-5.85/emulator/serial.c:210:16: enter_function: entry to ‘serial_open’
bluez-5.85/emulator/serial.c:215:18: acquire_memory: allocated here
bluez-5.85/emulator/serial.c:216:12: branch_false: following ‘false’ branch (when ‘serial’ is non-NULL)...
bluez-5.85/emulator/serial.c:219:9: branch_false: ...to here
bluez-5.85/emulator/serial.c:223:9: call_function: calling ‘open_pty’ from ‘serial_open’
#  158|   	if (grantpt(serial->fd) < 0) {
#  159|   		perror("Failed to grant peripheral pseudo terminal");
#  160|-> 		close(serial->fd);
#  161|   		serial->fd = -1;
#  162|   		return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
bluez-5.85/emulator/serial.c:166:17: warning[-Wanalyzer-malloc-leak]: leak of ‘serial’
bluez-5.85/emulator/serial.c:210:16: enter_function: entry to ‘serial_open’
bluez-5.85/emulator/serial.c:215:18: acquire_memory: allocated here
bluez-5.85/emulator/serial.c:216:12: branch_false: following ‘false’ branch (when ‘serial’ is non-NULL)...
bluez-5.85/emulator/serial.c:219:9: branch_false: ...to here
bluez-5.85/emulator/serial.c:223:9: call_function: calling ‘open_pty’ from ‘serial_open’
#  164|   
#  165|   	if (unlockpt(serial->fd) < 0) {
#  166|-> 		perror("Failed to unlock peripheral pseudo terminal");
#  167|   		close(serial->fd);
#  168|   		serial->fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
bluez-5.85/emulator/serial.c:167:17: warning[-Wanalyzer-malloc-leak]: leak of ‘serial’
bluez-5.85/emulator/serial.c:210:16: enter_function: entry to ‘serial_open’
bluez-5.85/emulator/serial.c:215:18: acquire_memory: allocated here
bluez-5.85/emulator/serial.c:216:12: branch_false: following ‘false’ branch (when ‘serial’ is non-NULL)...
bluez-5.85/emulator/serial.c:219:9: branch_false: ...to here
bluez-5.85/emulator/serial.c:223:9: call_function: calling ‘open_pty’ from ‘serial_open’
#  165|   	if (unlockpt(serial->fd) < 0) {
#  166|   		perror("Failed to unlock peripheral pseudo terminal");
#  167|-> 		close(serial->fd);
#  168|   		serial->fd = -1;
#  169|   		return;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def134]
bluez-5.85/emulator/serial.c:191:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘type’
bluez-5.85/emulator/serial.c:153:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/serial.c:158:13: branch_false: ...to here
bluez-5.85/emulator/serial.c:158:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/serial.c:165:13: branch_false: ...to here
bluez-5.85/emulator/serial.c:165:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/serial.c:172:31: branch_false: ...to here
bluez-5.85/emulator/serial.c:176:17: branch_false: following ‘false’ branch...
bluez-5.85/emulator/serial.c:191:25: branch_false: ...to here
bluez-5.85/emulator/serial.c:191:25: danger: use of uninitialized value ‘type’ here
#  189|   	}
#  190|   
#  191|-> 	serial->btdev = btdev_create(type, serial->id);
#  192|   	if (!serial->btdev) {
#  193|   		close(serial->fd);

Error: CPPCHECK_WARNING (CWE-457): [#def135]
bluez-5.85/emulator/serial.c:213: error[legacyUninitvar]: Uninitialized variable: dev_type
#  211|   {
#  212|   	struct serial *serial;
#  213|-> 	enum btdev_type uninitialized_var(dev_type);
#  214|   
#  215|   	serial = malloc(sizeof(*serial));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def136]
bluez-5.85/emulator/server.c:161:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*(struct client *)user_data.pkt_data + (sizetype)*(struct client *)user_data.pkt_len’ where non-null expected
bluez-5.85/emulator/server.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:116:17: branch_false: ...to here
bluez-5.85/emulator/server.c:118:16: branch_true: following ‘true’ branch (when ‘count != 0’)...
bluez-5.85/emulator/server.c:123:22: branch_true: ...to here
bluez-5.85/emulator/server.c:123:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:124:44: branch_true: ...to here
bluez-5.85/emulator/server.c:141:52: acquire_memory: this call could return NULL
bluez-5.85/emulator/server.c:160:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:161:25: branch_true: ...to here
bluez-5.85/emulator/server.c:161:25: danger: argument 1 (‘*(struct client *)user_data.pkt_data + (sizetype)*(struct client *)user_data.pkt_len’) from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#  159|   
#  160|   		if (count >= client->pkt_expect) {
#  161|-> 			memcpy(client->pkt_data + client->pkt_len,
#  162|   						ptr, client->pkt_expect);
#  163|   			ptr += client->pkt_expect;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def137]
bluez-5.85/emulator/server.c:172:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*(struct client *)user_data.pkt_data + (sizetype)*(struct client *)user_data.pkt_len’ where non-null expected
bluez-5.85/emulator/server.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:116:17: branch_false: ...to here
bluez-5.85/emulator/server.c:118:16: branch_true: following ‘true’ branch (when ‘count != 0’)...
bluez-5.85/emulator/server.c:123:22: branch_true: ...to here
bluez-5.85/emulator/server.c:123:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:124:44: branch_true: ...to here
bluez-5.85/emulator/server.c:141:52: acquire_memory: this call could return NULL
bluez-5.85/emulator/server.c:160:20: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:172:25: branch_false: ...to here
bluez-5.85/emulator/server.c:172:25: danger: argument 1 (‘*(struct client *)user_data.pkt_data + (sizetype)*(struct client *)user_data.pkt_len’) from [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#  170|   			client->pkt_data = NULL;
#  171|   		} else {
#  172|-> 			memcpy(client->pkt_data + client->pkt_len, ptr, count);
#  173|   			client->pkt_len += count;
#  174|   			client->pkt_expect -= count;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
bluez-5.85/emulator/server.c:190:17: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:216:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
#  188|   
#  189|   	if (getsockname(fd, (struct sockaddr *) &addr, &len) < 0) {
#  190|-> 		perror("Failed to get socket name");
#  191|   		return -1;
#  192|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def139]
bluez-5.85/emulator/server.c:198:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘((struct server)*(void *)user_data).fd’
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
#  196|   	nfd = accept(fd, (struct sockaddr *) &addr, &len);
#  197|   	if (nfd < 0) {
#  198|-> 		perror("Failed to accept client socket");
#  199|   		return -1;
#  200|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
bluez-5.85/emulator/server.c:198:17: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:216:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
#  196|   	nfd = accept(fd, (struct sockaddr *) &addr, &len);
#  197|   	if (nfd < 0) {
#  198|-> 		perror("Failed to accept client socket");
#  199|   		return -1;
#  200|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def141]
bluez-5.85/emulator/server.c:203:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘((struct server)*(void *)user_data).fd’
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
#  201|   
#  202|   	return nfd;
#  203|-> }
#  204|   
#  205|   static void server_accept_callback(int fd, uint32_t events, void *user_data)

Error: CPPCHECK_WARNING (CWE-457): [#def142]
bluez-5.85/emulator/server.c:209: error[legacyUninitvar]: Uninitialized variable: type
#  207|   	struct server *server = user_data;
#  208|   	struct client *client;
#  209|-> 	enum btdev_type uninitialized_var(type);
#  210|   
#  211|   	if (events & (EPOLLERR | EPOLLHUP)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def143]
bluez-5.85/emulator/server.c:245:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
bluez-5.85/emulator/server.c:222:22: return_function: returning to ‘server_accept_callback’ from ‘accept_client’
bluez-5.85/emulator/server.c:223:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:228:17: branch_false: ...to here
bluez-5.85/emulator/server.c:245:25: throw: if ‘btdev_create’ throws an exception...
bluez-5.85/emulator/server.c:245:25: danger: leaks here
#  243|   	}
#  244|   
#  245|-> 	client->btdev = btdev_create(type, server->id);
#  246|   	if (!client->btdev) {
#  247|   		close(client->fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
bluez-5.85/emulator/server.c:245:25: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:216:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
bluez-5.85/emulator/server.c:222:22: return_function: returning to ‘server_accept_callback’ from ‘accept_client’
bluez-5.85/emulator/server.c:223:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:228:17: branch_false: ...to here
bluez-5.85/emulator/server.c:245:25: throw: if ‘btdev_create’ throws an exception...
bluez-5.85/emulator/server.c:245:25: danger: ‘client’ leaks here; was allocated at [(4)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/3)
#  243|   	}
#  244|   
#  245|-> 	client->btdev = btdev_create(type, server->id);
#  246|   	if (!client->btdev) {
#  247|   		close(client->fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def145]
bluez-5.85/emulator/server.c:247:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
bluez-5.85/emulator/server.c:222:22: return_function: returning to ‘server_accept_callback’ from ‘accept_client’
bluez-5.85/emulator/server.c:223:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:228:17: branch_false: ...to here
bluez-5.85/emulator/server.c:246:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:247:17: branch_true: ...to here
bluez-5.85/emulator/server.c:247:17: throw: if ‘close’ throws an exception...
bluez-5.85/emulator/server.c:247:17: danger: leaks here
#  245|   	client->btdev = btdev_create(type, server->id);
#  246|   	if (!client->btdev) {
#  247|-> 		close(client->fd);
#  248|   		free(client);
#  249|   		return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
bluez-5.85/emulator/server.c:247:17: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:216:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
bluez-5.85/emulator/server.c:222:22: return_function: returning to ‘server_accept_callback’ from ‘accept_client’
bluez-5.85/emulator/server.c:223:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:228:17: branch_false: ...to here
bluez-5.85/emulator/server.c:246:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:247:17: branch_true: ...to here
bluez-5.85/emulator/server.c:247:17: throw: if ‘close’ throws an exception...
bluez-5.85/emulator/server.c:247:17: danger: ‘client’ leaks here; was allocated at [(4)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/3)
#  245|   	client->btdev = btdev_create(type, server->id);
#  246|   	if (!client->btdev) {
#  247|-> 		close(client->fd);
#  248|   		free(client);
#  249|   		return;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def147]
bluez-5.85/emulator/server.c:252:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
bluez-5.85/emulator/server.c:222:22: return_function: returning to ‘server_accept_callback’ from ‘accept_client’
bluez-5.85/emulator/server.c:223:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:228:17: branch_false: ...to here
bluez-5.85/emulator/server.c:246:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:252:9: branch_false: ...to here
bluez-5.85/emulator/server.c:252:9: throw: if ‘btdev_set_send_handler’ throws an exception...
bluez-5.85/emulator/server.c:252:9: danger: leaks here
#  250|   	}
#  251|   
#  252|-> 	btdev_set_send_handler(client->btdev, client_write_callback, client);
#  253|   
#  254|   done:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
bluez-5.85/emulator/server.c:252:9: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:216:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
bluez-5.85/emulator/server.c:222:22: return_function: returning to ‘server_accept_callback’ from ‘accept_client’
bluez-5.85/emulator/server.c:223:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:228:17: branch_false: ...to here
bluez-5.85/emulator/server.c:246:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:252:9: branch_false: ...to here
bluez-5.85/emulator/server.c:252:9: throw: if ‘btdev_set_send_handler’ throws an exception...
bluez-5.85/emulator/server.c:252:9: danger: ‘client’ leaks here; was allocated at [(4)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/3)
#  250|   	}
#  251|   
#  252|-> 	btdev_set_send_handler(client->btdev, client_write_callback, client);
#  253|   
#  254|   done:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def149]
bluez-5.85/emulator/server.c:255:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
bluez-5.85/emulator/server.c:222:22: return_function: returning to ‘server_accept_callback’ from ‘accept_client’
bluez-5.85/emulator/server.c:223:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:228:17: branch_false: ...to here
bluez-5.85/emulator/server.c:255:13: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/emulator/server.c:255:13: danger: leaks here
#  253|   
#  254|   done:
#  255|-> 	if (mainloop_add_fd(client->fd, EPOLLIN, client_read_callback,
#  256|   						client, client_destroy) < 0) {
#  257|   		btdev_destroy(client->btdev);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
bluez-5.85/emulator/server.c:255:13: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
bluez-5.85/emulator/server.c:205:13: enter_function: entry to ‘server_accept_callback’
bluez-5.85/emulator/server.c:211:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:216:18: branch_false: ...to here
bluez-5.85/emulator/server.c:216:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:217:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
bluez-5.85/emulator/server.c:220:9: branch_false: ...to here
bluez-5.85/emulator/server.c:222:22: call_function: calling ‘accept_client’ from ‘server_accept_callback’
bluez-5.85/emulator/server.c:222:22: return_function: returning to ‘server_accept_callback’ from ‘accept_client’
bluez-5.85/emulator/server.c:223:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:228:17: branch_false: ...to here
bluez-5.85/emulator/server.c:255:13: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/emulator/server.c:255:13: danger: ‘client’ leaks here; was allocated at [(4)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/3)
#  253|   
#  254|   done:
#  255|-> 	if (mainloop_add_fd(client->fd, EPOLLIN, client_read_callback,
#  256|   						client, client_destroy) < 0) {
#  257|   		btdev_destroy(client->btdev);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
bluez-5.85/emulator/server.c:272:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:295:16: enter_function: entry to ‘server_open_unix’
bluez-5.85/emulator/server.c:299:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:300:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:300:12: branch_false: ...to here
bluez-5.85/emulator/server.c:307:22: call_function: calling ‘open_unix’ from ‘server_open_unix’
#  270|   	fd = socket(PF_UNIX, SOCK_STREAM, 0);
#  271|   	if (fd < 0) {
#  272|-> 		perror("Failed to open server socket");
#  273|   		return -1;
#  274|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def152]
bluez-5.85/emulator/server.c:281:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/server.c:270:14: acquire_resource: stream socket created here
bluez-5.85/emulator/server.c:271:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/server.c:276:9: branch_false: ...to here
bluez-5.85/emulator/server.c:280:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:281:17: branch_true: ...to here
bluez-5.85/emulator/server.c:281:17: throw: if ‘perror’ throws an exception...
bluez-5.85/emulator/server.c:281:17: danger: ‘fd’ leaks here
#  279|   
#  280|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  281|-> 		perror("Failed to bind server socket");
#  282|   		close(fd);
#  283|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
bluez-5.85/emulator/server.c:281:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:295:16: enter_function: entry to ‘server_open_unix’
bluez-5.85/emulator/server.c:299:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:300:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:300:12: branch_false: ...to here
bluez-5.85/emulator/server.c:307:22: call_function: calling ‘open_unix’ from ‘server_open_unix’
#  279|   
#  280|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  281|-> 		perror("Failed to bind server socket");
#  282|   		close(fd);
#  283|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def154]
bluez-5.85/emulator/server.c:282:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/server.c:270:14: acquire_resource: stream socket created here
bluez-5.85/emulator/server.c:271:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/server.c:276:9: branch_false: ...to here
bluez-5.85/emulator/server.c:280:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:281:17: branch_true: ...to here
bluez-5.85/emulator/server.c:282:17: throw: if ‘close’ throws an exception...
bluez-5.85/emulator/server.c:282:17: danger: ‘fd’ leaks here
#  280|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  281|   		perror("Failed to bind server socket");
#  282|-> 		close(fd);
#  283|   		return -1;
#  284|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
bluez-5.85/emulator/server.c:282:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:295:16: enter_function: entry to ‘server_open_unix’
bluez-5.85/emulator/server.c:299:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:300:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:300:12: branch_false: ...to here
bluez-5.85/emulator/server.c:307:22: call_function: calling ‘open_unix’ from ‘server_open_unix’
#  280|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  281|   		perror("Failed to bind server socket");
#  282|-> 		close(fd);
#  283|   		return -1;
#  284|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def156]
bluez-5.85/emulator/server.c:287:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/server.c:270:14: acquire_resource: stream socket created here
bluez-5.85/emulator/server.c:271:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/server.c:276:9: branch_false: ...to here
bluez-5.85/emulator/server.c:280:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:286:13: branch_false: ...to here
bluez-5.85/emulator/server.c:286:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:287:17: branch_true: ...to here
bluez-5.85/emulator/server.c:287:17: throw: if ‘perror’ throws an exception...
bluez-5.85/emulator/server.c:287:17: danger: ‘fd’ leaks here
#  285|   
#  286|   	if (listen(fd, 5) < 0) {
#  287|-> 		perror("Failed to listen server socket");
#  288|   		close(fd);
#  289|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
bluez-5.85/emulator/server.c:287:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:295:16: enter_function: entry to ‘server_open_unix’
bluez-5.85/emulator/server.c:299:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:300:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:300:12: branch_false: ...to here
bluez-5.85/emulator/server.c:307:22: call_function: calling ‘open_unix’ from ‘server_open_unix’
#  285|   
#  286|   	if (listen(fd, 5) < 0) {
#  287|-> 		perror("Failed to listen server socket");
#  288|   		close(fd);
#  289|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def158]
bluez-5.85/emulator/server.c:288:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/server.c:270:14: acquire_resource: stream socket created here
bluez-5.85/emulator/server.c:271:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/server.c:276:9: branch_false: ...to here
bluez-5.85/emulator/server.c:280:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:286:13: branch_false: ...to here
bluez-5.85/emulator/server.c:286:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:287:17: branch_true: ...to here
bluez-5.85/emulator/server.c:288:17: throw: if ‘close’ throws an exception...
bluez-5.85/emulator/server.c:288:17: danger: ‘fd’ leaks here
#  286|   	if (listen(fd, 5) < 0) {
#  287|   		perror("Failed to listen server socket");
#  288|-> 		close(fd);
#  289|   		return -1;
#  290|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
bluez-5.85/emulator/server.c:288:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:295:16: enter_function: entry to ‘server_open_unix’
bluez-5.85/emulator/server.c:299:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:300:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:300:12: branch_false: ...to here
bluez-5.85/emulator/server.c:307:22: call_function: calling ‘open_unix’ from ‘server_open_unix’
#  286|   	if (listen(fd, 5) < 0) {
#  287|   		perror("Failed to listen server socket");
#  288|-> 		close(fd);
#  289|   		return -1;
#  290|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def160]
bluez-5.85/emulator/server.c:313:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor
bluez-5.85/emulator/server.c:295:16: enter_function: entry to ‘server_open_unix’
bluez-5.85/emulator/server.c:300:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:300:12: branch_false: ...to here
bluez-5.85/emulator/server.c:307:22: call_function: calling ‘open_unix’ from ‘server_open_unix’
bluez-5.85/emulator/server.c:307:22: return_function: returning to ‘server_open_unix’ from ‘open_unix’
bluez-5.85/emulator/server.c:308:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:313:13: branch_false: ...to here
bluez-5.85/emulator/server.c:313:13: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/emulator/server.c:313:13: danger: leaks here
#  311|   	}
#  312|   
#  313|-> 	if (mainloop_add_fd(server->fd, EPOLLIN, server_accept_callback,
#  314|   						server, server_destroy) < 0) {
#  315|   		close(server->fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
bluez-5.85/emulator/server.c:313:13: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:295:16: enter_function: entry to ‘server_open_unix’
bluez-5.85/emulator/server.c:299:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:300:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:300:12: branch_false: ...to here
bluez-5.85/emulator/server.c:307:22: call_function: calling ‘open_unix’ from ‘server_open_unix’
bluez-5.85/emulator/server.c:307:22: return_function: returning to ‘server_open_unix’ from ‘open_unix’
bluez-5.85/emulator/server.c:308:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:313:13: branch_false: ...to here
bluez-5.85/emulator/server.c:313:13: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/emulator/server.c:313:13: danger: ‘server’ leaks here; was allocated at [(2)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/1)
#  311|   	}
#  312|   
#  313|-> 	if (mainloop_add_fd(server->fd, EPOLLIN, server_accept_callback,
#  314|   						server, server_destroy) < 0) {
#  315|   		close(server->fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
bluez-5.85/emulator/server.c:330:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:361:16: enter_function: entry to ‘server_open_tcp’
bluez-5.85/emulator/server.c:365:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:366:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:366:12: branch_false: ...to here
bluez-5.85/emulator/server.c:373:22: call_function: calling ‘open_tcp’ from ‘server_open_tcp’
#  328|   	fd = socket(PF_INET, SOCK_STREAM, 0);
#  329|   	if (fd < 0) {
#  330|-> 		perror("Failed to open server socket");
#  331|   		return -1;
#  332|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
bluez-5.85/emulator/server.c:335:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:361:16: enter_function: entry to ‘server_open_tcp’
bluez-5.85/emulator/server.c:365:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:366:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:366:12: branch_false: ...to here
bluez-5.85/emulator/server.c:373:22: call_function: calling ‘open_tcp’ from ‘server_open_tcp’
#  333|   
#  334|   	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) < 0) {
#  335|-> 		perror("Failed to set socket option");
#  336|   		close(fd);
#  337|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
bluez-5.85/emulator/server.c:336:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:361:16: enter_function: entry to ‘server_open_tcp’
bluez-5.85/emulator/server.c:365:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:366:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:366:12: branch_false: ...to here
bluez-5.85/emulator/server.c:373:22: call_function: calling ‘open_tcp’ from ‘server_open_tcp’
#  334|   	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) < 0) {
#  335|   		perror("Failed to set socket option");
#  336|-> 		close(fd);
#  337|   		return -1;
#  338|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def165]
bluez-5.85/emulator/server.c:347:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/server.c:328:14: acquire_resource: stream socket created here
bluez-5.85/emulator/server.c:329:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/server.c:334:13: branch_false: ...to here
bluez-5.85/emulator/server.c:334:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:340:9: branch_false: ...to here
bluez-5.85/emulator/server.c:346:13: acquire_resource: socket created here
bluez-5.85/emulator/server.c:346:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:347:17: branch_true: ...to here
bluez-5.85/emulator/server.c:347:17: throw: if ‘perror’ throws an exception...
bluez-5.85/emulator/server.c:347:17: danger: ‘fd’ leaks here
#  345|   
#  346|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  347|-> 		perror("Failed to bind server socket");
#  348|   		close(fd);
#  349|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
bluez-5.85/emulator/server.c:347:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:361:16: enter_function: entry to ‘server_open_tcp’
bluez-5.85/emulator/server.c:365:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:366:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:366:12: branch_false: ...to here
bluez-5.85/emulator/server.c:373:22: call_function: calling ‘open_tcp’ from ‘server_open_tcp’
#  345|   
#  346|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  347|-> 		perror("Failed to bind server socket");
#  348|   		close(fd);
#  349|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def167]
bluez-5.85/emulator/server.c:348:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/server.c:328:14: acquire_resource: stream socket created here
bluez-5.85/emulator/server.c:329:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/server.c:334:13: branch_false: ...to here
bluez-5.85/emulator/server.c:334:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:340:9: branch_false: ...to here
bluez-5.85/emulator/server.c:346:13: acquire_resource: socket created here
bluez-5.85/emulator/server.c:346:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:347:17: branch_true: ...to here
bluez-5.85/emulator/server.c:348:17: throw: if ‘close’ throws an exception...
bluez-5.85/emulator/server.c:348:17: danger: ‘fd’ leaks here
#  346|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  347|   		perror("Failed to bind server socket");
#  348|-> 		close(fd);
#  349|   		return -1;
#  350|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
bluez-5.85/emulator/server.c:348:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:361:16: enter_function: entry to ‘server_open_tcp’
bluez-5.85/emulator/server.c:365:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:366:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:366:12: branch_false: ...to here
bluez-5.85/emulator/server.c:373:22: call_function: calling ‘open_tcp’ from ‘server_open_tcp’
#  346|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  347|   		perror("Failed to bind server socket");
#  348|-> 		close(fd);
#  349|   		return -1;
#  350|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def169]
bluez-5.85/emulator/server.c:353:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/server.c:328:14: acquire_resource: stream socket created here
bluez-5.85/emulator/server.c:329:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/server.c:334:13: branch_false: ...to here
bluez-5.85/emulator/server.c:334:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:340:9: branch_false: ...to here
bluez-5.85/emulator/server.c:346:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:352:13: branch_false: ...to here
bluez-5.85/emulator/server.c:352:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:353:17: branch_true: ...to here
bluez-5.85/emulator/server.c:353:17: throw: if ‘perror’ throws an exception...
bluez-5.85/emulator/server.c:353:17: danger: ‘fd’ leaks here
#  351|   
#  352|   	if (listen(fd, 5) < 0) {
#  353|-> 		perror("Failed to listen server socket");
#  354|   		close(fd);
#  355|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
bluez-5.85/emulator/server.c:353:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:361:16: enter_function: entry to ‘server_open_tcp’
bluez-5.85/emulator/server.c:365:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:366:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:366:12: branch_false: ...to here
bluez-5.85/emulator/server.c:373:22: call_function: calling ‘open_tcp’ from ‘server_open_tcp’
#  351|   
#  352|   	if (listen(fd, 5) < 0) {
#  353|-> 		perror("Failed to listen server socket");
#  354|   		close(fd);
#  355|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def171]
bluez-5.85/emulator/server.c:354:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/emulator/server.c:328:14: acquire_resource: stream socket created here
bluez-5.85/emulator/server.c:329:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/emulator/server.c:334:13: branch_false: ...to here
bluez-5.85/emulator/server.c:334:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:340:9: branch_false: ...to here
bluez-5.85/emulator/server.c:346:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/server.c:352:13: branch_false: ...to here
bluez-5.85/emulator/server.c:352:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/server.c:353:17: branch_true: ...to here
bluez-5.85/emulator/server.c:354:17: throw: if ‘close’ throws an exception...
bluez-5.85/emulator/server.c:354:17: danger: ‘fd’ leaks here
#  352|   	if (listen(fd, 5) < 0) {
#  353|   		perror("Failed to listen server socket");
#  354|-> 		close(fd);
#  355|   		return -1;
#  356|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
bluez-5.85/emulator/server.c:354:17: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
bluez-5.85/emulator/server.c:361:16: enter_function: entry to ‘server_open_tcp’
bluez-5.85/emulator/server.c:365:18: acquire_memory: allocated here
bluez-5.85/emulator/server.c:366:12: branch_false: following ‘false’ branch (when ‘server’ is non-NULL)...
bluez-5.85/emulator/server.c:366:12: branch_false: ...to here
bluez-5.85/emulator/server.c:373:22: call_function: calling ‘open_tcp’ from ‘server_open_tcp’
#  352|   	if (listen(fd, 5) < 0) {
#  353|   		perror("Failed to listen server socket");
#  354|-> 		close(fd);
#  355|   		return -1;
#  356|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
bluez-5.85/emulator/smp.c:877:9: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
bluez-5.85/emulator/smp.c:861:16: acquire_memory: allocated here
bluez-5.85/emulator/smp.c:862:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
bluez-5.85/emulator/smp.c:865:9: branch_false: ...to here
bluez-5.85/emulator/smp.c:877:9: throw: if ‘ba2str’ throws an exception...
bluez-5.85/emulator/smp.c:877:9: danger: ‘conn’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  875|   	memcpy(conn->ra, ra, 6);
#  876|   
#  877|-> 	ba2str((bdaddr_t *) ia, ia_str);
#  878|   	ba2str((bdaddr_t *) ra, ra_str);
#  879|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
bluez-5.85/emulator/smp.c:878:9: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
bluez-5.85/emulator/smp.c:861:16: acquire_memory: allocated here
bluez-5.85/emulator/smp.c:862:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
bluez-5.85/emulator/smp.c:865:9: branch_false: ...to here
bluez-5.85/emulator/smp.c:878:9: throw: if ‘ba2str’ throws an exception...
bluez-5.85/emulator/smp.c:878:9: danger: ‘conn’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  876|   
#  877|   	ba2str((bdaddr_t *) ia, ia_str);
#  878|-> 	ba2str((bdaddr_t *) ra, ra_str);
#  879|   
#  880|   	bthost_debug(smp->bthost, "ia %s type 0x%02x ra %s type 0x%02x",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
bluez-5.85/emulator/smp.c:880:9: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
bluez-5.85/emulator/smp.c:861:16: acquire_memory: allocated here
bluez-5.85/emulator/smp.c:862:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
bluez-5.85/emulator/smp.c:865:9: branch_false: ...to here
bluez-5.85/emulator/smp.c:880:9: throw: if ‘bthost_debug’ throws an exception...
bluez-5.85/emulator/smp.c:880:9: danger: ‘conn’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  878|   	ba2str((bdaddr_t *) ra, ra_str);
#  879|   
#  880|-> 	bthost_debug(smp->bthost, "ia %s type 0x%02x ra %s type 0x%02x",
#  881|   					ia_str, ia_type, ra_str, ra_type);
#  882|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
bluez-5.85/emulator/smp.c:883:9: warning[-Wanalyzer-malloc-leak]: leak of ‘conn’
bluez-5.85/emulator/smp.c:861:16: acquire_memory: allocated here
bluez-5.85/emulator/smp.c:862:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
bluez-5.85/emulator/smp.c:865:9: branch_false: ...to here
bluez-5.85/emulator/smp.c:883:9: throw: if ‘bt_crypto_random_bytes’ throws an exception...
bluez-5.85/emulator/smp.c:883:9: danger: ‘conn’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  881|   					ia_str, ia_type, ra_str, ra_type);
#  882|   
#  883|-> 	bt_crypto_random_bytes(smp->crypto, conn->prnd, sizeof(conn->prnd));
#  884|   
#  885|   	return conn;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
bluez-5.85/emulator/smp.c:905:23: warning[-Wanalyzer-malloc-leak]: leak of ‘smp’
bluez-5.85/emulator/smp.c:899:15: acquire_memory: allocated here
bluez-5.85/emulator/smp.c:900:12: branch_false: following ‘false’ branch (when ‘smp’ is non-NULL)...
bluez-5.85/emulator/smp.c:900:12: branch_false: ...to here
bluez-5.85/emulator/smp.c:905:23: throw: if ‘bt_crypto_new’ throws an exception...
bluez-5.85/emulator/smp.c:905:23: danger: ‘smp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  903|   	memset(smp, 0, sizeof(*smp));
#  904|   
#  905|-> 	smp->crypto = bt_crypto_new();
#  906|   	if (!smp->crypto) {
#  907|   		free(smp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
bluez-5.85/emulator/vhci.c:50:9: warning[-Wanalyzer-malloc-leak]: leak of ‘vhci’
bluez-5.85/emulator/vhci.c:103:14: enter_function: entry to ‘vhci_open’
bluez-5.85/emulator/vhci.c:111:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:114:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:117:9: branch_false: following ‘false’ branch (when ‘type != 3’)...
bluez-5.85/emulator/vhci.c:126:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:126:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:131:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:134:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:135:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:140:16: branch_false: ...to here
bluez-5.85/emulator/vhci.c:140:16: acquire_memory: allocated here
bluez-5.85/emulator/vhci.c:141:12: branch_false: following ‘false’ branch (when ‘vhci’ is non-NULL)...
bluez-5.85/emulator/vhci.c:141:12: branch_false: ...to here
bluez-5.85/emulator/vhci.c:154:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/vhci.c:155:17: branch_true: ...to here
bluez-5.85/emulator/vhci.c:155:17: call_function: calling ‘vhci_destroy’ from ‘vhci_open’
#   48|   	struct vhci *vhci = user_data;
#   49|   
#   50|-> 	btdev_destroy(vhci->btdev);
#   51|   	io_destroy(vhci->io);
#   52|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
bluez-5.85/emulator/vhci.c:51:9: warning[-Wanalyzer-malloc-leak]: leak of ‘vhci’
bluez-5.85/emulator/vhci.c:103:14: enter_function: entry to ‘vhci_open’
bluez-5.85/emulator/vhci.c:111:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:114:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:117:9: branch_false: following ‘false’ branch (when ‘type != 3’)...
bluez-5.85/emulator/vhci.c:126:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:126:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:131:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:134:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:135:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:140:16: branch_false: ...to here
bluez-5.85/emulator/vhci.c:140:16: acquire_memory: allocated here
bluez-5.85/emulator/vhci.c:141:12: branch_false: following ‘false’ branch (when ‘vhci’ is non-NULL)...
bluez-5.85/emulator/vhci.c:141:12: branch_false: ...to here
bluez-5.85/emulator/vhci.c:154:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/vhci.c:155:17: branch_true: ...to here
bluez-5.85/emulator/vhci.c:155:17: call_function: calling ‘vhci_destroy’ from ‘vhci_open’
#   49|   
#   50|   	btdev_destroy(vhci->btdev);
#   51|-> 	io_destroy(vhci->io);
#   52|   
#   53|   	free(vhci);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def180]
bluez-5.85/emulator/vhci.c:126:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/vhci", 2050)’
bluez-5.85/emulator/vhci.c:110:14: acquire_resource: opened here
bluez-5.85/emulator/vhci.c:111:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:114:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:117:9: branch_false: following ‘false’ branch (when ‘type != 3’)...
bluez-5.85/emulator/vhci.c:126:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:126:13: throw: if ‘write’ throws an exception...
bluez-5.85/emulator/vhci.c:126:13: danger: ‘open("/dev/vhci", 2050)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  124|   	}
#  125|   
#  126|-> 	if (write(fd, &req, sizeof(req)) != sizeof(req)) {
#  127|   		close(fd);
#  128|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def181]
bluez-5.85/emulator/vhci.c:127:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/vhci", 2050)’
bluez-5.85/emulator/vhci.c:110:14: acquire_resource: opened here
bluez-5.85/emulator/vhci.c:111:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:114:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:117:9: branch_false: following ‘false’ branch (when ‘type != 3’)...
bluez-5.85/emulator/vhci.c:126:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:126:12: branch_true: following ‘true’ branch...
bluez-5.85/emulator/vhci.c:127:17: branch_true: ...to here
bluez-5.85/emulator/vhci.c:127:17: danger: ‘open("/dev/vhci", 2050)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  125|   
#  126|   	if (write(fd, &req, sizeof(req)) != sizeof(req)) {
#  127|-> 		close(fd);
#  128|   		return NULL;
#  129|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def182]
bluez-5.85/emulator/vhci.c:134:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/vhci", 2050)’
bluez-5.85/emulator/vhci.c:110:14: acquire_resource: opened here
bluez-5.85/emulator/vhci.c:111:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:114:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:117:9: branch_false: following ‘false’ branch (when ‘type != 3’)...
bluez-5.85/emulator/vhci.c:126:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:126:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:131:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:134:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:135:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:140:16: branch_false: ...to here
bluez-5.85/emulator/vhci.c:141:12: branch_true: following ‘true’ branch (when ‘vhci’ is NULL)...
bluez-5.85/emulator/vhci.c:142:17: branch_true: ...to here
bluez-5.85/emulator/vhci.c:134:25: danger: ‘open("/dev/vhci", 2050)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  132|   
#  133|   	if (read(fd, &rsp, sizeof(rsp)) != sizeof(rsp) ||
#  134|-> 			rsp.pkt_type != HCI_VENDOR_PKT ||
#  135|   			rsp.opcode != req.opcode) {
#  136|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def183]
bluez-5.85/emulator/vhci.c:136:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/vhci", 2050)’
bluez-5.85/emulator/vhci.c:110:14: acquire_resource: opened here
bluez-5.85/emulator/vhci.c:111:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:114:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:117:9: branch_false: following ‘false’ branch (when ‘type != 3’)...
bluez-5.85/emulator/vhci.c:126:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:126:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:131:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:136:17: danger: ‘open("/dev/vhci", 2050)’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  134|   			rsp.pkt_type != HCI_VENDOR_PKT ||
#  135|   			rsp.opcode != req.opcode) {
#  136|-> 		close(fd);
#  137|   		return NULL;
#  138|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
bluez-5.85/emulator/vhci.c:149:20: warning[-Wanalyzer-malloc-leak]: leak of ‘vhci’
bluez-5.85/emulator/vhci.c:111:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:114:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:117:9: branch_false: following ‘false’ branch (when ‘type != 3’)...
bluez-5.85/emulator/vhci.c:126:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:126:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:131:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:134:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:135:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:140:16: branch_false: ...to here
bluez-5.85/emulator/vhci.c:140:16: acquire_memory: allocated here
bluez-5.85/emulator/vhci.c:141:12: branch_false: following ‘false’ branch (when ‘vhci’ is non-NULL)...
bluez-5.85/emulator/vhci.c:141:12: branch_false: ...to here
bluez-5.85/emulator/vhci.c:149:20: throw: if ‘io_new’ throws an exception...
bluez-5.85/emulator/vhci.c:149:20: danger: ‘vhci’ leaks here; was allocated at [(13)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/12)
#  147|   	vhci->type = type;
#  148|   	vhci->index = rsp.index;
#  149|-> 	vhci->io = io_new(fd);
#  150|   
#  151|   	io_set_close_on_destroy(vhci->io, true);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
bluez-5.85/emulator/vhci.c:151:9: warning[-Wanalyzer-malloc-leak]: leak of ‘vhci’
bluez-5.85/emulator/vhci.c:111:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:114:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:117:9: branch_false: following ‘false’ branch (when ‘type != 3’)...
bluez-5.85/emulator/vhci.c:126:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:126:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:131:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:134:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:135:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:140:16: branch_false: ...to here
bluez-5.85/emulator/vhci.c:140:16: acquire_memory: allocated here
bluez-5.85/emulator/vhci.c:141:12: branch_false: following ‘false’ branch (when ‘vhci’ is non-NULL)...
bluez-5.85/emulator/vhci.c:141:12: branch_false: ...to here
bluez-5.85/emulator/vhci.c:151:9: throw: if ‘io_set_close_on_destroy’ throws an exception...
bluez-5.85/emulator/vhci.c:151:9: danger: ‘vhci’ leaks here; was allocated at [(13)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/12)
#  149|   	vhci->io = io_new(fd);
#  150|   
#  151|-> 	io_set_close_on_destroy(vhci->io, true);
#  152|   
#  153|   	vhci->btdev = btdev_create(type, rsp.index);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
bluez-5.85/emulator/vhci.c:153:23: warning[-Wanalyzer-malloc-leak]: leak of ‘vhci’
bluez-5.85/emulator/vhci.c:111:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:114:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:117:9: branch_false: following ‘false’ branch (when ‘type != 3’)...
bluez-5.85/emulator/vhci.c:126:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:126:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:131:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:134:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:135:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:140:16: branch_false: ...to here
bluez-5.85/emulator/vhci.c:140:16: acquire_memory: allocated here
bluez-5.85/emulator/vhci.c:141:12: branch_false: following ‘false’ branch (when ‘vhci’ is non-NULL)...
bluez-5.85/emulator/vhci.c:141:12: branch_false: ...to here
bluez-5.85/emulator/vhci.c:153:23: throw: if ‘btdev_create’ throws an exception...
bluez-5.85/emulator/vhci.c:153:23: danger: ‘vhci’ leaks here; was allocated at [(13)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/12)
#  151|   	io_set_close_on_destroy(vhci->io, true);
#  152|   
#  153|-> 	vhci->btdev = btdev_create(type, rsp.index);
#  154|   	if (!vhci->btdev) {
#  155|   		vhci_destroy(vhci);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
bluez-5.85/emulator/vhci.c:159:9: warning[-Wanalyzer-malloc-leak]: leak of ‘vhci’
bluez-5.85/emulator/vhci.c:111:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:114:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:117:9: branch_false: following ‘false’ branch (when ‘type != 3’)...
bluez-5.85/emulator/vhci.c:126:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:126:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:131:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:134:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:135:25: branch_false: ...to here
bluez-5.85/emulator/vhci.c:133:13: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:140:16: branch_false: ...to here
bluez-5.85/emulator/vhci.c:140:16: acquire_memory: allocated here
bluez-5.85/emulator/vhci.c:141:12: branch_false: following ‘false’ branch (when ‘vhci’ is non-NULL)...
bluez-5.85/emulator/vhci.c:141:12: branch_false: ...to here
bluez-5.85/emulator/vhci.c:154:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:159:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:159:9: throw: if ‘btdev_set_send_handler’ throws an exception...
bluez-5.85/emulator/vhci.c:159:9: danger: ‘vhci’ leaks here; was allocated at [(13)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/12)
#  157|   	}
#  158|   
#  159|-> 	btdev_set_send_handler(vhci->btdev, vhci_write_callback, vhci);
#  160|   
#  161|   	if (!io_set_read_handler(vhci->io, vhci_read_callback, vhci, NULL)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def188]
bluez-5.85/emulator/vhci.c:211:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 2)’
bluez-5.85/emulator/vhci.c:201:12: branch_false: following ‘false’ branch (when ‘vhci’ is non-NULL)...
bluez-5.85/emulator/vhci.c:204:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:207:14: acquire_resource: opened here
bluez-5.85/emulator/vhci.c:208:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:211:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:211:13: throw: if ‘write’ throws an exception...
bluez-5.85/emulator/vhci.c:211:13: danger: ‘open(&path, 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  209|   		return -errno;
#  210|   
#  211|-> 	n = write(fd, data, len);
#  212|   	if (n == len)
#  213|   		err = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def189]
bluez-5.85/emulator/vhci.c:217:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 2)’
bluez-5.85/emulator/vhci.c:201:12: branch_false: following ‘false’ branch (when ‘vhci’ is non-NULL)...
bluez-5.85/emulator/vhci.c:204:9: branch_false: ...to here
bluez-5.85/emulator/vhci.c:207:14: acquire_resource: opened here
bluez-5.85/emulator/vhci.c:208:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:211:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:217:9: danger: ‘open(&path, 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  215|   		err = -errno;
#  216|   
#  217|-> 	close(fd);
#  218|   
#  219|   	return err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
bluez-5.85/emulator/vhci.c:295:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/sys/class/devcoredump")’
bluez-5.85/emulator/vhci.c:291:15: acquire_memory: allocated here
bluez-5.85/emulator/vhci.c:292:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:292:12: branch_false: ...to here
bluez-5.85/emulator/vhci.c:295:25: throw: if ‘readdir’ throws an exception...
bluez-5.85/emulator/vhci.c:295:25: danger: ‘opendir("/sys/class/devcoredump")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  293|   		return -errno;
#  294|   
#  295|-> 	while ((entry = readdir(dir)) != NULL) {
#  296|   		if (strstr(entry->d_name, "devcd"))
#  297|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def191]
bluez-5.85/emulator/vhci.c:321:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&filename, 2)’
bluez-5.85/emulator/vhci.c:292:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:292:12: branch_false: ...to here
bluez-5.85/emulator/vhci.c:295:16: branch_true: following ‘true’ branch...
bluez-5.85/emulator/vhci.c:296:21: branch_true: ...to here
bluez-5.85/emulator/vhci.c:296:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/vhci.c:300:12: branch_true: ...to here
bluez-5.85/emulator/vhci.c:300:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:305:52: branch_false: ...to here
bluez-5.85/emulator/vhci.c:306:15: acquire_resource: opened here
bluez-5.85/emulator/vhci.c:307:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:312:15: branch_false: ...to here
bluez-5.85/emulator/vhci.c:313:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
bluez-5.85/emulator/vhci.c:321:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:321:13: throw: if ‘write’ throws an exception...
bluez-5.85/emulator/vhci.c:321:13: danger: ‘open(&filename, 2)’ leaks here; was opened at [(10)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/9)
#  319|   	 * cleanup.
#  320|   	 */
#  321|-> 	if (write(fd, "0", 1) < 0) {
#  322|   		ret = -errno;
#  323|   		goto close_file;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def192]
bluez-5.85/emulator/vhci.c:327:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&filename, 2)’
bluez-5.85/emulator/vhci.c:292:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:292:12: branch_false: ...to here
bluez-5.85/emulator/vhci.c:295:16: branch_true: following ‘true’ branch...
bluez-5.85/emulator/vhci.c:296:21: branch_true: ...to here
bluez-5.85/emulator/vhci.c:296:20: branch_true: following ‘true’ branch...
bluez-5.85/emulator/vhci.c:300:12: branch_true: ...to here
bluez-5.85/emulator/vhci.c:300:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:305:52: branch_false: ...to here
bluez-5.85/emulator/vhci.c:306:15: acquire_resource: opened here
bluez-5.85/emulator/vhci.c:307:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:312:15: branch_false: ...to here
bluez-5.85/emulator/vhci.c:313:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
bluez-5.85/emulator/vhci.c:321:13: branch_false: ...to here
bluez-5.85/emulator/vhci.c:321:12: branch_false: following ‘false’ branch...
bluez-5.85/emulator/vhci.c:326:1: branch_false: ...to here
bluez-5.85/emulator/vhci.c:327:9: danger: ‘open(&filename, 2)’ leaks here; was opened at [(10)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/9)
#  325|   
#  326|   close_file:
#  327|-> 	close(fd);
#  328|   
#  329|   close_dir:

Error: GCC_ANALYZER_WARNING (CWE-688): [#def193]
bluez-5.85/gdbus/client.c:493:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
bluez-5.85/gdbus/client.c:1204:13: enter_function: entry to 'parse_interfaces'
bluez-5.85/gdbus/client.c:1214:16: branch_true: following 'true' branch...
bluez-5.85/gdbus/client.c:1218:17: branch_true: ...to here
bluez-5.85/gdbus/client.c:1220:20: branch_false: following 'false' branch...
bluez-5.85/gdbus/client.c:1223:17: branch_false: ...to here
bluez-5.85/gdbus/client.c:1226:17: call_function: calling 'parse_properties' from 'parse_interfaces'
#  491|   			(*index)++;
#  492|   
#  493|-> 		if (g_str_equal(proxy_iface, interface) == TRUE &&
#  494|   			g_str_equal(proxy_path, path) == TRUE)
#  495|   			return proxy;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def194]
bluez-5.85/gdbus/object.c:1405:14: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/gdbus/object.c:1750:10: enter_function: entry to 'g_dbus_emit_signal'
bluez-5.85/gdbus/object.c:1757:9: acquire_resource: 'va_start' called here
bluez-5.85/gdbus/object.c:1759:18: call_function: calling 'g_dbus_emit_signal_valist' from 'g_dbus_emit_signal'
# 1403|   
# 1404|   	*args = NULL;
# 1405|-> 	if (!dbus_connection_get_object_path_data(conn, path,
# 1406|   					(void *) &data) || data == NULL) {
# 1407|   		error("dbus_connection_emit_signal: path %s isn't registered",

Error: GCC_ANALYZER_WARNING (CWE-404): [#def195]
bluez-5.85/gdbus/object.c:1424:43: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/gdbus/object.c:1750:10: enter_function: entry to 'g_dbus_emit_signal'
bluez-5.85/gdbus/object.c:1757:9: acquire_resource: 'va_start' called here
bluez-5.85/gdbus/object.c:1759:18: call_function: calling 'g_dbus_emit_signal_valist' from 'g_dbus_emit_signal'
# 1422|   
# 1423|   		if (signal->flags & G_DBUS_SIGNAL_FLAG_EXPERIMENTAL) {
# 1424|-> 			const char *env = g_getenv("GDBUS_EXPERIMENTAL");
# 1425|   			if (g_strcmp0(env, "1") != 0)
# 1426|   				break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def196]
bluez-5.85/gdbus/object.c:1425:29: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/gdbus/object.c:1750:10: enter_function: entry to 'g_dbus_emit_signal'
bluez-5.85/gdbus/object.c:1757:9: acquire_resource: 'va_start' called here
bluez-5.85/gdbus/object.c:1759:18: call_function: calling 'g_dbus_emit_signal_valist' from 'g_dbus_emit_signal'
# 1423|   		if (signal->flags & G_DBUS_SIGNAL_FLAG_EXPERIMENTAL) {
# 1424|   			const char *env = g_getenv("GDBUS_EXPERIMENTAL");
# 1425|-> 			if (g_strcmp0(env, "1") != 0)
# 1426|   				break;
# 1427|   		}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def197]
bluez-5.85/gdbus/object.c:1533:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/gdbus/object.c:1707:10: enter_function: entry to 'g_dbus_send_error'
bluez-5.85/gdbus/object.c:1713:9: acquire_resource: 'va_start' called here
bluez-5.85/gdbus/object.c:1715:18: call_function: calling 'g_dbus_send_error_valist' from 'g_dbus_send_error'
# 1531|   
# 1532|   	/* Check if the message can be replied */
# 1533|-> 	if (dbus_message_get_no_reply(message))
# 1534|   		return NULL;
# 1535|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def198]
bluez-5.85/gdbus/object.c:1541:16: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/gdbus/object.c:1707:10: enter_function: entry to 'g_dbus_send_error'
bluez-5.85/gdbus/object.c:1713:9: acquire_resource: 'va_start' called here
bluez-5.85/gdbus/object.c:1715:18: call_function: calling 'g_dbus_send_error_valist' from 'g_dbus_send_error'
# 1539|   		str[0] = '\0';
# 1540|   
# 1541|-> 	return dbus_message_new_error(message, name, str);
# 1542|   }
# 1543|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def199]
bluez-5.85/gdbus/object.c:1565:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/gdbus/object.c:1735:10: enter_function: entry to 'g_dbus_send_reply'
bluez-5.85/gdbus/object.c:1741:9: acquire_resource: 'va_start' called here
bluez-5.85/gdbus/object.c:1743:18: call_function: calling 'g_dbus_send_reply_valist' from 'g_dbus_send_reply'
# 1563|   
# 1564|   	/* Check if the message can be replied */
# 1565|-> 	if (dbus_message_get_no_reply(message))
# 1566|   		return NULL;
# 1567|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def200]
bluez-5.85/gdbus/object.c:1568:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/gdbus/object.c:1735:10: enter_function: entry to 'g_dbus_send_reply'
bluez-5.85/gdbus/object.c:1741:9: acquire_resource: 'va_start' called here
bluez-5.85/gdbus/object.c:1743:18: call_function: calling 'g_dbus_send_reply_valist' from 'g_dbus_send_reply'
# 1566|   		return NULL;
# 1567|   
# 1568|-> 	reply = dbus_message_new_method_return(message);
# 1569|   	if (reply == NULL)
# 1570|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def201]
bluez-5.85/gdbus/object.c:1572:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/gdbus/object.c:1735:10: enter_function: entry to 'g_dbus_send_reply'
bluez-5.85/gdbus/object.c:1741:9: acquire_resource: 'va_start' called here
bluez-5.85/gdbus/object.c:1743:18: call_function: calling 'g_dbus_send_reply_valist' from 'g_dbus_send_reply'
# 1570|   		return NULL;
# 1571|   
# 1572|-> 	if (dbus_message_append_args_valist(reply, type, args) == FALSE) {
# 1573|   		dbus_message_unref(reply);
# 1574|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def202]
bluez-5.85/gdbus/object.c:1778:18: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/gdbus/object.c:1750:10: enter_function: entry to 'g_dbus_emit_signal'
bluez-5.85/gdbus/object.c:1757:9: acquire_resource: 'va_start' called here
bluez-5.85/gdbus/object.c:1759:18: call_function: calling 'g_dbus_emit_signal_valist' from 'g_dbus_emit_signal'
# 1776|   		return FALSE;
# 1777|   
# 1778|-> 	signal = dbus_message_new_signal(path, interface, name);
# 1779|   	if (signal == NULL) {
# 1780|   		error("Unable to allocate new %s.%s signal", interface,  name);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def203]
bluez-5.85/gdbus/object.c:1784:15: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/gdbus/object.c:1750:10: enter_function: entry to 'g_dbus_emit_signal'
bluez-5.85/gdbus/object.c:1757:9: acquire_resource: 'va_start' called here
bluez-5.85/gdbus/object.c:1759:18: call_function: calling 'g_dbus_emit_signal_valist' from 'g_dbus_emit_signal'
# 1782|   	}
# 1783|   
# 1784|-> 	ret = dbus_message_append_args_valist(signal, type, args);
# 1785|   	if (!ret)
# 1786|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-131): [#def204]
bluez-5.85/gobex/gobex-apparam.c:43:15: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
bluez-5.85/gobex/gobex-apparam.c:174:15: enter_function: entry to ‘g_obex_apparam_set_uint8’
bluez-5.85/gobex/gobex-apparam.c:179:16: call_function: calling ‘g_obex_apparam_set_bytes’ from ‘g_obex_apparam_set_uint8’
#   41|   	struct apparam_tag *tag;
#   42|   
#   43|-> 	tag = g_malloc0(2 + len);
#   44|   	tag->id = id;
#   45|   	tag->len = len;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def205]
bluez-5.85/gobex/gobex-header.c:95:9: warning[-Wanalyzer-null-argument]: use of NULL ‘utf16’ where non-null expected
bluez-5.85/gobex/gobex-header.c:105:8: enter_function: entry to ‘g_obex_header_encode’
bluez-5.85/gobex/gobex-header.c:116:12: branch_false: following ‘false’ branch...
bluez-5.85/gobex/gobex-header.c:119:15: call_function: inlined call to ‘put_bytes’ from ‘g_obex_header_encode’
bluez-5.85/gobex/gobex-header.c:123:29: call_function: calling ‘utf8_to_utf16’ from ‘g_obex_header_encode’
bluez-5.85/gobex/gobex-header.c:123:29: return_function: returning to ‘g_obex_header_encode’ from ‘utf8_to_utf16’
bluez-5.85/gobex/gobex-header.c:124:20: branch_false: following ‘false’ branch...
bluez-5.85/gobex/gobex-header.c:129:17: release_memory: ‘utf16’ is NULL
bluez-5.85/gobex/gobex-header.c:129:17: call_function: inlined call to ‘put_bytes’ from ‘g_obex_header_encode’
#   93|   static guint8 *put_bytes(guint8 *to, const void *from, gsize count)
#   94|   {
#   95|-> 	memcpy(to, from, count);
#   96|   	return (to + count);
#   97|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def206]
bluez-5.85/gobex/gobex-header.c:563:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hdr’
bluez-5.85/gobex/gobex-header.c:523:9: enter_function: entry to ‘g_obex_header_create_list’
bluez-5.85/gobex/gobex-header.c:533:16: branch_true: following ‘true’ branch (when ‘id != 0’)...
bluez-5.85/gobex/gobex-header.c:540:25: branch_true: ...to here
bluez-5.85/gobex/gobex-header.c:543:31: call_function: calling ‘g_obex_header_new_unicode’ from ‘g_obex_header_create_list’
bluez-5.85/gobex/gobex-header.c:543:31: return_function: returning to ‘g_obex_header_create_list’ from ‘g_obex_header_new_unicode’
bluez-5.85/gobex/gobex-header.c:563:31: danger: dereference of NULL ‘hdr’
#  561|   
#  562|   		l = g_slist_append(l, hdr);
#  563|-> 		*total_len += hdr->hlen;
#  564|   		id = va_arg(args, int);
#  565|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def207]
bluez-5.85/gobex/gobex-packet.c:223:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-packet.c:236:14: enter_function: entry to ‘g_obex_packet_new’
bluez-5.85/gobex/gobex-packet.c:244:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-packet.c:245:15: call_function: calling ‘g_obex_packet_new_valist’ from ‘g_obex_packet_new’
#  221|   	GObexPacket *pkt;
#  222|   
#  223|-> 	g_obex_debug(G_OBEX_DEBUG_PACKET, "opcode 0x%02x", opcode);
#  224|   
#  225|   	pkt = g_new0(GObexPacket, 1);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def208]
bluez-5.85/gobex/gobex-packet.c:225:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-packet.c:236:14: enter_function: entry to ‘g_obex_packet_new’
bluez-5.85/gobex/gobex-packet.c:244:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-packet.c:245:15: call_function: calling ‘g_obex_packet_new_valist’ from ‘g_obex_packet_new’
#  223|   	g_obex_debug(G_OBEX_DEBUG_PACKET, "opcode 0x%02x", opcode);
#  224|   
#  225|-> 	pkt = g_new0(GObexPacket, 1);
#  226|   
#  227|   	pkt->opcode = opcode;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def209]
bluez-5.85/gobex/gobex-transfer.c:299:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-transfer.c:298:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-transfer.c:299:15: throw: if ‘g_obex_packet_new_valist’ throws an exception...
bluez-5.85/gobex/gobex-transfer.c:299:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  297|   
#  298|   	va_start(args, first_hdr_id);
#  299|-> 	req = g_obex_packet_new_valist(G_OBEX_OP_PUT, FALSE,
#  300|   							first_hdr_id, args);
#  301|   	va_end(args);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def210]
bluez-5.85/gobex/gobex-transfer.c:332:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-transfer.c:406:7: enter_function: entry to ‘g_obex_put_rsp’
bluez-5.85/gobex/gobex-transfer.c:420:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-transfer.c:421:9: call_function: calling ‘transfer_put_req_first’ from ‘g_obex_put_rsp’
#  330|   	gsize len;
#  331|   
#  332|-> 	g_obex_debug(G_OBEX_DEBUG_TRANSFER, "transfer %u", transfer->id);
#  333|   
#  334|   	g_obex_packet_get_operation(req, &final);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def211]
bluez-5.85/gobex/gobex-transfer.c:334:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-transfer.c:406:7: enter_function: entry to ‘g_obex_put_rsp’
bluez-5.85/gobex/gobex-transfer.c:420:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-transfer.c:421:9: call_function: calling ‘transfer_put_req_first’ from ‘g_obex_put_rsp’
#  332|   	g_obex_debug(G_OBEX_DEBUG_TRANSFER, "transfer %u", transfer->id);
#  333|   
#  334|-> 	g_obex_packet_get_operation(req, &final);
#  335|   	if (final)
#  336|   		rsp = G_OBEX_RSP_SUCCESS;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def212]
bluez-5.85/gobex/gobex-transfer.c:340:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-transfer.c:406:7: enter_function: entry to ‘g_obex_put_rsp’
bluez-5.85/gobex/gobex-transfer.c:420:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-transfer.c:421:9: call_function: calling ‘transfer_put_req_first’ from ‘g_obex_put_rsp’
#  338|   		rsp = G_OBEX_RSP_CONTINUE;
#  339|   
#  340|-> 	body = g_obex_packet_get_body(req);
#  341|   	if (body == NULL)
#  342|   		return rsp;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def213]
bluez-5.85/gobex/gobex-transfer.c:344:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-transfer.c:406:7: enter_function: entry to ‘g_obex_put_rsp’
bluez-5.85/gobex/gobex-transfer.c:420:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-transfer.c:421:9: call_function: calling ‘transfer_put_req_first’ from ‘g_obex_put_rsp’
#  342|   		return rsp;
#  343|   
#  344|-> 	g_obex_header_get_bytes(body, &buf, &len);
#  345|   	if (len == 0)
#  346|   		return rsp;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def214]
bluez-5.85/gobex/gobex-transfer.c:348:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-transfer.c:406:7: enter_function: entry to ‘g_obex_put_rsp’
bluez-5.85/gobex/gobex-transfer.c:420:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-transfer.c:421:9: call_function: calling ‘transfer_put_req_first’ from ‘g_obex_put_rsp’
#  346|   		return rsp;
#  347|   
#  348|-> 	if (transfer->data_consumer(buf, len, transfer->user_data) == FALSE)
#  349|   		rsp = G_OBEX_RSP_FORBIDDEN;
#  350|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def215]
bluez-5.85/gobex/gobex-transfer.c:361:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-transfer.c:406:7: enter_function: entry to ‘g_obex_put_rsp’
bluez-5.85/gobex/gobex-transfer.c:420:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-transfer.c:421:9: call_function: calling ‘transfer_put_req_first’ from ‘g_obex_put_rsp’
#  359|   	guint8 rspcode;
#  360|   
#  361|-> 	g_obex_debug(G_OBEX_DEBUG_TRANSFER, "transfer %u", transfer->id);
#  362|   
#  363|   	rspcode = put_get_bytes(transfer, req);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def216]
bluez-5.85/gobex/gobex-transfer.c:365:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-transfer.c:406:7: enter_function: entry to ‘g_obex_put_rsp’
bluez-5.85/gobex/gobex-transfer.c:420:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-transfer.c:421:9: call_function: calling ‘transfer_put_req_first’ from ‘g_obex_put_rsp’
#  363|   	rspcode = put_get_bytes(transfer, req);
#  364|   
#  365|-> 	rsp = g_obex_packet_new_valist(rspcode, TRUE, first_hdr_id, args);
#  366|   
#  367|   	if (!g_obex_send(transfer->obex, rsp, &err)) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def217]
bluez-5.85/gobex/gobex-transfer.c:478:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-transfer.c:477:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-transfer.c:478:15: throw: if ‘g_obex_packet_new_valist’ throws an exception...
bluez-5.85/gobex/gobex-transfer.c:478:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  476|   
#  477|   	va_start(args, first_hdr_id);
#  478|-> 	req = g_obex_packet_new_valist(G_OBEX_OP_GET, TRUE,
#  479|   							first_hdr_id, args);
#  480|   	va_end(args);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def218]
bluez-5.85/gobex/gobex-transfer.c:620:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex-transfer.c:619:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex-transfer.c:620:15: throw: if ‘g_obex_packet_new_valist’ throws an exception...
bluez-5.85/gobex/gobex-transfer.c:620:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  618|   
#  619|   	va_start(args, first_hdr_id);
#  620|-> 	rsp = g_obex_packet_new_valist(G_OBEX_RSP_CONTINUE, TRUE,
#  621|   							first_hdr_id, args);
#  622|   	va_end(args);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def219]
bluez-5.85/gobex/gobex.c:1588:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/gobex/gobex.c:1587:9: acquire_resource: ‘va_start’ called here
bluez-5.85/gobex/gobex.c:1588:15: throw: if ‘g_obex_packet_new_valist’ throws an exception...
bluez-5.85/gobex/gobex.c:1588:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1586|   
# 1587|   	va_start(args, first_hdr_id);
# 1588|-> 	req = g_obex_packet_new_valist(G_OBEX_OP_CONNECT, TRUE,
# 1589|   							first_hdr_id, args);
# 1590|   	va_end(args);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def220]
bluez-5.85/lib/bluetooth/hci.c:895:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sk'
bluez-5.85/lib/bluetooth/hci.c:924:5: enter_function: entry to 'hci_get_route'
bluez-5.85/lib/bluetooth/hci.c:931:26: call_function: calling 'hci_for_each_dev' from 'hci_get_route'
#  893|   
#  894|   done:
#  895|-> 	close(sk);
#  896|   	errno = err;
#  897|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
bluez-5.85/lib/bluetooth/sdp.c:350:25: warning[-Wanalyzer-malloc-leak]: leak of 'dtds'
bluez-5.85/lib/bluetooth/sdp.c:4956:6: enter_function: entry to 'sdp_add_lang_attr'
bluez-5.85/lib/bluetooth/sdp.c:4965:17: call_function: calling 'sdp_list_append' from 'sdp_add_lang_attr'
bluez-5.85/lib/bluetooth/sdp.c:4965:17: return_function: returning to 'sdp_add_lang_attr' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4966:9: call_function: calling 'sdp_set_lang_attr' from 'sdp_add_lang_attr'
#  348|   {
#  349|   	sdp_data_t *seq;
#  350|-> 	sdp_data_t *d = bt_malloc0(sizeof(sdp_data_t));
#  351|   
#  352|   	if (!d)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
bluez-5.85/lib/bluetooth/sdp.c:350:25: warning[-Wanalyzer-malloc-leak]: leak of 'lengths'
bluez-5.85/lib/bluetooth/sdp.c:4800:5: enter_function: entry to 'sdp_set_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4809:12: branch_false: following 'false' branch (when 'seqDTDs' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4811:19: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4812:12: branch_false: following 'false' branch (when 'seqVals' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4812:12: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4817:29: branch_true: following 'true' branch (when 'p' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4822:37: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4822:24: call_function: inlined call to 'sdp_list_len' from 'sdp_set_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4823:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4824:20: branch_false: following 'false' branch (when 'dtds' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4826:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4827:20: branch_false: following 'false' branch (when 'vals' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4831:34: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4831:27: acquire_memory: allocated here
bluez-5.85/lib/bluetooth/sdp.c:4832:20: branch_false: following 'false' branch (when 'lengths' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4832:20: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4837:42: branch_false: following 'false' branch (when 'r' is NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4863:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4863:24: call_function: calling 'sdp_seq_alloc_with_length' from 'sdp_set_supp_feat'
#  348|   {
#  349|   	sdp_data_t *seq;
#  350|-> 	sdp_data_t *d = bt_malloc0(sizeof(sdp_data_t));
#  351|   
#  352|   	if (!d)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
bluez-5.85/lib/bluetooth/sdp.c:350:25: warning[-Wanalyzer-malloc-leak]: leak of 'reqbuf'
bluez-5.85/lib/bluetooth/sdp.c:3572:15: enter_function: entry to 'sdp_service_attr_req'
bluez-5.85/lib/bluetooth/sdp.c:3588:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:3593:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:3595:18: acquire_memory: allocated here
bluez-5.85/lib/bluetooth/sdp.c:3597:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:3602:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:3618:18: call_function: inlined call to 'gen_attridseq_pdu' from 'sdp_service_attr_req'
#  348|   {
#  349|   	sdp_data_t *seq;
#  350|-> 	sdp_data_t *d = bt_malloc0(sizeof(sdp_data_t));
#  351|   
#  352|   	if (!d)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
bluez-5.85/lib/bluetooth/sdp.c:350:25: warning[-Wanalyzer-malloc-leak]: leak of 'rspbuf'
bluez-5.85/lib/bluetooth/sdp.c:3572:15: enter_function: entry to 'sdp_service_attr_req'
bluez-5.85/lib/bluetooth/sdp.c:3588:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:3593:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:3596:18: acquire_memory: allocated here
bluez-5.85/lib/bluetooth/sdp.c:3597:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:3602:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:3618:18: call_function: inlined call to 'gen_attridseq_pdu' from 'sdp_service_attr_req'
#  348|   {
#  349|   	sdp_data_t *seq;
#  350|-> 	sdp_data_t *d = bt_malloc0(sizeof(sdp_data_t));
#  351|   
#  352|   	if (!d)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
bluez-5.85/lib/bluetooth/sdp.c:350:25: warning[-Wanalyzer-malloc-leak]: leak of 'seqDTDs'
bluez-5.85/lib/bluetooth/sdp.c:4800:5: enter_function: entry to 'sdp_set_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4808:19: acquire_memory: allocated here
bluez-5.85/lib/bluetooth/sdp.c:4809:12: branch_false: following 'false' branch (when 'seqDTDs' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4811:19: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4812:12: branch_false: following 'false' branch (when 'seqVals' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4812:12: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4872:20: call_function: calling 'sdp_seq_alloc' from 'sdp_set_supp_feat'
#  348|   {
#  349|   	sdp_data_t *seq;
#  350|-> 	sdp_data_t *d = bt_malloc0(sizeof(sdp_data_t));
#  351|   
#  352|   	if (!d)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
bluez-5.85/lib/bluetooth/sdp.c:350:25: warning[-Wanalyzer-malloc-leak]: leak of 'seqVals'
bluez-5.85/lib/bluetooth/sdp.c:4800:5: enter_function: entry to 'sdp_set_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4809:12: branch_false: following 'false' branch (when 'seqDTDs' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4811:19: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4811:19: acquire_memory: allocated here
bluez-5.85/lib/bluetooth/sdp.c:4812:12: branch_false: following 'false' branch (when 'seqVals' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4812:12: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4872:20: call_function: calling 'sdp_seq_alloc' from 'sdp_set_supp_feat'
#  348|   {
#  349|   	sdp_data_t *seq;
#  350|-> 	sdp_data_t *d = bt_malloc0(sizeof(sdp_data_t));
#  351|   
#  352|   	if (!d)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
bluez-5.85/lib/bluetooth/sdp.c:350:25: warning[-Wanalyzer-malloc-leak]: leak of 'types'
bluez-5.85/lib/bluetooth/sdp.c:3572:15: enter_function: entry to 'sdp_service_attr_req'
bluez-5.85/lib/bluetooth/sdp.c:3588:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:3593:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:3597:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:3602:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:3618:18: call_function: inlined call to 'gen_attridseq_pdu' from 'sdp_service_attr_req'
#  348|   {
#  349|   	sdp_data_t *seq;
#  350|-> 	sdp_data_t *d = bt_malloc0(sizeof(sdp_data_t));
#  351|   
#  352|   	if (!d)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
bluez-5.85/lib/bluetooth/sdp.c:350:25: warning[-Wanalyzer-malloc-leak]: leak of 'vals'
bluez-5.85/lib/bluetooth/sdp.c:4800:5: enter_function: entry to 'sdp_set_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4809:12: branch_false: following 'false' branch (when 'seqDTDs' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4811:19: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4812:12: branch_false: following 'false' branch (when 'seqVals' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4812:12: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4817:29: branch_true: following 'true' branch (when 'p' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4822:37: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4822:24: call_function: inlined call to 'sdp_list_len' from 'sdp_set_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4823:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4824:20: branch_false: following 'false' branch (when 'dtds' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4826:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4826:24: acquire_memory: allocated here
bluez-5.85/lib/bluetooth/sdp.c:4827:20: branch_false: following 'false' branch (when 'vals' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4831:34: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4832:20: branch_false: following 'false' branch (when 'lengths' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4832:20: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4837:42: branch_false: following 'false' branch (when 'r' is NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4863:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4863:24: call_function: calling 'sdp_seq_alloc_with_length' from 'sdp_set_supp_feat'
#  348|   {
#  349|   	sdp_data_t *seq;
#  350|-> 	sdp_data_t *d = bt_malloc0(sizeof(sdp_data_t));
#  351|   
#  352|   	if (!d)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
bluez-5.85/lib/bluetooth/sdp.c:350:25: warning[-Wanalyzer-malloc-leak]: leak of 'values'
bluez-5.85/lib/bluetooth/sdp.c:4956:6: enter_function: entry to 'sdp_add_lang_attr'
bluez-5.85/lib/bluetooth/sdp.c:4965:17: call_function: calling 'sdp_list_append' from 'sdp_add_lang_attr'
bluez-5.85/lib/bluetooth/sdp.c:4965:17: return_function: returning to 'sdp_add_lang_attr' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4966:9: call_function: calling 'sdp_set_lang_attr' from 'sdp_add_lang_attr'
#  348|   {
#  349|   	sdp_data_t *seq;
#  350|-> 	sdp_data_t *d = bt_malloc0(sizeof(sdp_data_t));
#  351|   
#  352|   	if (!d)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
bluez-5.85/lib/bluetooth/sdp.c:425:38: warning[-Wanalyzer-malloc-leak]: leak of 'dtds'
bluez-5.85/lib/bluetooth/sdp.c:4956:6: enter_function: entry to 'sdp_add_lang_attr'
bluez-5.85/lib/bluetooth/sdp.c:4965:17: call_function: calling 'sdp_list_append' from 'sdp_add_lang_attr'
bluez-5.85/lib/bluetooth/sdp.c:4965:17: return_function: returning to 'sdp_add_lang_attr' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4966:9: call_function: calling 'sdp_set_lang_attr' from 'sdp_add_lang_attr'
#  423|   		d->unitSize += length;
#  424|   		if (length <= USHRT_MAX) {
#  425|-> 			d->val.str = bt_malloc0(length + 1);
#  426|   			if (!d->val.str) {
#  427|   				free(d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
bluez-5.85/lib/bluetooth/sdp.c:425:38: warning[-Wanalyzer-malloc-leak]: leak of 'reqbuf'
bluez-5.85/lib/bluetooth/sdp.c:4420:5: enter_function: entry to 'sdp_service_search_attr_req'
bluez-5.85/lib/bluetooth/sdp.c:4436:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4441:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4443:18: acquire_memory: allocated here
bluez-5.85/lib/bluetooth/sdp.c:4445:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4452:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4459:18: call_function: inlined call to 'gen_searchseq_pdu' from 'sdp_service_search_attr_req'
#  423|   		d->unitSize += length;
#  424|   		if (length <= USHRT_MAX) {
#  425|-> 			d->val.str = bt_malloc0(length + 1);
#  426|   			if (!d->val.str) {
#  427|   				free(d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
bluez-5.85/lib/bluetooth/sdp.c:425:38: warning[-Wanalyzer-malloc-leak]: leak of 'rspbuf'
bluez-5.85/lib/bluetooth/sdp.c:4420:5: enter_function: entry to 'sdp_service_search_attr_req'
bluez-5.85/lib/bluetooth/sdp.c:4436:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4441:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4444:18: acquire_memory: allocated here
bluez-5.85/lib/bluetooth/sdp.c:4445:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4452:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4459:18: call_function: inlined call to 'gen_searchseq_pdu' from 'sdp_service_search_attr_req'
#  423|   		d->unitSize += length;
#  424|   		if (length <= USHRT_MAX) {
#  425|-> 			d->val.str = bt_malloc0(length + 1);
#  426|   			if (!d->val.str) {
#  427|   				free(d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
bluez-5.85/lib/bluetooth/sdp.c:425:38: warning[-Wanalyzer-malloc-leak]: leak of 'types'
bluez-5.85/lib/bluetooth/sdp.c:4041:5: enter_function: entry to 'sdp_service_search_attr_async'
bluez-5.85/lib/bluetooth/sdp.c:4048:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4075:18: call_function: inlined call to 'gen_searchseq_pdu' from 'sdp_service_search_attr_async'
#  423|   		d->unitSize += length;
#  424|   		if (length <= USHRT_MAX) {
#  425|-> 			d->val.str = bt_malloc0(length + 1);
#  426|   			if (!d->val.str) {
#  427|   				free(d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
bluez-5.85/lib/bluetooth/sdp.c:425:38: warning[-Wanalyzer-malloc-leak]: leak of 'values'
bluez-5.85/lib/bluetooth/sdp.c:4041:5: enter_function: entry to 'sdp_service_search_attr_async'
bluez-5.85/lib/bluetooth/sdp.c:4048:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4075:18: call_function: inlined call to 'gen_searchseq_pdu' from 'sdp_service_search_attr_async'
#  423|   		d->unitSize += length;
#  424|   		if (length <= USHRT_MAX) {
#  425|-> 			d->val.str = bt_malloc0(length + 1);
#  426|   			if (!d->val.str) {
#  427|   				free(d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
bluez-5.85/lib/bluetooth/sdp.c:440:17: warning[-Wanalyzer-malloc-leak]: leak of 'dtds'
bluez-5.85/lib/bluetooth/sdp.c:4956:6: enter_function: entry to 'sdp_add_lang_attr'
bluez-5.85/lib/bluetooth/sdp.c:4965:17: call_function: calling 'sdp_list_append' from 'sdp_add_lang_attr'
bluez-5.85/lib/bluetooth/sdp.c:4965:17: return_function: returning to 'sdp_add_lang_attr' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4966:9: call_function: calling 'sdp_set_lang_attr' from 'sdp_add_lang_attr'
#  438|   	case SDP_URL_STR32:
#  439|   	case SDP_TEXT_STR32:
#  440|-> 		SDPERR("Strings of size > USHRT_MAX not supported");
#  441|   		break;
#  442|   	case SDP_ALT8:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
bluez-5.85/lib/bluetooth/sdp.c:440:17: warning[-Wanalyzer-malloc-leak]: leak of 'reqbuf'
bluez-5.85/lib/bluetooth/sdp.c:4420:5: enter_function: entry to 'sdp_service_search_attr_req'
bluez-5.85/lib/bluetooth/sdp.c:4436:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4441:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4443:18: acquire_memory: allocated here
bluez-5.85/lib/bluetooth/sdp.c:4445:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4452:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4459:18: call_function: inlined call to 'gen_searchseq_pdu' from 'sdp_service_search_attr_req'
#  438|   	case SDP_URL_STR32:
#  439|   	case SDP_TEXT_STR32:
#  440|-> 		SDPERR("Strings of size > USHRT_MAX not supported");
#  441|   		break;
#  442|   	case SDP_ALT8:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def237]
bluez-5.85/lib/bluetooth/sdp.c:440:17: warning[-Wanalyzer-malloc-leak]: leak of 'rspbuf'
bluez-5.85/lib/bluetooth/sdp.c:4420:5: enter_function: entry to 'sdp_service_search_attr_req'
bluez-5.85/lib/bluetooth/sdp.c:4436:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4441:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4444:18: acquire_memory: allocated here
bluez-5.85/lib/bluetooth/sdp.c:4445:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4452:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4459:18: call_function: inlined call to 'gen_searchseq_pdu' from 'sdp_service_search_attr_req'
#  438|   	case SDP_URL_STR32:
#  439|   	case SDP_TEXT_STR32:
#  440|-> 		SDPERR("Strings of size > USHRT_MAX not supported");
#  441|   		break;
#  442|   	case SDP_ALT8:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
bluez-5.85/lib/bluetooth/sdp.c:440:17: warning[-Wanalyzer-malloc-leak]: leak of 'types'
bluez-5.85/lib/bluetooth/sdp.c:4041:5: enter_function: entry to 'sdp_service_search_attr_async'
bluez-5.85/lib/bluetooth/sdp.c:4048:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4075:18: call_function: inlined call to 'gen_searchseq_pdu' from 'sdp_service_search_attr_async'
#  438|   	case SDP_URL_STR32:
#  439|   	case SDP_TEXT_STR32:
#  440|-> 		SDPERR("Strings of size > USHRT_MAX not supported");
#  441|   		break;
#  442|   	case SDP_ALT8:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def239]
bluez-5.85/lib/bluetooth/sdp.c:440:17: warning[-Wanalyzer-malloc-leak]: leak of 'values'
bluez-5.85/lib/bluetooth/sdp.c:4041:5: enter_function: entry to 'sdp_service_search_attr_async'
bluez-5.85/lib/bluetooth/sdp.c:4048:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4075:18: call_function: inlined call to 'gen_searchseq_pdu' from 'sdp_service_search_attr_async'
#  438|   	case SDP_URL_STR32:
#  439|   	case SDP_TEXT_STR32:
#  440|-> 		SDPERR("Strings of size > USHRT_MAX not supported");
#  441|   		break;
#  442|   	case SDP_ALT8:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def240]
bluez-5.85/lib/bluetooth/sdp.c:4674:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'socket(1, 524289, 0)'
bluez-5.85/lib/bluetooth/sdp.c:4666:25: acquire_resource: socket created here
bluez-5.85/lib/bluetooth/sdp.c:4667:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4669:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4674:16: danger: 'socket(1, 524289, 0)' leaks here
# 4672|   	strcpy(sa.sun_path, SDP_UNIX_PATH);
# 4673|   
# 4674|-> 	return connect(session->sock, (struct sockaddr *) &sa, sizeof(sa));
# 4675|   }
# 4676|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def241]
bluez-5.85/lib/bluetooth/sdp.c:4722:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'socket(31, sockflags, 0)'
bluez-5.85/lib/bluetooth/sdp.c:4708:25: acquire_resource: socket created here
bluez-5.85/lib/bluetooth/sdp.c:4709:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4711:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4720:12: branch_true: following 'true' branch...
bluez-5.85/lib/bluetooth/sdp.c:4721:17: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4722:20: danger: 'socket(31, sockflags, 0)' leaks here
# 4720|   	if (bacmp(src, BDADDR_ANY)) {
# 4721|   		sa.l2_bdaddr = *src;
# 4722|-> 		if (bind(sk, (struct sockaddr *) &sa, sizeof(sa)) < 0)
# 4723|   			return -1;
# 4724|   	}

Error: GCC_ANALYZER_WARNING (CWE-666): [#def242]
bluez-5.85/lib/bluetooth/sdp.c:4740:27: warning[-Wanalyzer-fd-phase-mismatch]: 'connect' on file descriptor '*session.sock' in wrong phase
bluez-5.85/lib/bluetooth/sdp.c:4708:25: acquire_resource: socket created here
bluez-5.85/lib/bluetooth/sdp.c:4709:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4711:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4720:12: branch_true: following 'true' branch...
bluez-5.85/lib/bluetooth/sdp.c:4721:17: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4722:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4749:1: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4726:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4726:12: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4732:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4736:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4740:27: danger: 'connect' expects a new socket file descriptor but '*session.sock' is bound
# 4738|   
# 4739|   	do {
# 4740|-> 		int ret = connect(sk, (struct sockaddr *) &sa, sizeof(sa));
# 4741|   		if (!ret)
# 4742|   			return 0;

Error: GCC_ANALYZER_WARNING (CWE-666): [#def243]
bluez-5.85/lib/bluetooth/sdp.c:4740:27: warning[-Wanalyzer-fd-phase-mismatch]: 'connect' on file descriptor 'socket(31, sockflags, 0)' in wrong phase
bluez-5.85/lib/bluetooth/sdp.c:4708:25: acquire_resource: socket created here
bluez-5.85/lib/bluetooth/sdp.c:4709:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4711:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4720:12: branch_true: following 'true' branch...
bluez-5.85/lib/bluetooth/sdp.c:4721:17: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4722:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4749:1: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4726:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4726:12: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4732:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4736:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4741:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4743:20: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4743:20: branch_true: following 'true' branch...
bluez-5.85/lib/bluetooth/sdp.c:4743:21: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4743:21: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4746:18: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4746:18: branch_true: following 'true' branch...
bluez-5.85/lib/bluetooth/sdp.c:4740:27: danger: 'connect' expects a new socket file descriptor but 'socket(31, sockflags, 0)' is bound
# 4738|   
# 4739|   	do {
# 4740|-> 		int ret = connect(sk, (struct sockaddr *) &sa, sizeof(sa));
# 4741|   		if (!ret)
# 4742|   			return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def244]
bluez-5.85/lib/bluetooth/sdp.c:4743:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'socket(31, sockflags, 0)'
bluez-5.85/lib/bluetooth/sdp.c:4708:25: acquire_resource: socket created here
bluez-5.85/lib/bluetooth/sdp.c:4709:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4711:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4741:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4743:20: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4743:20: branch_true: following 'true' branch...
bluez-5.85/lib/bluetooth/sdp.c:4743:21: danger: 'socket(31, sockflags, 0)' leaks here
# 4741|   		if (!ret)
# 4742|   			return 0;
# 4743|-> 		if (ret < 0 && (flags & SDP_NON_BLOCKING) &&
# 4744|   				(errno == EAGAIN || errno == EINPROGRESS))
# 4745|   			return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def245]
bluez-5.85/lib/bluetooth/sdp.c:4746:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'socket(31, sockflags, 0)'
bluez-5.85/lib/bluetooth/sdp.c:4708:25: acquire_resource: socket created here
bluez-5.85/lib/bluetooth/sdp.c:4709:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4711:9: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4741:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4743:20: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4743:20: branch_true: following 'true' branch...
bluez-5.85/lib/bluetooth/sdp.c:4743:21: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4746:18: danger: 'socket(31, sockflags, 0)' leaks here
# 4744|   				(errno == EAGAIN || errno == EINPROGRESS))
# 4745|   			return 0;
# 4746|-> 	} while (errno == EBUSY && (flags & SDP_RETRY_IF_BUSY));
# 4747|   
# 4748|   	return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def246]
bluez-5.85/lib/bluetooth/sdp.c:4903:43: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
bluez-5.85/lib/bluetooth/sdp.c:4891:5: enter_function: entry to 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4897:19: call_function: calling 'sdp_data_get' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4897:19: return_function: returning to 'sdp_get_supp_feat' from 'sdp_data_get'
bluez-5.85/lib/bluetooth/sdp.c:4899:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4903:40: branch_true: following 'true' branch (when 'd' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4907:22: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4907:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4912:22: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4912:43: branch_false: following 'false' branch (when 'dd' is NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4939:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4939:24: call_function: calling 'sdp_list_append' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4939:24: return_function: returning to 'sdp_get_supp_feat' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4903:40: branch_true: following 'true' branch (when 'd' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4907:22: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4907:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4912:22: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4912:43: branch_false: following 'false' branch (when 'dd' is NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4939:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4939:24: call_function: calling 'sdp_list_append' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4939:24: return_function: returning to 'sdp_get_supp_feat' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4903:40: branch_true: following 'true' branch (when 'd' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4907:22: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4907:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4912:22: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4912:43: branch_false: following 'false' branch (when 'dd' is NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4939:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4939:24: call_function: calling 'sdp_list_append' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4939:24: return_function: returning to 'sdp_get_supp_feat' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4903:43: danger: '<unknown>' leaks here; was allocated at [(35)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/34)
# 4901|   					SDP_ATTR_SUPPORTED_FEATURES_LIST, seqp);
# 4902|   
# 4903|-> 	for (d = sdpdata->val.dataseq; d; d = d->next) {
# 4904|   		sdp_data_t *dd;
# 4905|   		sdp_list_t *subseq;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
bluez-5.85/lib/bluetooth/sdp.c:4903:43: warning[-Wanalyzer-malloc-leak]: leak of 'tseq'
bluez-5.85/lib/bluetooth/sdp.c:4891:5: enter_function: entry to 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4897:19: call_function: calling 'sdp_data_get' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4897:19: return_function: returning to 'sdp_get_supp_feat' from 'sdp_data_get'
bluez-5.85/lib/bluetooth/sdp.c:4899:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4903:40: branch_true: following 'true' branch (when 'd' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4907:22: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4907:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4912:22: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4912:43: branch_false: following 'false' branch (when 'dd' is NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4939:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4939:24: call_function: calling 'sdp_list_append' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4939:24: return_function: returning to 'sdp_get_supp_feat' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4903:40: branch_true: following 'true' branch (when 'd' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4907:22: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4907:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4912:22: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4912:43: branch_false: following 'false' branch (when 'dd' is NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4939:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4939:24: call_function: calling 'sdp_list_append' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4939:24: return_function: returning to 'sdp_get_supp_feat' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4903:43: danger: 'tseq' leaks here; was allocated at [(24)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/23)
# 4901|   					SDP_ATTR_SUPPORTED_FEATURES_LIST, seqp);
# 4902|   
# 4903|-> 	for (d = sdpdata->val.dataseq; d; d = d->next) {
# 4904|   		sdp_data_t *dd;
# 4905|   		sdp_list_t *subseq;

Error: GCC_ANALYZER_WARNING (CWE-416): [#def248]
bluez-5.85/lib/bluetooth/sdp.c:4948:17: warning[-Wanalyzer-use-after-free]: use after 'free' of 'tseq'
bluez-5.85/lib/bluetooth/sdp.c:4891:5: enter_function: entry to 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4897:19: call_function: calling 'sdp_data_get' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4897:19: return_function: returning to 'sdp_get_supp_feat' from 'sdp_data_get'
bluez-5.85/lib/bluetooth/sdp.c:4899:12: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4903:40: branch_true: following 'true' branch (when 'd' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4907:22: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4907:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4912:22: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4912:43: branch_false: following 'false' branch (when 'dd' is NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4939:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4939:24: call_function: calling 'sdp_list_append' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4939:24: return_function: returning to 'sdp_get_supp_feat' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4903:40: branch_true: following 'true' branch (when 'd' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4907:22: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4907:20: branch_false: following 'false' branch...
bluez-5.85/lib/bluetooth/sdp.c:4912:22: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4912:43: branch_false: following 'false' branch (when 'dd' is NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4939:24: branch_false: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4939:24: call_function: calling 'sdp_list_append' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4939:24: return_function: returning to 'sdp_get_supp_feat' from 'sdp_list_append'
bluez-5.85/lib/bluetooth/sdp.c:4903:40: branch_true: following 'true' branch (when 'd' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4907:22: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4945:16: branch_true: following 'true' branch (when 'tseq' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4948:17: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4949:17: call_function: calling 'sdp_list_free' from 'sdp_get_supp_feat'
bluez-5.85/lib/bluetooth/sdp.c:4949:17: return_function: returning to 'sdp_get_supp_feat' from 'sdp_list_free'
bluez-5.85/lib/bluetooth/sdp.c:4945:16: branch_true: following 'true' branch (when 'tseq' is non-NULL)...
bluez-5.85/lib/bluetooth/sdp.c:4948:17: branch_true: ...to here
bluez-5.85/lib/bluetooth/sdp.c:4948:17: danger: use after 'free' of 'tseq'; freed at [(56)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/55)
# 4946|   		sdp_list_t * next;
# 4947|   
# 4948|-> 		next = tseq->next;
# 4949|   		sdp_list_free(tseq, free);
# 4950|   		tseq = next;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def249]
bluez-5.85/mesh/keyring.c:50:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_key_file(node,  app_key_dir,  app_idx, 2)’
bluez-5.85/mesh/keyring.c:92:6: enter_function: entry to ‘keyring_put_app_key’
bluez-5.85/mesh/keyring.c:98:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
bluez-5.85/mesh/keyring.c:101:14: branch_false: ...to here
bluez-5.85/mesh/keyring.c:101:14: call_function: calling ‘open_key_file’ from ‘keyring_put_app_key’
bluez-5.85/mesh/keyring.c:101:14: return_function: returning to ‘keyring_put_app_key’ from ‘open_key_file’
bluez-5.85/mesh/keyring.c:103:12: branch_true: following ‘true’ branch...
bluez-5.85/mesh/keyring.c:106:21: branch_true: ...to here
bluez-5.85/mesh/keyring.c:106:20: branch_true: following ‘true’ branch...
bluez-5.85/mesh/keyring.c:107:29: branch_true: ...to here
bluez-5.85/mesh/keyring.c:107:28: branch_true: following ‘true’ branch...
bluez-5.85/mesh/keyring.c:108:33: branch_true: ...to here
bluez-5.85/mesh/keyring.c:50:13: danger: ‘open_key_file(node,  app_key_dir,  app_idx, 2)’ leaks here; was opened at [(14)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/13)
#   48|   	node_path = node_get_storage_dir(node);
#   49|   
#   50|-> 	if (flags & O_CREAT) {
#   51|   		ret = snprintf(fname, PATH_MAX, "%s%s", node_path, key_dir);
#   52|   		if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def250]
bluez-5.85/mesh/keyring.c:50:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_key_file(node,  key_dir,  key_idx, 0)’
bluez-5.85/mesh/keyring.c:237:13: enter_function: entry to ‘get_key’
bluez-5.85/mesh/keyring.c:246:14: call_function: calling ‘open_key_file’ from ‘get_key’
bluez-5.85/mesh/keyring.c:246:14: return_function: returning to ‘get_key’ from ‘open_key_file’
bluez-5.85/mesh/keyring.c:248:12: branch_true: following ‘true’ branch...
bluez-5.85/mesh/keyring.c:249:21: branch_true: ...to here
bluez-5.85/mesh/keyring.c:50:13: danger: ‘open_key_file(node,  key_dir,  key_idx, 0)’ leaks here; was opened at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
#   48|   	node_path = node_get_storage_dir(node);
#   49|   
#   50|-> 	if (flags & O_CREAT) {
#   51|   		ret = snprintf(fname, PATH_MAX, "%s%s", node_path, key_dir);
#   52|   		if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def251]
bluez-5.85/mesh/keyring.c:296:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&key_file, 0)’
bluez-5.85/mesh/keyring.c:288:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
bluez-5.85/mesh/keyring.c:291:14: branch_false: ...to here
bluez-5.85/mesh/keyring.c:291:14: acquire_resource: opened here
bluez-5.85/mesh/keyring.c:292:12: branch_true: following ‘true’ branch...
bluez-5.85/mesh/keyring.c:293:21: branch_true: ...to here
bluez-5.85/mesh/keyring.c:296:17: danger: ‘open(&key_file, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  294|   			result = true;
#  295|   
#  296|-> 		close(fd);
#  297|   	}
#  298|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def252]
bluez-5.85/mesh/mesh-config-json.c:101:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "w")’
bluez-5.85/mesh/mesh-config-json.c:95:19: acquire_resource: opened here
bluez-5.85/mesh/mesh-config-json.c:96:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/mesh-config-json.c:101:15: branch_false: ...to here
bluez-5.85/mesh/mesh-config-json.c:101:15: throw: if ‘json_object_to_json_string_ext’ throws an exception...
bluez-5.85/mesh/mesh-config-json.c:101:15: danger: ‘fopen(fname, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   99|   	}
#  100|   
#  101|-> 	str = json_object_to_json_string_ext(jnode, JSON_C_TO_STRING_PRETTY);
#  102|   
#  103|   	if (fwrite(str, sizeof(char), strlen(str), outfile) < strlen(str))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
bluez-5.85/mesh/mesh-config-json.c:101:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "w")’
bluez-5.85/mesh/mesh-config-json.c:95:19: acquire_memory: allocated here
bluez-5.85/mesh/mesh-config-json.c:96:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/mesh-config-json.c:101:15: branch_false: ...to here
bluez-5.85/mesh/mesh-config-json.c:101:15: throw: if ‘json_object_to_json_string_ext’ throws an exception...
bluez-5.85/mesh/mesh-config-json.c:101:15: danger: ‘fopen(fname, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   99|   	}
#  100|   
#  101|-> 	str = json_object_to_json_string_ext(jnode, JSON_C_TO_STRING_PRETTY);
#  102|   
#  103|   	if (fwrite(str, sizeof(char), strlen(str), outfile) < strlen(str))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def254]
bluez-5.85/mesh/mesh-config-json.c:104:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "w")’
bluez-5.85/mesh/mesh-config-json.c:95:19: acquire_resource: opened here
bluez-5.85/mesh/mesh-config-json.c:96:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/mesh-config-json.c:101:15: branch_false: ...to here
bluez-5.85/mesh/mesh-config-json.c:103:12: branch_true: following ‘true’ branch...
bluez-5.85/mesh/mesh-config-json.c:104:17: branch_true: ...to here
bluez-5.85/mesh/mesh-config-json.c:104:17: throw: if ‘l_log_with_location’ throws an exception...
bluez-5.85/mesh/mesh-config-json.c:104:17: danger: ‘fopen(fname, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  102|   
#  103|   	if (fwrite(str, sizeof(char), strlen(str), outfile) < strlen(str))
#  104|-> 		l_warn("Incomplete write of mesh configuration");
#  105|   	else
#  106|   		result = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
bluez-5.85/mesh/mesh-config-json.c:104:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "w")’
bluez-5.85/mesh/mesh-config-json.c:95:19: acquire_memory: allocated here
bluez-5.85/mesh/mesh-config-json.c:96:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/mesh-config-json.c:101:15: branch_false: ...to here
bluez-5.85/mesh/mesh-config-json.c:103:12: branch_true: following ‘true’ branch...
bluez-5.85/mesh/mesh-config-json.c:104:17: branch_true: ...to here
bluez-5.85/mesh/mesh-config-json.c:104:17: throw: if ‘l_log_with_location’ throws an exception...
bluez-5.85/mesh/mesh-config-json.c:104:17: danger: ‘fopen(fname, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  102|   
#  103|   	if (fwrite(str, sizeof(char), strlen(str), outfile) < strlen(str))
#  104|-> 		l_warn("Incomplete write of mesh configuration");
#  105|   	else
#  106|   		result = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
bluez-5.85/mesh/mesh-config-json.c:2654:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(cfgdir_name)’
bluez-5.85/mesh/mesh-config-json.c:2647:18: acquire_memory: allocated here
bluez-5.85/mesh/mesh-config-json.c:2648:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/mesh-config-json.c:2648:12: branch_false: ...to here
bluez-5.85/mesh/mesh-config-json.c:2654:25: throw: if ‘readdir’ throws an exception...
bluez-5.85/mesh/mesh-config-json.c:2654:25: danger: ‘opendir(cfgdir_name)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 2652|   	}
# 2653|   
# 2654|-> 	while ((entry = readdir(cfgdir)) != NULL) {
# 2655|   		char *dirname, *fname, *bak;
# 2656|   		uint8_t uuid[16];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def257]
bluez-5.85/mesh/mesh-io-unit.c:241:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*(struct mesh_io_private *)<unknown>.fd’
bluez-5.85/mesh/mesh-io-unit.c:234:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/mesh-io-unit.c:237:9: branch_false: ...to here
bluez-5.85/mesh/mesh-io-unit.c:241:13: danger: ‘*(struct mesh_io_private *)<unknown>.fd’ leaks here
#  239|   						strlen(pvt->addr.sun_path);
#  240|   
#  241|-> 	if (bind(pvt->fd, (struct sockaddr *) &pvt->addr, size) < 0)
#  242|   		goto fail;
#  243|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def258]
bluez-5.85/mesh/mesh-io-unit.c:245:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*(struct mesh_io_private *)<unknown>.fd’
bluez-5.85/mesh/mesh-io-unit.c:234:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/mesh-io-unit.c:237:9: branch_false: ...to here
bluez-5.85/mesh/mesh-io-unit.c:241:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/mesh-io-unit.c:245:20: branch_false: ...to here
bluez-5.85/mesh/mesh-io-unit.c:245:20: danger: ‘*(struct mesh_io_private *)<unknown>.fd’ leaks here
#  243|   
#  244|   	/* Setup socket handlers */
#  245|-> 	pvt->sio = l_io_new(pvt->fd);
#  246|   	if (!l_io_set_read_handler(pvt->sio, incoming, pvt, NULL))
#  247|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def259]
bluez-5.85/mesh/net.c:1333:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
bluez-5.85/mesh/net.c:1453:13: enter_function: entry to ‘send_net_ack’
bluez-5.85/mesh/net.c:1462:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/net.c:1466:16: branch_false: ...to here
bluez-5.85/mesh/net.c:1475:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/net.c:1482:9: call_function: inlined call to ‘mesh_net_get_iv_index’ from ‘send_net_ack’
bluez-5.85/mesh/net.c:1482:9: call_function: calling ‘mesh_net_transport_send’ from ‘send_net_ack’
# 1331|   
# 1332|   		for (i = 0; i <= seg_max; i++) {
# 1333|-> 			memcpy(frnd_msg->u.s12[i].data, data, 12);
# 1334|   			frnd_msg->u.s12[i].hdr = hdr;
# 1335|   			frnd_msg->u.s12[i].seq = seqAuth + i;

Error: COMPILER_WARNING: [#def260]
bluez-5.85/mesh/net.c: scope_hint: In function ‘ack_received’
bluez-5.85/mesh/net.c:1569:18: warning[-Wunused-but-set-variable=]: variable ‘ack_copy’ set but not used
# 1569 |         uint32_t ack_copy = ack_flag;
#      |                  ^~~~~~~~
# 1567|   	struct mesh_sar *outgoing;
# 1568|   	uint32_t seg_flag = 0x00000001;
# 1569|-> 	uint32_t ack_copy = ack_flag;
# 1570|   	uint16_t i;
# 1571|   

Error: CPPCHECK_WARNING (CWE-758): [#def261]
bluez-5.85/mesh/net.c:1850: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1848|   	uint32_t this_seg_flag = 0x00000001 << segO;
# 1849|   	uint32_t largest = (0xffffffff << segO) & expected;
# 1850|-> 	uint32_t hdr_key =  hdr & HDR_KEY_MASK;
# 1851|   
# 1852|   	frnd = l_queue_find(net->friends, match_frnd_dst,

Error: CPPCHECK_WARNING (CWE-758): [#def262]
bluez-5.85/mesh/net.c:1874: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1872|   
# 1873|   		/* Flush incomplete old SAR message if it doesn't match */
# 1874|-> 		if ((frnd_msg->u.s12[0].hdr & HDR_KEY_MASK) != hdr_key) {
# 1875|   			l_queue_remove(net->frnd_msgs, frnd_msg);
# 1876|   			l_free(frnd_msg);

Error: CPPCHECK_WARNING (CWE-457): [#def263]
bluez-5.85/mesh/net.c:2198: error[uninitvar]: Uninitialized variable: msg
# 2196|   		mesh_net_transport_send(net, 0, 0, mesh_net_get_iv_index(net),
# 2197|   					rsp_ttl, 0, dst & 0x8000 ? 0 : dst,
# 2198|-> 					src, msg, n);
# 2199|   
# 2200|   	return true;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def264]
bluez-5.85/mesh/node.c:1551:33: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
bluez-5.85/mesh/node.c:1522:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/node.c:1528:17: branch_false: ...to here
bluez-5.85/mesh/node.c:1551:12: branch_true: following ‘true’ branch...
bluez-5.85/mesh/node.c:1551:33: branch_true: ...to here
bluez-5.85/mesh/node.c:1551:33: danger: argument 1 (‘node_get_comp(node, 0, & node_len)’) NULL where non-null expected
# 1549|   	node_del_comp(node, 128);
# 1550|   
# 1551|-> 	if (len == node_len && !memcmp(node_comp, comp, len))
# 1552|   		return true;
# 1553|   

Error: GCC_ANALYZER_WARNING (CWE-465): [#def265]
bluez-5.85/mesh/prov-acceptor.c:690:12: warning[-Wanalyzer-deref-before-check]: check of ‘prov’ for NULL after already dereferencing it
bluez-5.85/mesh/prov-acceptor.c:442:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/prov-acceptor.c:442:33: branch_false: ...to here
bluez-5.85/mesh/prov-acceptor.c:442:13: branch_false: following ‘false’ branch...
bluez-5.85/mesh/prov-acceptor.c:445:9: branch_false: ...to here
bluez-5.85/mesh/prov-acceptor.c:448:12: branch_false: following ‘false’ branch (when ‘type <= 9’)...
bluez-5.85/mesh/prov-acceptor.c:454:13: branch_false: ...to here
bluez-5.85/mesh/prov-acceptor.c:454:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/prov-acceptor.c:457:20: branch_false: ...to here
bluez-5.85/mesh/prov-acceptor.c:457:19: branch_false: following ‘false’ branch...
bluez-5.85/mesh/prov-acceptor.c:464:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/prov-acceptor.c:471:9: branch_false: ...to here
bluez-5.85/mesh/prov-acceptor.c:690:12: danger: pointer ‘prov’ is checked for NULL here but it was already dereferenced at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  688|   	}
#  689|   
#  690|-> 	if (prov)
#  691|   		prov->previous = type;
#  692|   	return;

Error: GCC_ANALYZER_WARNING (CWE-465): [#def266]
bluez-5.85/mesh/prov-initiator.c:840:12: warning[-Wanalyzer-deref-before-check]: check of ‘prov’ for NULL after already dereferencing it
bluez-5.85/mesh/prov-initiator.c:664:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/prov-initiator.c:664:33: branch_false: ...to here
bluez-5.85/mesh/prov-initiator.c:664:13: branch_false: following ‘false’ branch...
bluez-5.85/mesh/prov-initiator.c:667:9: branch_false: ...to here
bluez-5.85/mesh/prov-initiator.c:670:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/prov-initiator.c:673:27: branch_false: ...to here
bluez-5.85/mesh/prov-initiator.c:673:19: branch_false: following ‘false’ branch...
bluez-5.85/mesh/prov-initiator.c:679:12: branch_false: following ‘false’ branch (when ‘type <= 9’)...
bluez-5.85/mesh/prov-initiator.c:685:20: branch_false: ...to here
bluez-5.85/mesh/prov-initiator.c:685:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/prov-initiator.c:692:9: branch_false: ...to here
bluez-5.85/mesh/prov-initiator.c:840:12: danger: pointer ‘prov’ is checked for NULL here but it was already dereferenced at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  838|   	}
#  839|   
#  840|-> 	if (prov)
#  841|   		prov->previous = type;
#  842|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
bluez-5.85/mesh/rpl.c:63:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&src_file)’
bluez-5.85/mesh/rpl.c:47:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:50:21: branch_false: ...to here
bluez-5.85/mesh/rpl.c:52:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:55:9: branch_false: ...to here
bluez-5.85/mesh/rpl.c:57:15: acquire_memory: allocated here
bluez-5.85/mesh/rpl.c:59:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:63:17: branch_false: ...to here
bluez-5.85/mesh/rpl.c:63:17: danger: ‘opendir(&src_file)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   61|   			l_error("Failed to create dir: %s", src_file);
#   62|   	} else
#   63|-> 		closedir(dir);
#   64|   
#   65|   	snprintf(src_file, PATH_MAX, "%s%s/%8.8x/%4.4x", node_path, rpl_dir,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
bluez-5.85/mesh/rpl.c:112:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&rpl_path)’
bluez-5.85/mesh/rpl.c:97:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:100:21: branch_false: ...to here
bluez-5.85/mesh/rpl.c:102:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:105:9: branch_false: ...to here
bluez-5.85/mesh/rpl.c:106:15: acquire_memory: allocated here
bluez-5.85/mesh/rpl.c:108:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:108:12: branch_false: ...to here
bluez-5.85/mesh/rpl.c:112:25: throw: if ‘readdir’ throws an exception...
bluez-5.85/mesh/rpl.c:112:25: danger: ‘opendir(&rpl_path)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  110|   
#  111|   	/* Remove all instances of src address */
#  112|-> 	while ((entry = readdir(dir)) != NULL) {
#  113|   		if (entry->d_type == DT_DIR && entry->d_name[0] != '.') {
#  114|   			snprintf(rpl_path, PATH_MAX, "%s%s/%s/%4.4x",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
bluez-5.85/mesh/rpl.c:152:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(iv_path)’
bluez-5.85/mesh/rpl.c:145:15: acquire_memory: allocated here
bluez-5.85/mesh/rpl.c:147:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:150:18: branch_false: ...to here
bluez-5.85/mesh/rpl.c:151:12: branch_true: following ‘true’ branch...
bluez-5.85/mesh/rpl.c:152:17: branch_true: ...to here
bluez-5.85/mesh/rpl.c:152:17: danger: ‘opendir(iv_path)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  150|   	iv_txt = mesh_basename(iv_path);
#  151|   	if (sscanf(iv_txt, "%08x", &iv_index) != 1) {
#  152|-> 		closedir(dir);
#  153|   		return;
#  154|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
bluez-5.85/mesh/rpl.c:158:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(iv_path)’
bluez-5.85/mesh/rpl.c:145:15: acquire_memory: allocated here
bluez-5.85/mesh/rpl.c:147:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:150:18: branch_false: ...to here
bluez-5.85/mesh/rpl.c:151:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:156:9: branch_false: ...to here
bluez-5.85/mesh/rpl.c:158:25: throw: if ‘readdir’ throws an exception...
bluez-5.85/mesh/rpl.c:158:25: danger: ‘opendir(iv_path)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  156|   	memset(seq_txt, 0, sizeof(seq_txt));
#  157|   
#  158|-> 	while ((entry = readdir(dir)) != NULL) {
#  159|   		/* RPL sequences are stored in src files under iv_index */
#  160|   		if (entry->d_type == DT_REG) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def271]
bluez-5.85/mesh/rpl.c:174:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&src_path, 0)’
bluez-5.85/mesh/rpl.c:147:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:150:18: branch_false: ...to here
bluez-5.85/mesh/rpl.c:151:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:156:9: branch_false: ...to here
bluez-5.85/mesh/rpl.c:158:16: branch_true: following ‘true’ branch...
bluez-5.85/mesh/rpl.c:160:21: branch_true: ...to here
bluez-5.85/mesh/rpl.c:165:30: acquire_resource: opened here
bluez-5.85/mesh/rpl.c:167:28: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:170:29: branch_false: ...to here
bluez-5.85/mesh/rpl.c:170:28: branch_true: following ‘true’ branch...
bluez-5.85/mesh/rpl.c:171:41: branch_true: ...to here
bluez-5.85/mesh/rpl.c:170:29: branch_true: following ‘true’ branch...
bluez-5.85/mesh/rpl.c:174:49: branch_true: ...to here
bluez-5.85/mesh/rpl.c:173:39: throw: if ‘l_queue_find’ throws an exception...
bluez-5.85/mesh/rpl.c:174:49: danger: ‘open(&src_path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  172|   
#  173|   				rpl = l_queue_find(rpl_list, match_src,
#  174|-> 						L_UINT_TO_PTR(src));
#  175|   
#  176|   				if (rpl) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def272]
bluez-5.85/mesh/rpl.c:191:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&src_path, 0)’
bluez-5.85/mesh/rpl.c:147:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:150:18: branch_false: ...to here
bluez-5.85/mesh/rpl.c:151:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:156:9: branch_false: ...to here
bluez-5.85/mesh/rpl.c:158:16: branch_true: following ‘true’ branch...
bluez-5.85/mesh/rpl.c:160:21: branch_true: ...to here
bluez-5.85/mesh/rpl.c:165:30: acquire_resource: opened here
bluez-5.85/mesh/rpl.c:191:25: danger: ‘open(&src_path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  189|   				}
#  190|   			}
#  191|-> 			close(fd);
#  192|   		}
#  193|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
bluez-5.85/mesh/rpl.c:227:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(l_malloc(len))’
bluez-5.85/mesh/rpl.c:206:12: branch_false: following ‘false’ branch (when ‘rpl_list’ is non-NULL)...
bluez-5.85/mesh/rpl.c:209:21: branch_false: ...to here
bluez-5.85/mesh/rpl.c:213:12: branch_false: following ‘false’ branch (when ‘len <= 4096’)...
bluez-5.85/mesh/rpl.c:216:20: branch_false: ...to here
bluez-5.85/mesh/rpl.c:219:15: acquire_memory: allocated here
bluez-5.85/mesh/rpl.c:221:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:221:12: branch_false: ...to here
bluez-5.85/mesh/rpl.c:227:25: throw: if ‘readdir’ throws an exception...
bluez-5.85/mesh/rpl.c:227:25: danger: ‘opendir(l_malloc(len))’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  225|   	}
#  226|   
#  227|-> 	while ((entry = readdir(dir)) != NULL) {
#  228|   		/* RPL sequences are stored in files under iv_indexs */
#  229|   		if (entry->d_type == DT_DIR && entry->d_name[0] != '.') {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
bluez-5.85/mesh/rpl.c:267:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&path)’
bluez-5.85/mesh/rpl.c:251:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:254:13: branch_false: ...to here
bluez-5.85/mesh/rpl.c:254:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:258:9: branch_false: ...to here
bluez-5.85/mesh/rpl.c:262:15: acquire_memory: allocated here
bluez-5.85/mesh/rpl.c:263:12: branch_false: following ‘false’ branch...
bluez-5.85/mesh/rpl.c:263:12: branch_false: ...to here
bluez-5.85/mesh/rpl.c:267:25: throw: if ‘readdir’ throws an exception...
bluez-5.85/mesh/rpl.c:267:25: danger: ‘opendir(&path)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  265|   
#  266|   	/* Cleanup any stale or malformed trees */
#  267|-> 	while ((entry = readdir(dir)) != NULL) {
#  268|   		if (entry->d_type == DT_DIR && entry->d_name[0] != '.') {
#  269|   			uint32_t val;

Error: COMPILER_WARNING (CWE-704): [#def275]
bluez-5.85/mesh/util.c: scope_hint: In function ‘create_dir’
bluez-5.85/mesh/util.c:108:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  108 |         prev = strchr(dir_name, '/');
#      |              ^
#  106|   	strcat(dir, "/");
#  107|   
#  108|-> 	prev = strchr(dir_name, '/');
#  109|   
#  110|   	while (prev) {

Error: COMPILER_WARNING (CWE-704): [#def276]
bluez-5.85/mesh/util.c:108:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  106|   	strcat(dir, "/");
#  107|   
#  108|-> 	prev = strchr(dir_name, '/');
#  109|   
#  110|   	while (prev) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
bluez-5.85/monitor/analyze.c:127:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen("gnuplot", "w")’
bluez-5.85/monitor/analyze.c:141:13: enter_function: entry to ‘print_stats’
bluez-5.85/monitor/analyze.c:158:9: call_function: calling ‘plot_draw’ from ‘print_stats’
#  125|   
#  126|   	fprintf(gplot, "$data << EOD\n");
#  127|-> 	queue_foreach(queue, tmp_write, gplot);
#  128|   	fprintf(gplot, "EOD\n");
#  129|   

Error: COMPILER_WARNING: [#def278]
bluez-5.85/monitor/avctp.c: scope_hint: In function ‘avrcp_get_capabilities’
bluez-5.85/monitor/avctp.c:806:13: warning[-Wunused-but-set-variable=]: variable ‘i’ set but not used
#  806 |         int i;
#      |             ^
#  804|   	struct l2cap_frame *frame = &avctp_frame->l2cap_frame;
#  805|   	uint8_t cap, count;
#  806|-> 	int i;
#  807|   
#  808|   	if (!l2cap_frame_get_u8(frame, &cap))

Error: COMPILER_WARNING: [#def279]
bluez-5.85/monitor/avctp.c: scope_hint: In function ‘avrcp_list_player_attributes’
bluez-5.85/monitor/avctp.c:861:13: warning[-Wunused-but-set-variable=]: variable ‘i’ set but not used
#  861 |         int i;
#      |             ^
#  859|   	struct l2cap_frame *frame = &avctp_frame->l2cap_frame;
#  860|   	uint8_t num;
#  861|-> 	int i;
#  862|   
#  863|   	if (len == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
bluez-5.85/monitor/control.c:987:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/control.c:1054:12: enter_function: entry to ‘open_channel’
bluez-5.85/monitor/control.c:1058:16: acquire_memory: allocated here
bluez-5.85/monitor/control.c:1059:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/control.c:1062:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1065:20: call_function: calling ‘open_socket’ from ‘open_channel’
#  985|   	fd = socket(AF_BLUETOOTH, SOCK_RAW | SOCK_CLOEXEC, BTPROTO_HCI);
#  986|   	if (fd < 0) {
#  987|-> 		perror("Failed to open channel");
#  988|   		return -1;
#  989|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
bluez-5.85/monitor/control.c:1000:25: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/control.c:1054:12: enter_function: entry to ‘open_channel’
bluez-5.85/monitor/control.c:1058:16: acquire_memory: allocated here
bluez-5.85/monitor/control.c:1059:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/control.c:1062:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1065:20: call_function: calling ‘open_socket’ from ‘open_channel’
#  998|   			/* Fallback to hcidump support */
#  999|   			hcidump_fallback = true;
# 1000|-> 			close(fd);
# 1001|   			return -1;
# 1002|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
bluez-5.85/monitor/control.c:1003:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/control.c:1054:12: enter_function: entry to ‘open_channel’
bluez-5.85/monitor/control.c:1058:16: acquire_memory: allocated here
bluez-5.85/monitor/control.c:1059:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/control.c:1062:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1065:20: call_function: calling ‘open_socket’ from ‘open_channel’
# 1001|   			return -1;
# 1002|   		}
# 1003|-> 		perror("Failed to bind channel");
# 1004|   		close(fd);
# 1005|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
bluez-5.85/monitor/control.c:1004:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/control.c:1054:12: enter_function: entry to ‘open_channel’
bluez-5.85/monitor/control.c:1058:16: acquire_memory: allocated here
bluez-5.85/monitor/control.c:1059:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/control.c:1062:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1065:20: call_function: calling ‘open_socket’ from ‘open_channel’
# 1002|   		}
# 1003|   		perror("Failed to bind channel");
# 1004|-> 		close(fd);
# 1005|   		return -1;
# 1006|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
bluez-5.85/monitor/control.c:1009:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/control.c:1054:12: enter_function: entry to ‘open_channel’
bluez-5.85/monitor/control.c:1058:16: acquire_memory: allocated here
bluez-5.85/monitor/control.c:1059:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/control.c:1062:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1065:20: call_function: calling ‘open_socket’ from ‘open_channel’
# 1007|   
# 1008|   	if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMP, &opt, sizeof(opt)) < 0) {
# 1009|-> 		perror("Failed to enable timestamps");
# 1010|   		close(fd);
# 1011|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
bluez-5.85/monitor/control.c:1010:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/control.c:1054:12: enter_function: entry to ‘open_channel’
bluez-5.85/monitor/control.c:1058:16: acquire_memory: allocated here
bluez-5.85/monitor/control.c:1059:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/control.c:1062:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1065:20: call_function: calling ‘open_socket’ from ‘open_channel’
# 1008|   	if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMP, &opt, sizeof(opt)) < 0) {
# 1009|   		perror("Failed to enable timestamps");
# 1010|-> 		close(fd);
# 1011|   		return -1;
# 1012|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
bluez-5.85/monitor/control.c:1015:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/control.c:1054:12: enter_function: entry to ‘open_channel’
bluez-5.85/monitor/control.c:1058:16: acquire_memory: allocated here
bluez-5.85/monitor/control.c:1059:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/control.c:1062:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1065:20: call_function: calling ‘open_socket’ from ‘open_channel’
# 1013|   
# 1014|   	if (setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &opt, sizeof(opt)) < 0) {
# 1015|-> 		perror("Failed to enable credentials");
# 1016|   		close(fd);
# 1017|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
bluez-5.85/monitor/control.c:1016:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/control.c:1054:12: enter_function: entry to ‘open_channel’
bluez-5.85/monitor/control.c:1058:16: acquire_memory: allocated here
bluez-5.85/monitor/control.c:1059:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/control.c:1062:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1065:20: call_function: calling ‘open_socket’ from ‘open_channel’
# 1014|   	if (setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &opt, sizeof(opt)) < 0) {
# 1015|   		perror("Failed to enable credentials");
# 1016|-> 		close(fd);
# 1017|   		return -1;
# 1018|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def288]
bluez-5.85/monitor/control.c:1132:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/kmsg", 0)’
bluez-5.85/monitor/control.c:1128:14: acquire_resource: opened here
bluez-5.85/monitor/control.c:1129:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1132:13: branch_false: ...to here
bluez-5.85/monitor/control.c:1132:13: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/monitor/control.c:1132:13: danger: ‘open("/dev/kmsg", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 1130|   		return -1;
# 1131|   
# 1132|-> 	if (mainloop_add_fd(fd, EPOLLIN, kmsg_callback, NULL, NULL) < 0) {
# 1133|   		close(fd);
# 1134|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
bluez-5.85/monitor/control.c:1212:13: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/control.c:1186:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1191:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1195:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1200:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1202:16: acquire_memory: allocated here
bluez-5.85/monitor/control.c:1203:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/control.c:1208:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1212:13: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/monitor/control.c:1212:13: danger: ‘data’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
# 1210|   	data->fd = nfd;
# 1211|   
# 1212|-> 	if (mainloop_add_fd(data->fd, EPOLLIN, client_callback,
# 1213|   						data, free_data) < 0) {
# 1214|   		close(data->fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def290]
bluez-5.85/monitor/control.c:1253:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/monitor/control.c:1226:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1229:13: branch_false: ...to here
bluez-5.85/monitor/control.c:1229:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1234:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1236:14: acquire_resource: socket created here
bluez-5.85/monitor/control.c:1237:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/monitor/control.c:1242:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1246:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1252:13: branch_false: ...to here
bluez-5.85/monitor/control.c:1252:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/control.c:1253:17: branch_true: ...to here
bluez-5.85/monitor/control.c:1253:17: throw: if ‘perror’ throws an exception...
bluez-5.85/monitor/control.c:1253:17: danger: ‘fd’ leaks here
# 1251|   
# 1252|   	if (listen(fd, 5) < 0) {
# 1253|-> 		perror("Failed to listen server socket");
# 1254|   		close(fd);
# 1255|   		return;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def291]
bluez-5.85/monitor/control.c:1254:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/monitor/control.c:1226:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1229:13: branch_false: ...to here
bluez-5.85/monitor/control.c:1229:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1234:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1236:14: acquire_resource: socket created here
bluez-5.85/monitor/control.c:1237:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/monitor/control.c:1242:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1246:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1252:13: branch_false: ...to here
bluez-5.85/monitor/control.c:1252:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/control.c:1253:17: branch_true: ...to here
bluez-5.85/monitor/control.c:1254:17: throw: if ‘close’ throws an exception...
bluez-5.85/monitor/control.c:1254:17: danger: ‘fd’ leaks here
# 1252|   	if (listen(fd, 5) < 0) {
# 1253|   		perror("Failed to listen server socket");
# 1254|-> 		close(fd);
# 1255|   		return;
# 1256|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def292]
bluez-5.85/monitor/control.c:1258:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/monitor/control.c:1226:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1229:13: branch_false: ...to here
bluez-5.85/monitor/control.c:1229:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1234:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1236:14: acquire_resource: socket created here
bluez-5.85/monitor/control.c:1237:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/monitor/control.c:1242:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1246:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1252:13: branch_false: ...to here
bluez-5.85/monitor/control.c:1252:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1258:13: branch_false: ...to here
bluez-5.85/monitor/control.c:1258:13: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/monitor/control.c:1258:13: danger: ‘fd’ leaks here
# 1256|   	}
# 1257|   
# 1258|-> 	if (mainloop_add_fd(fd, EPOLLIN, server_accept_callback,
# 1259|   						NULL, NULL) < 0) {
# 1260|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
bluez-5.85/monitor/control.c:1465:13: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/control.c:1424:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1430:13: branch_false: ...to here
bluez-5.85/monitor/control.c:1430:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1437:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1446:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/control.c:1453:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1455:16: acquire_memory: allocated here
bluez-5.85/monitor/control.c:1456:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/control.c:1461:9: branch_false: ...to here
bluez-5.85/monitor/control.c:1465:13: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/monitor/control.c:1465:13: danger: ‘data’ leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
# 1463|   	data->fd = fd;
# 1464|   
# 1465|-> 	if (mainloop_add_fd(data->fd, EPOLLIN, tty_callback,
# 1466|   						data, free_data) < 0) {
# 1467|   		close(data->fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def294]
bluez-5.85/monitor/display.c:78:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
bluez-5.85/monitor/display.c:100:6: enter_function: entry to ‘open_pager’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/display.c:129:17: branch_true: ...to here
bluez-5.85/monitor/display.c:130:17: call_function: calling ‘close_pipe’ from ‘open_pager’
#   76|   {
#   77|   	if (p[0] >= 0)
#   78|-> 		close(p[0]);
#   79|   	if (p[1] >= 0)
#   80|   		close(p[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def295]
bluez-5.85/monitor/display.c:78:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
bluez-5.85/monitor/display.c:100:6: enter_function: entry to ‘open_pager’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/display.c:129:17: branch_true: ...to here
bluez-5.85/monitor/display.c:130:17: call_function: calling ‘close_pipe’ from ‘open_pager’
#   76|   {
#   77|   	if (p[0] >= 0)
#   78|-> 		close(p[0]);
#   79|   	if (p[1] >= 0)
#   80|   		close(p[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def296]
bluez-5.85/monitor/display.c:80:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
bluez-5.85/monitor/display.c:100:6: enter_function: entry to ‘open_pager’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/display.c:129:17: branch_true: ...to here
bluez-5.85/monitor/display.c:130:17: call_function: calling ‘close_pipe’ from ‘open_pager’
#   78|   		close(p[0]);
#   79|   	if (p[1] >= 0)
#   80|-> 		close(p[1]);
#   81|   }
#   82|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def297]
bluez-5.85/monitor/display.c:80:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
bluez-5.85/monitor/display.c:100:6: enter_function: entry to ‘open_pager’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/display.c:129:17: branch_true: ...to here
bluez-5.85/monitor/display.c:130:17: call_function: calling ‘close_pipe’ from ‘open_pager’
#   78|   		close(p[0]);
#   79|   	if (p[1] >= 0)
#   80|-> 		close(p[1]);
#   81|   }
#   82|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def298]
bluez-5.85/monitor/display.c:107:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:134:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:158:13: branch_false: ...to here
bluez-5.85/monitor/display.c:158:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/display.c:159:17: branch_true: ...to here
bluez-5.85/monitor/display.c:107:17: danger: ‘fd[0]’ leaks here
#  105|   
#  106|   	if (pager_pid > 0)
#  107|-> 		return;
#  108|   
#  109|   	pager = getenv("PAGER");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def299]
bluez-5.85/monitor/display.c:107:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:134:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:158:13: branch_false: ...to here
bluez-5.85/monitor/display.c:158:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/display.c:159:17: branch_true: ...to here
bluez-5.85/monitor/display.c:107:17: danger: ‘fd[1]’ leaks here
#  105|   
#  106|   	if (pager_pid > 0)
#  107|-> 		return;
#  108|   
#  109|   	pager = getenv("PAGER");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def300]
bluez-5.85/monitor/display.c:129:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/display.c:129:17: branch_true: ...to here
bluez-5.85/monitor/display.c:129:17: throw: if ‘perror’ throws an exception...
bluez-5.85/monitor/display.c:129:17: danger: ‘fd[0]’ leaks here
#  127|   	pager_pid = fork();
#  128|   	if (pager_pid < 0) {
#  129|-> 		perror("Failed to fork pager");
#  130|   		close_pipe(fd);
#  131|   		return;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def301]
bluez-5.85/monitor/display.c:129:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/display.c:129:17: branch_true: ...to here
bluez-5.85/monitor/display.c:129:17: throw: if ‘perror’ throws an exception...
bluez-5.85/monitor/display.c:129:17: danger: ‘fd[1]’ leaks here
#  127|   	pager_pid = fork();
#  128|   	if (pager_pid < 0) {
#  129|-> 		perror("Failed to fork pager");
#  130|   		close_pipe(fd);
#  131|   		return;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def302]
bluez-5.85/monitor/display.c:158:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(fd[1], 1)’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:134:12: branch_false: ...to here
bluez-5.85/monitor/display.c:134:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:158:13: branch_false: ...to here
bluez-5.85/monitor/display.c:158:13: acquire_resource: opened here
bluez-5.85/monitor/display.c:158:12: danger: ‘dup2(fd[1], 1)’ leaks here; was opened at [(13)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/12)
#  156|   	}
#  157|   
#  158|-> 	if (dup2(fd[1], STDOUT_FILENO) < 0) {
#  159|   		perror("Failed to duplicate pager pipe");
#  160|   		return;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def303]
bluez-5.85/monitor/display.c:159:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:134:12: branch_false: ...to here
bluez-5.85/monitor/display.c:134:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:158:13: branch_false: ...to here
bluez-5.85/monitor/display.c:158:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/display.c:159:17: branch_true: ...to here
bluez-5.85/monitor/display.c:159:17: throw: if ‘perror’ throws an exception...
bluez-5.85/monitor/display.c:159:17: danger: ‘fd[0]’ leaks here
#  157|   
#  158|   	if (dup2(fd[1], STDOUT_FILENO) < 0) {
#  159|-> 		perror("Failed to duplicate pager pipe");
#  160|   		return;
#  161|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def304]
bluez-5.85/monitor/display.c:159:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:134:12: branch_false: ...to here
bluez-5.85/monitor/display.c:134:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:158:13: branch_false: ...to here
bluez-5.85/monitor/display.c:158:12: branch_true: following ‘true’ branch...
bluez-5.85/monitor/display.c:159:17: branch_true: ...to here
bluez-5.85/monitor/display.c:159:17: throw: if ‘perror’ throws an exception...
bluez-5.85/monitor/display.c:159:17: danger: ‘fd[1]’ leaks here
#  157|   
#  158|   	if (dup2(fd[1], STDOUT_FILENO) < 0) {
#  159|-> 		perror("Failed to duplicate pager pipe");
#  160|   		return;
#  161|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def305]
bluez-5.85/monitor/display.c:164:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
bluez-5.85/monitor/display.c:100:6: enter_function: entry to ‘open_pager’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:134:12: branch_false: ...to here
bluez-5.85/monitor/display.c:134:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:158:13: branch_false: ...to here
bluez-5.85/monitor/display.c:158:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:163:9: branch_false: ...to here
bluez-5.85/monitor/display.c:163:9: call_function: calling ‘close_pipe’ from ‘open_pager’
bluez-5.85/monitor/display.c:163:9: return_function: returning to ‘open_pager’ from ‘close_pipe’
bluez-5.85/monitor/display.c:164:1: danger: ‘fd[0]’ leaks here
#  162|   
#  163|   	close_pipe(fd);
#  164|-> }
#  165|   
#  166|   void close_pager(void)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def306]
bluez-5.85/monitor/display.c:164:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
bluez-5.85/monitor/display.c:100:6: enter_function: entry to ‘open_pager’
bluez-5.85/monitor/display.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:109:17: branch_false: ...to here
bluez-5.85/monitor/display.c:115:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:118:9: branch_false: ...to here
bluez-5.85/monitor/display.c:120:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:125:22: branch_false: ...to here
bluez-5.85/monitor/display.c:128:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:134:12: branch_false: ...to here
bluez-5.85/monitor/display.c:134:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:158:13: branch_false: ...to here
bluez-5.85/monitor/display.c:158:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/display.c:163:9: branch_false: ...to here
bluez-5.85/monitor/display.c:163:9: call_function: calling ‘close_pipe’ from ‘open_pager’
bluez-5.85/monitor/display.c:163:9: return_function: returning to ‘open_pager’ from ‘close_pipe’
bluez-5.85/monitor/display.c:164:1: danger: ‘fd[1]’ leaks here
#  162|   
#  163|   	close_pipe(fd);
#  164|-> }
#  165|   
#  166|   void close_pager(void)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def307]
bluez-5.85/monitor/ellisys.c:55:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/monitor/ellisys.c:39:12: branch_false: following ‘false’ branch...
bluez-5.85/monitor/ellisys.c:44:14: branch_false: ...to here
bluez-5.85/monitor/ellisys.c:44:14: acquire_resource: socket created here
bluez-5.85/monitor/ellisys.c:45:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/monitor/ellisys.c:50:9: branch_false: ...to here
bluez-5.85/monitor/ellisys.c:55:13: throw: if ‘connect’ throws an exception...
bluez-5.85/monitor/ellisys.c:55:13: danger: ‘fd’ leaks here
#   53|   	addr.sin_port = htons(port);
#   54|   
#   55|-> 	if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   56|   		perror("Failed to connect UDP injection socket");
#   57|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
bluez-5.85/monitor/hcidump.c:56:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:170:13: enter_function: entry to ‘open_device’
bluez-5.85/monitor/hcidump.c:174:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:175:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:175:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:181:20: call_function: calling ‘open_hci_dev’ from ‘open_device’
#   54|   	fd = socket(AF_BLUETOOTH, SOCK_RAW | SOCK_CLOEXEC, BTPROTO_HCI);
#   55|   	if (fd < 0) {
#   56|-> 		perror("Failed to open channel");
#   57|   		return -1;
#   58|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
bluez-5.85/monitor/hcidump.c:66:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:170:13: enter_function: entry to ‘open_device’
bluez-5.85/monitor/hcidump.c:174:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:175:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:175:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:181:20: call_function: calling ‘open_hci_dev’ from ‘open_device’
#   64|   
#   65|   	if (setsockopt(fd, SOL_HCI, HCI_FILTER, &flt, sizeof(flt)) < 0) {
#   66|-> 		perror("Failed to set HCI filter");
#   67|   		close(fd);
#   68|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
bluez-5.85/monitor/hcidump.c:67:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:170:13: enter_function: entry to ‘open_device’
bluez-5.85/monitor/hcidump.c:174:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:175:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:175:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:181:20: call_function: calling ‘open_hci_dev’ from ‘open_device’
#   65|   	if (setsockopt(fd, SOL_HCI, HCI_FILTER, &flt, sizeof(flt)) < 0) {
#   66|   		perror("Failed to set HCI filter");
#   67|-> 		close(fd);
#   68|   		return -1;
#   69|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
bluez-5.85/monitor/hcidump.c:72:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:170:13: enter_function: entry to ‘open_device’
bluez-5.85/monitor/hcidump.c:174:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:175:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:175:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:181:20: call_function: calling ‘open_hci_dev’ from ‘open_device’
#   70|   
#   71|   	if (setsockopt(fd, SOL_HCI, HCI_DATA_DIR, &opt, sizeof(opt)) < 0) {
#   72|-> 		perror("Failed to enable HCI data direction info");
#   73|   		close(fd);
#   74|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
bluez-5.85/monitor/hcidump.c:73:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:170:13: enter_function: entry to ‘open_device’
bluez-5.85/monitor/hcidump.c:174:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:175:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:175:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:181:20: call_function: calling ‘open_hci_dev’ from ‘open_device’
#   71|   	if (setsockopt(fd, SOL_HCI, HCI_DATA_DIR, &opt, sizeof(opt)) < 0) {
#   72|   		perror("Failed to enable HCI data direction info");
#   73|-> 		close(fd);
#   74|   		return -1;
#   75|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
bluez-5.85/monitor/hcidump.c:78:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:170:13: enter_function: entry to ‘open_device’
bluez-5.85/monitor/hcidump.c:174:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:175:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:175:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:181:20: call_function: calling ‘open_hci_dev’ from ‘open_device’
#   76|   
#   77|   	if (setsockopt(fd, SOL_HCI, HCI_TIME_STAMP, &opt, sizeof(opt)) < 0) {
#   78|-> 		perror("Failed to enable HCI time stamps");
#   79|   		close(fd);
#   80|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def314]
bluez-5.85/monitor/hcidump.c:79:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:170:13: enter_function: entry to ‘open_device’
bluez-5.85/monitor/hcidump.c:174:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:175:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:175:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:181:20: call_function: calling ‘open_hci_dev’ from ‘open_device’
#   77|   	if (setsockopt(fd, SOL_HCI, HCI_TIME_STAMP, &opt, sizeof(opt)) < 0) {
#   78|   		perror("Failed to enable HCI time stamps");
#   79|-> 		close(fd);
#   80|   		return -1;
#   81|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
bluez-5.85/monitor/hcidump.c:89:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:170:13: enter_function: entry to ‘open_device’
bluez-5.85/monitor/hcidump.c:174:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:175:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:175:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:181:20: call_function: calling ‘open_hci_dev’ from ‘open_device’
#   87|   
#   88|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   89|-> 		perror("Failed to bind channel");
#   90|   		close(fd);
#   91|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
bluez-5.85/monitor/hcidump.c:222:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:383:5: enter_function: entry to ‘hcidump_tracing’
bluez-5.85/monitor/hcidump.c:387:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:388:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:388:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:394:20: call_function: calling ‘open_stack_internal’ from ‘hcidump_tracing’
#  220|   	dl = malloc(max_dev * sizeof(*dr) + sizeof(*dl));
#  221|   	if (!dl) {
#  222|-> 		perror("Failed to allocate device list memory");
#  223|   		return;
#  224|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
bluez-5.85/monitor/hcidump.c:265:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:383:5: enter_function: entry to ‘hcidump_tracing’
bluez-5.85/monitor/hcidump.c:387:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:388:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:388:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:394:20: call_function: calling ‘open_stack_internal’ from ‘hcidump_tracing’
#  263|   	fd = socket(AF_BLUETOOTH, SOCK_RAW | SOCK_CLOEXEC, BTPROTO_HCI);
#  264|   	if (fd < 0) {
#  265|-> 		perror("Failed to open channel");
#  266|   		return -1;
#  267|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def318]
bluez-5.85/monitor/hcidump.c:275:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:383:5: enter_function: entry to ‘hcidump_tracing’
bluez-5.85/monitor/hcidump.c:387:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:388:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:388:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:394:20: call_function: calling ‘open_stack_internal’ from ‘hcidump_tracing’
#  273|   
#  274|   	if (setsockopt(fd, SOL_HCI, HCI_FILTER, &flt, sizeof(flt)) < 0) {
#  275|-> 		perror("Failed to set HCI filter");
#  276|   		close(fd);
#  277|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
bluez-5.85/monitor/hcidump.c:276:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:383:5: enter_function: entry to ‘hcidump_tracing’
bluez-5.85/monitor/hcidump.c:387:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:388:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:388:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:394:20: call_function: calling ‘open_stack_internal’ from ‘hcidump_tracing’
#  274|   	if (setsockopt(fd, SOL_HCI, HCI_FILTER, &flt, sizeof(flt)) < 0) {
#  275|   		perror("Failed to set HCI filter");
#  276|-> 		close(fd);
#  277|   		return -1;
#  278|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def320]
bluez-5.85/monitor/hcidump.c:281:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:383:5: enter_function: entry to ‘hcidump_tracing’
bluez-5.85/monitor/hcidump.c:387:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:388:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:388:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:394:20: call_function: calling ‘open_stack_internal’ from ‘hcidump_tracing’
#  279|   
#  280|   	if (setsockopt(fd, SOL_HCI, HCI_TIME_STAMP, &opt, sizeof(opt)) < 0) {
#  281|-> 		perror("Failed to enable HCI time stamps");
#  282|   		close(fd);
#  283|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def321]
bluez-5.85/monitor/hcidump.c:282:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:383:5: enter_function: entry to ‘hcidump_tracing’
bluez-5.85/monitor/hcidump.c:387:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:388:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:388:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:394:20: call_function: calling ‘open_stack_internal’ from ‘hcidump_tracing’
#  280|   	if (setsockopt(fd, SOL_HCI, HCI_TIME_STAMP, &opt, sizeof(opt)) < 0) {
#  281|   		perror("Failed to enable HCI time stamps");
#  282|-> 		close(fd);
#  283|   		return -1;
#  284|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
bluez-5.85/monitor/hcidump.c:292:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:383:5: enter_function: entry to ‘hcidump_tracing’
bluez-5.85/monitor/hcidump.c:387:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:388:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:388:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:394:20: call_function: calling ‘open_stack_internal’ from ‘hcidump_tracing’
#  290|   
#  291|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  292|-> 		perror("Failed to bind channel");
#  293|   		close(fd);
#  294|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
bluez-5.85/monitor/hcidump.c:293:17: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/monitor/hcidump.c:383:5: enter_function: entry to ‘hcidump_tracing’
bluez-5.85/monitor/hcidump.c:387:16: acquire_memory: allocated here
bluez-5.85/monitor/hcidump.c:388:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
bluez-5.85/monitor/hcidump.c:388:12: branch_false: ...to here
bluez-5.85/monitor/hcidump.c:394:20: call_function: calling ‘open_stack_internal’ from ‘hcidump_tracing’
#  291|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  292|   		perror("Failed to bind channel");
#  293|-> 		close(fd);
#  294|   		return -1;
#  295|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def324]
bluez-5.85/monitor/jlink.c:207:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tok’
bluez-5.85/monitor/jlink.c:203:12: branch_false: following ‘false’ branch (when ‘cfg’ is non-NULL)...
bluez-5.85/monitor/jlink.c:206:15: branch_false: ...to here
bluez-5.85/monitor/jlink.c:207:13: danger: dereference of NULL ‘tok’
#  205|   
#  206|   	tok = strtok(cfg, ",");
#  207|-> 	if (strlen(tok)) {
#  208|   		address = strtol(tok, NULL, 0);
#  209|   		area_size = 0x1000;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def325]
bluez-5.85/obexd/client/bip.c:266:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*maxsize’
bluez-5.85/obexd/client/bip.c:280:21: enter_function: entry to ‘get_image’
bluez-5.85/obexd/client/bip.c:295:14: call_function: calling ‘parse_get_image_dict’ from ‘get_image’
#  264|   		*encoding = strdup("");
#  265|   
#  266|-> 	DBG("pixel: '%s' encoding: '%s' maxsize: '%lu' transform: '%s'",
#  267|   			*pixel, *encoding, *maxsize, *transform
#  268|   	);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
bluez-5.85/obexd/plugins/filesystem.c:95:13: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(name)’
bluez-5.85/obexd/plugins/filesystem.c:469:17: enter_function: entry to ‘append_listing’
bluez-5.85/obexd/plugins/filesystem.c:480:14: acquire_memory: allocated here
bluez-5.85/obexd/plugins/filesystem.c:481:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/filesystem.c:487:12: branch_false: ...to here
bluez-5.85/obexd/plugins/filesystem.c:490:15: call_function: calling ‘verify_path’ from ‘append_listing’
#   93|   	int ret = 0;
#   94|   
#   95|-> 	if (obex_option_symlinks())
#   96|   		return 0;
#   97|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
bluez-5.85/obexd/plugins/filesystem.c:102:14: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(name)’
bluez-5.85/obexd/plugins/filesystem.c:469:17: enter_function: entry to ‘append_listing’
bluez-5.85/obexd/plugins/filesystem.c:480:14: acquire_memory: allocated here
bluez-5.85/obexd/plugins/filesystem.c:481:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/filesystem.c:487:12: branch_false: ...to here
bluez-5.85/obexd/plugins/filesystem.c:490:15: call_function: calling ‘verify_path’ from ‘append_listing’
#  100|   		return -errno;
#  101|   
#  102|-> 	if (!g_str_has_prefix(t, obex_option_root_folder()))
#  103|   		ret = -EPERM;
#  104|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
bluez-5.85/obexd/plugins/filesystem.c:503:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(name)’
bluez-5.85/obexd/plugins/filesystem.c:480:14: acquire_memory: allocated here
bluez-5.85/obexd/plugins/filesystem.c:481:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/filesystem.c:487:12: branch_false: ...to here
bluez-5.85/obexd/plugins/filesystem.c:491:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/filesystem.c:496:15: branch_false: ...to here
bluez-5.85/obexd/plugins/filesystem.c:497:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
bluez-5.85/obexd/plugins/filesystem.c:497:12: branch_false: ...to here
bluez-5.85/obexd/plugins/filesystem.c:503:22: throw: if ‘readdir’ throws an exception...
bluez-5.85/obexd/plugins/filesystem.c:503:22: danger: ‘opendir(name)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  501|   	}
#  502|   
#  503|-> 	while ((ep = readdir(dp))) {
#  504|   		char *filename;
#  505|   		char *fullname;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
bluez-5.85/obexd/plugins/filesystem.c:554:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(name)’
bluez-5.85/obexd/plugins/filesystem.c:480:14: acquire_memory: allocated here
bluez-5.85/obexd/plugins/filesystem.c:481:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/filesystem.c:487:12: branch_false: ...to here
bluez-5.85/obexd/plugins/filesystem.c:497:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
bluez-5.85/obexd/plugins/filesystem.c:498:20: branch_true: ...to here
bluez-5.85/obexd/plugins/filesystem.c:553:12: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/filesystem.c:554:17: branch_true: ...to here
bluez-5.85/obexd/plugins/filesystem.c:554:17: danger: ‘opendir(name)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  552|   failed:
#  553|   	if (dp)
#  554|-> 		closedir(dp);
#  555|   
#  556|   	g_string_free(object, TRUE);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def330]
bluez-5.85/obexd/plugins/mas.c:214:19: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/obexd/plugins/mas.c:213:9: acquire_resource: ‘va_start’ called here
bluez-5.85/obexd/plugins/mas.c:214:19: throw: if ‘g_markup_vprintf_escaped’ throws an exception...
bluez-5.85/obexd/plugins/mas.c:214:19: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  212|   
#  213|   	va_start(ap, format);
#  214|-> 	escaped = g_markup_vprintf_escaped(format, ap);
#  215|   	g_string_append(string, escaped);
#  216|   	g_free(escaped);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def331]
bluez-5.85/obexd/plugins/messages-dummy.c:97:27: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(g_build_filename(*fld_23(D)->session.cwd_absolute, *fld.name, 0))’
bluez-5.85/obexd/plugins/messages-dummy.c:123:16: enter_function: entry to ‘get_subdirs’
bluez-5.85/obexd/plugins/messages-dummy.c:130:14: acquire_memory: allocated here
bluez-5.85/obexd/plugins/messages-dummy.c:132:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:132:12: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:143:24: call_function: calling ‘get_next_subdir’ from ‘get_subdirs’
#   95|   
#   96|   	for (;;) {
#   97|-> 		if ((ep = readdir(dp)) == NULL)
#   98|   			return NULL;
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def332]
bluez-5.85/obexd/plugins/messages-dummy.c:165:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cur’
bluez-5.85/obexd/plugins/messages-dummy.c:176:17: enter_function: entry to ‘get_folder_listing’
bluez-5.85/obexd/plugins/messages-dummy.c:180:17: release_memory: ‘list’ is NULL
bluez-5.85/obexd/plugins/messages-dummy.c:182:13: call_function: calling ‘get_subdirs’ from ‘get_folder_listing’
bluez-5.85/obexd/plugins/messages-dummy.c:182:13: return_function: returning to ‘get_folder_listing’ from ‘get_subdirs’
bluez-5.85/obexd/plugins/messages-dummy.c:184:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:189:13: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:189:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:194:9: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:194:9: release_memory: ‘list’ is NULL
bluez-5.85/obexd/plugins/messages-dummy.c:194:9: call_function: calling ‘return_folder_listing’ from ‘get_folder_listing’
#  163|   
#  164|   	for (cur = list; offs < fld->offset; offs++) {
#  165|-> 		cur = cur->next;
#  166|   		if (cur == NULL)
#  167|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def333]
bluez-5.85/obexd/plugins/messages-dummy.c:509:9: warning[-Wanalyzer-file-leak]: leak of FILE
bluez-5.85/obexd/plugins/messages-dummy.c:493:19: acquire_resource: opened here
bluez-5.85/obexd/plugins/messages-dummy.c:494:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:509:9: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:509:9: danger: leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  507|   
#  508|   
#  509|-> 	g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, get_messages_listing,
#  510|   								mld, g_free);
#  511|   	g_free(path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
bluez-5.85/obexd/plugins/messages-dummy.c:509:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
bluez-5.85/obexd/plugins/messages-dummy.c:493:19: acquire_memory: allocated here
bluez-5.85/obexd/plugins/messages-dummy.c:494:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:509:9: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:509:9: danger: ‘<unknown>’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  507|   
#  508|   
#  509|-> 	g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, get_messages_listing,
#  510|   								mld, g_free);
#  511|   	g_free(path);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def335]
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_build_filename(*(struct session *)session.cwd_absolute,  handle, 0), "r")’
bluez-5.85/obexd/plugins/messages-dummy.c:530:14: acquire_resource: opened here
bluez-5.85/obexd/plugins/messages-dummy.c:531:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:537:13: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:537:12: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: branch_true: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: branch_true: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: throw: if ‘obex_debug’ throws an exception...
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: danger: ‘fopen(g_build_filename(*(struct session *)session.cwd_absolute,  handle, 0), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  536|   
#  537|   	if (fstat(fileno(fp), &file_info) < 0) {
#  538|-> 		DBG("Error getting file size");
#  539|   		err = -EBADR;
#  540|   		goto mmap_err;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_build_filename(*(struct session *)session.cwd_absolute,  handle, 0), "r")’
bluez-5.85/obexd/plugins/messages-dummy.c:530:14: acquire_memory: allocated here
bluez-5.85/obexd/plugins/messages-dummy.c:531:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:537:13: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:537:12: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: branch_true: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: branch_true: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: throw: if ‘obex_debug’ throws an exception...
bluez-5.85/obexd/plugins/messages-dummy.c:538:17: danger: ‘fopen(g_build_filename(*(struct session *)session.cwd_absolute,  handle, 0), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  536|   
#  537|   	if (fstat(fileno(fp), &file_info) < 0) {
#  538|-> 		DBG("Error getting file size");
#  539|   		err = -EBADR;
#  540|   		goto mmap_err;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def337]
bluez-5.85/obexd/plugins/messages-dummy.c:543:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_build_filename(*(struct session *)session.cwd_absolute,  handle, 0), "r")’
bluez-5.85/obexd/plugins/messages-dummy.c:530:14: acquire_resource: opened here
bluez-5.85/obexd/plugins/messages-dummy.c:531:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:537:13: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:537:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:543:21: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:546:12: branch_false: following ‘false’ branch (when ‘msg != 18446744073709551615’)...
bluez-5.85/obexd/plugins/messages-dummy.c:552:18: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:554:12: branch_true: following ‘true’ branch (when ‘callback’ is non-NULL)...
bluez-5.85/obexd/plugins/messages-dummy.c:555:17: branch_true: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:555:17: throw: if the called function throws an exception...
bluez-5.85/obexd/plugins/messages-dummy.c:543:21: danger: ‘fopen(g_build_filename(*(struct session *)session.cwd_absolute,  handle, 0), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  541|   	}
#  542|   
#  543|-> 	file_size = file_info.st_size;
#  544|   
#  545|   	msg = mmap(0, file_size, PROT_READ, MAP_PRIVATE, fileno(fp), 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def338]
bluez-5.85/obexd/plugins/messages-dummy.c:543:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_build_filename(*(struct session *)session.cwd_absolute,  handle, 0), "r")’
bluez-5.85/obexd/plugins/messages-dummy.c:530:14: acquire_memory: allocated here
bluez-5.85/obexd/plugins/messages-dummy.c:531:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:537:13: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:537:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:543:21: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:546:12: branch_false: following ‘false’ branch (when ‘msg != 18446744073709551615’)...
bluez-5.85/obexd/plugins/messages-dummy.c:552:18: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:554:12: branch_true: following ‘true’ branch (when ‘callback’ is non-NULL)...
bluez-5.85/obexd/plugins/messages-dummy.c:555:17: branch_true: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:555:17: throw: if the called function throws an exception...
bluez-5.85/obexd/plugins/messages-dummy.c:543:21: danger: ‘fopen(g_build_filename(*(struct session *)session.cwd_absolute,  handle, 0), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  541|   	}
#  542|   
#  543|-> 	file_size = file_info.st_size;
#  544|   
#  545|   	msg = mmap(0, file_size, PROT_READ, MAP_PRIVATE, fileno(fp), 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def339]
bluez-5.85/obexd/plugins/messages-dummy.c:555:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
bluez-5.85/obexd/plugins/messages-dummy.c:531:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:537:13: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:537:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:543:21: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:546:12: branch_false: following ‘false’ branch (when ‘msg != 18446744073709551615’)...
bluez-5.85/obexd/plugins/messages-dummy.c:552:18: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:552:18: acquire_memory: allocated here
bluez-5.85/obexd/plugins/messages-dummy.c:554:12: branch_true: following ‘true’ branch (when ‘callback’ is non-NULL)...
bluez-5.85/obexd/plugins/messages-dummy.c:555:17: branch_true: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:555:17: throw: if the called function throws an exception...
bluez-5.85/obexd/plugins/messages-dummy.c:555:17: danger: ‘buffer’ leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  553|   
#  554|   	if (callback)
#  555|-> 		callback(session, 0, 0, buffer, user_data);
#  556|   
#  557|   	if (munmap(msg, file_size) == -1) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def340]
bluez-5.85/obexd/plugins/messages-dummy.c:558:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
bluez-5.85/obexd/plugins/messages-dummy.c:531:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:537:13: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:537:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:543:21: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:546:12: branch_false: following ‘false’ branch (when ‘msg != 18446744073709551615’)...
bluez-5.85/obexd/plugins/messages-dummy.c:552:18: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:552:18: acquire_memory: allocated here
bluez-5.85/obexd/plugins/messages-dummy.c:554:12: branch_false: following ‘false’ branch (when ‘callback’ is NULL)...
bluez-5.85/obexd/plugins/messages-dummy.c:557:13: branch_false: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:557:12: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:558:17: branch_true: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:558:17: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/messages-dummy.c:558:17: branch_true: ...to here
bluez-5.85/obexd/plugins/messages-dummy.c:558:17: throw: if ‘obex_debug’ throws an exception...
bluez-5.85/obexd/plugins/messages-dummy.c:558:17: danger: ‘buffer’ leaks here; was allocated at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
#  556|   
#  557|   	if (munmap(msg, file_size) == -1) {
#  558|-> 		DBG("Error unmapping");
#  559|   		err = -EBADR;
#  560|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
bluez-5.85/obexd/plugins/phonebook-dummy.c:167:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
bluez-5.85/obexd/plugins/phonebook-dummy.c:119:12: branch_false: following ‘false’ branch (when ‘folderfd >= 0’)...
bluez-5.85/obexd/plugins/phonebook-dummy.c:119:12: branch_false: ...to here
bluez-5.85/obexd/plugins/phonebook-dummy.c:156:25: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/phonebook-dummy.c:157:29: branch_true: ...to here
bluez-5.85/obexd/plugins/phonebook-dummy.c:160:20: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/phonebook-dummy.c:166:22: branch_false: ...to here
bluez-5.85/obexd/plugins/phonebook-dummy.c:166:22: acquire_memory: allocated here
bluez-5.85/obexd/plugins/phonebook-dummy.c:167:21: throw: if ‘Parse_MIME_FromFile’ throws an exception...
bluez-5.85/obexd/plugins/phonebook-dummy.c:167:21: danger: ‘fp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  165|   
#  166|   		fp = fdopen(fd, "r");
#  167|-> 		v = Parse_MIME_FromFile(fp);
#  168|   		if (v != NULL) {
#  169|   			func(filename, v, user_data);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def342]
bluez-5.85/obexd/plugins/phonebook-dummy.c:516:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(root_folder,  folder,  id, 0), 0)’
bluez-5.85/obexd/plugins/phonebook-dummy.c:514:14: acquire_resource: opened here
bluez-5.85/obexd/plugins/phonebook-dummy.c:516:9: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/phonebook-dummy.c:516:9: branch_true: ...to here
bluez-5.85/obexd/plugins/phonebook-dummy.c:516:9: throw: if ‘g_free_sized’ throws an exception...
bluez-5.85/obexd/plugins/phonebook-dummy.c:516:9: danger: ‘open(g_build_filename(root_folder,  folder,  id, 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  514|   	fd = open(filename, O_RDONLY);
#  515|   
#  516|-> 	g_free(filename);
#  517|   
#  518|   	if (fd < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def343]
bluez-5.85/obexd/plugins/phonebook-dummy.c:525:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(root_folder,  folder,  id, 0), 0)’
bluez-5.85/obexd/plugins/phonebook-dummy.c:514:14: acquire_resource: opened here
bluez-5.85/obexd/plugins/phonebook-dummy.c:518:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/phonebook-dummy.c:525:17: branch_false: ...to here
bluez-5.85/obexd/plugins/phonebook-dummy.c:525:17: throw: if ‘g_malloc0’ throws an exception...
bluez-5.85/obexd/plugins/phonebook-dummy.c:525:17: danger: ‘open(g_build_filename(root_folder,  folder,  id, 0), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  523|   	}
#  524|   
#  525|-> 	dummy = g_new0(struct dummy_data, 1);
#  526|   	dummy->cb = cb;
#  527|   	dummy->user_data = user_data;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def344]
bluez-5.85/obexd/plugins/phonebook-dummy.c:531:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor
bluez-5.85/obexd/plugins/phonebook-dummy.c:514:14: acquire_resource: opened here
bluez-5.85/obexd/plugins/phonebook-dummy.c:518:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/phonebook-dummy.c:525:17: branch_false: ...to here
bluez-5.85/obexd/plugins/phonebook-dummy.c:531:21: throw: if ‘g_idle_add_full’ throws an exception...
bluez-5.85/obexd/plugins/phonebook-dummy.c:531:21: danger: leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  529|   	dummy->fd = fd;
#  530|   
#  531|-> 	dummy->id = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, read_entry, dummy,
#  532|   								dummy_free);
#  533|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
bluez-5.85/obexd/plugins/phonebook-dummy.c:550:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(g_build_filename(root_folder,  name, 0))’
bluez-5.85/obexd/plugins/phonebook-dummy.c:549:14: acquire_memory: allocated here
bluez-5.85/obexd/plugins/phonebook-dummy.c:550:9: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/phonebook-dummy.c:550:9: branch_true: ...to here
bluez-5.85/obexd/plugins/phonebook-dummy.c:550:9: throw: if ‘g_free_sized’ throws an exception...
bluez-5.85/obexd/plugins/phonebook-dummy.c:550:9: danger: ‘opendir(g_build_filename(root_folder,  name, 0))’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  548|   	foldername = g_build_filename(root_folder, name, NULL);
#  549|   	dp = opendir(foldername);
#  550|-> 	g_free(foldername);
#  551|   
#  552|   	if (dp == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
bluez-5.85/obexd/plugins/phonebook-dummy.c:559:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(g_build_filename(root_folder,  name, 0))’
bluez-5.85/obexd/plugins/phonebook-dummy.c:549:14: acquire_memory: allocated here
bluez-5.85/obexd/plugins/phonebook-dummy.c:552:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/phonebook-dummy.c:559:17: branch_false: ...to here
bluez-5.85/obexd/plugins/phonebook-dummy.c:559:17: throw: if ‘g_malloc0’ throws an exception...
bluez-5.85/obexd/plugins/phonebook-dummy.c:559:17: danger: ‘opendir(g_build_filename(root_folder,  name, 0))’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  557|   	}
#  558|   
#  559|-> 	query = g_new0(struct cache_query, 1);
#  560|   	query->entry_cb = entry_cb;
#  561|   	query->ready_cb = ready_cb;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
bluez-5.85/obexd/plugins/phonebook-dummy.c:565:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
bluez-5.85/obexd/plugins/phonebook-dummy.c:549:14: acquire_memory: allocated here
bluez-5.85/obexd/plugins/phonebook-dummy.c:552:12: branch_false: following ‘false’ branch...
bluez-5.85/obexd/plugins/phonebook-dummy.c:559:17: branch_false: ...to here
bluez-5.85/obexd/plugins/phonebook-dummy.c:565:17: throw: if ‘g_malloc0’ throws an exception...
bluez-5.85/obexd/plugins/phonebook-dummy.c:565:17: danger: ‘<unknown>’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  563|   	query->dp = dp;
#  564|   
#  565|-> 	dummy = g_new0(struct dummy_data, 1);
#  566|   
#  567|   	dummy->id = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, create_cache,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def348]
bluez-5.85/obexd/plugins/vcard.c:251:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/obexd/plugins/vcard.c:738:13: enter_function: entry to ‘vcard_printf_datetime’
bluez-5.85/obexd/plugins/vcard.c:744:9: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/vcard.c:744:9: branch_true: ...to here
bluez-5.85/obexd/plugins/vcard.c:762:12: branch_true: following ‘true’ branch...
bluez-5.85/obexd/plugins/vcard.c:763:17: branch_true: ...to here
bluez-5.85/obexd/plugins/vcard.c:764:17: call_function: calling ‘vcard_qp_print_encoded’ from ‘vcard_printf_datetime’
#  249|   	const char *pos;
#  250|   
#  251|-> 	if (g_utf8_validate(field, -1, NULL) == FALSE)
#  252|   		return FALSE;
#  253|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def349]
bluez-5.85/obexd/src/log.c:30:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/obexd/src/log.c:28:9: acquire_resource: ‘va_start’ called here
bluez-5.85/obexd/src/log.c:30:9: throw: if ‘vsyslog’ throws an exception...
bluez-5.85/obexd/src/log.c:30:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   28|   	va_start(ap, format);
#   29|   
#   30|-> 	vsyslog(LOG_INFO, format, ap);
#   31|   
#   32|   	va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def350]
bluez-5.85/obexd/src/log.c:41:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/obexd/src/log.c:39:9: acquire_resource: ‘va_start’ called here
bluez-5.85/obexd/src/log.c:41:9: throw: if ‘vsyslog’ throws an exception...
bluez-5.85/obexd/src/log.c:41:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   39|   	va_start(ap, format);
#   40|   
#   41|-> 	vsyslog(LOG_ERR, format, ap);
#   42|   
#   43|   	va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def351]
bluez-5.85/obexd/src/log.c:52:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/obexd/src/log.c:50:9: acquire_resource: ‘va_start’ called here
bluez-5.85/obexd/src/log.c:52:9: throw: if ‘vsyslog’ throws an exception...
bluez-5.85/obexd/src/log.c:52:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   50|   	va_start(ap, format);
#   51|   
#   52|-> 	vsyslog(LOG_DEBUG, format, ap);
#   53|   
#   54|   	va_end(ap);

Error: CPPCHECK_WARNING (CWE-758): [#def352]
bluez-5.85/obexd/src/log.c:85: error[comparePointers]: Comparing pointers that point to different objects
#   83|   	struct obex_debug_desc *desc;
#   84|   
#   85|-> 	for (desc = __start___debug; desc < __stop___debug; desc++)
#   86|   		desc->flags |= OBEX_DEBUG_FLAG_PRINT;
#   87|   }

Error: CPPCHECK_WARNING (CWE-758): [#def353]
bluez-5.85/obexd/src/log.c:98: error[comparePointers]: Comparing pointers that point to different objects
#   96|   		enabled = g_strsplit_set(debug, ":, ", 0);
#   97|   
#   98|-> 	for (desc = __start___debug; desc < __stop___debug; desc++) {
#   99|   		if (file != NULL || name != NULL) {
#  100|   			if (g_strcmp0(desc->file, file) == 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def354]
bluez-5.85/peripheral/efivars.c:75:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pathname, 524288)’
bluez-5.85/peripheral/efivars.c:66:14: acquire_resource: opened here
bluez-5.85/peripheral/efivars.c:67:12: branch_false: following ‘false’ branch...
bluez-5.85/peripheral/efivars.c:70:9: branch_false: ...to here
bluez-5.85/peripheral/efivars.c:75:15: throw: if ‘readv’ throws an exception...
bluez-5.85/peripheral/efivars.c:75:15: danger: ‘open(&pathname, 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   73|   	iov[1].iov_len = size;
#   74|   
#   75|-> 	len = readv(fd, iov, 2);
#   76|   
#   77|   	close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
bluez-5.85/peripheral/efivars.c:102:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/peripheral/efivars.c:98:15: acquire_memory: allocated here
bluez-5.85/peripheral/efivars.c:99:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/peripheral/efivars.c:102:14: branch_false: ...to here
bluez-5.85/peripheral/efivars.c:102:14: throw: if ‘open’ throws an exception...
bluez-5.85/peripheral/efivars.c:102:14: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  100|   		return -ENOMEM;
#  101|   
#  102|-> 	fd = open(pathname, O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, 0644);
#  103|   	if (fd < 0) {
#  104|   		free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
bluez-5.85/peripheral/efivars.c:111:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/peripheral/efivars.c:98:15: acquire_memory: allocated here
bluez-5.85/peripheral/efivars.c:99:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/peripheral/efivars.c:102:14: branch_false: ...to here
bluez-5.85/peripheral/efivars.c:103:12: branch_false: following ‘false’ branch...
bluez-5.85/peripheral/efivars.c:108:9: branch_false: ...to here
bluez-5.85/peripheral/efivars.c:111:19: throw: if ‘write’ throws an exception...
bluez-5.85/peripheral/efivars.c:111:19: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  109|   	memcpy(buf + sizeof(attributes), data, size);
#  110|   
#  111|-> 	written = write(fd, buf, size + sizeof(attributes));
#  112|   
#  113|   	close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def357]
bluez-5.85/peripheral/efivars.c:113:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/peripheral/efivars.c:98:15: acquire_memory: allocated here
bluez-5.85/peripheral/efivars.c:99:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/peripheral/efivars.c:102:14: branch_false: ...to here
bluez-5.85/peripheral/efivars.c:103:12: branch_false: following ‘false’ branch...
bluez-5.85/peripheral/efivars.c:108:9: branch_false: ...to here
bluez-5.85/peripheral/efivars.c:113:9: throw: if ‘close’ throws an exception...
bluez-5.85/peripheral/efivars.c:113:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  111|   	written = write(fd, buf, size + sizeof(attributes));
#  112|   
#  113|-> 	close(fd);
#  114|   	free(buf);
#  115|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def358]
bluez-5.85/peripheral/gap.c:89:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/peripheral/gap.c:75:15: acquire_memory: allocated here
bluez-5.85/peripheral/gap.c:76:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/peripheral/gap.c:76:12: branch_false: ...to here
bluez-5.85/peripheral/gap.c:89:9: throw: if ‘mgmt_send’ throws an exception...
bluez-5.85/peripheral/gap.c:89:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   87|   	memcpy(cp->data, ad, sizeof(ad));
#   88|   
#   89|-> 	mgmt_send(mgmt, MGMT_OP_ADD_ADVERTISING, index,
#   90|   			sizeof(*cp) + sizeof(ad), buf, NULL, NULL, NULL);
#   91|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def359]
bluez-5.85/peripheral/gatt.c:102:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(att_fd, & addr, & addrlen)’
bluez-5.85/peripheral/gatt.c:143:13: enter_function: entry to ‘att_conn_callback’
bluez-5.85/peripheral/gatt.c:150:12: branch_false: following ‘false’ branch...
bluez-5.85/peripheral/gatt.c:155:9: branch_false: ...to here
bluez-5.85/peripheral/gatt.c:159:12: branch_false: following ‘false’ branch...
bluez-5.85/peripheral/gatt.c:164:16: branch_false: ...to here
bluez-5.85/peripheral/gatt.c:164:16: call_function: calling ‘gatt_conn_new’ from ‘att_conn_callback’
#  100|   	uint16_t mtu = 0;
#  101|   
#  102|-> 	conn = new0(struct gatt_conn, 1);
#  103|   	if (!conn)
#  104|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def360]
bluez-5.85/peripheral/gatt.c:106:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(att_fd, & addr, & addrlen)’
bluez-5.85/peripheral/gatt.c:143:13: enter_function: entry to ‘att_conn_callback’
bluez-5.85/peripheral/gatt.c:150:12: branch_false: following ‘false’ branch...
bluez-5.85/peripheral/gatt.c:155:9: branch_false: ...to here
bluez-5.85/peripheral/gatt.c:159:12: branch_false: following ‘false’ branch...
bluez-5.85/peripheral/gatt.c:164:16: branch_false: ...to here
bluez-5.85/peripheral/gatt.c:164:16: call_function: calling ‘gatt_conn_new’ from ‘att_conn_callback’
#  104|   		return NULL;
#  105|   
#  106|-> 	conn->att = bt_att_new(fd, false);
#  107|   	if (!conn->att) {
#  108|   		fprintf(stderr, "Failed to initialize ATT transport layer\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def361]
bluez-5.85/plugins/autopair.c:282:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
bluez-5.85/plugins/autopair.c:271:14: acquire_resource: opened here
bluez-5.85/plugins/autopair.c:272:12: branch_false: following ‘false’ branch...
bluez-5.85/plugins/autopair.c:279:13: branch_false: ...to here
bluez-5.85/plugins/autopair.c:280:12: branch_true: following ‘true’ branch...
bluez-5.85/plugins/autopair.c:281:23: branch_true: ...to here
bluez-5.85/plugins/autopair.c:282:17: throw: if ‘btd_error’ throws an exception...
bluez-5.85/plugins/autopair.c:282:17: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  280|   	if (n < (ssize_t) sizeof(seed)) {
#  281|   		err = (n == -1) ? -errno : -EIO;
#  282|-> 		error("Failed to read %zu bytes from /dev/urandom: %s (%d)",
#  283|   					sizeof(seed), strerror(-err), -err);
#  284|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def362]
bluez-5.85/plugins/autopair.c:288:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
bluez-5.85/plugins/autopair.c:271:14: acquire_resource: opened here
bluez-5.85/plugins/autopair.c:272:12: branch_false: following ‘false’ branch...
bluez-5.85/plugins/autopair.c:279:13: branch_false: ...to here
bluez-5.85/plugins/autopair.c:280:12: branch_false: following ‘false’ branch...
bluez-5.85/plugins/autopair.c:288:9: branch_false: ...to here
bluez-5.85/plugins/autopair.c:288:9: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  286|   	}
#  287|   
#  288|-> 	close(fd);
#  289|   
#  290|   	srand(seed);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def363]
bluez-5.85/profiles/audio/a2dp.c:231:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/profiles/audio/a2dp.c:1525:17: enter_function: entry to ‘a2dp_reconfigure’
bluez-5.85/profiles/audio/a2dp.c:1575:9: call_function: calling ‘finalize_setup_errno’ from ‘a2dp_reconfigure’
#  229|   	setup->ref++;
#  230|   
#  231|-> 	DBG("%p: ref=%d", setup, setup->ref);
#  232|   
#  233|   	return setup;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def364]
bluez-5.85/profiles/audio/a2dp.c:3002:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘*setup.rsep’
bluez-5.85/profiles/audio/a2dp.c:2981:13: enter_function: entry to ‘select_cb’
bluez-5.85/profiles/audio/a2dp.c:2987:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/a2dp.c:2990:12: branch_false: ...to here
bluez-5.85/profiles/audio/a2dp.c:2990:12: branch_false: following ‘false’ branch (when ‘size < 0’)...
bluez-5.85/profiles/audio/a2dp.c:2995:22: branch_false: ...to here
bluez-5.85/profiles/audio/a2dp.c:2996:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/a2dp.c:3001:23: branch_false: ...to here
bluez-5.85/profiles/audio/a2dp.c:3001:23: call_function: calling ‘find_remote_sep’ from ‘select_cb’
bluez-5.85/profiles/audio/a2dp.c:3001:23: return_function: returning to ‘select_cb’ from ‘find_remote_sep’
bluez-5.85/profiles/audio/a2dp.c:3001:9: release_memory: ‘*setup.rsep’ is NULL
bluez-5.85/profiles/audio/a2dp.c:3002:19: danger: dereference of NULL ‘find_remote_sep(*setup.chan,  queue_pop_head(*setup.eps))’
# 3000|   
# 3001|   	setup->rsep = find_remote_sep(setup->chan, setup->sep);
# 3002|-> 	service = avdtp_get_codec(setup->rsep->sep);
# 3003|   	codec = (struct avdtp_media_codec_capability *) service->data;
# 3004|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def365]
bluez-5.85/profiles/audio/a2dp.c:3048:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
bluez-5.85/profiles/audio/a2dp.c:3024:16: branch_true: following ‘true’ branch (when ‘list’ is non-NULL)...
bluez-5.85/profiles/audio/a2dp.c:3025:34: branch_true: ...to here
bluez-5.85/profiles/audio/a2dp.c:3044:20: branch_true: following ‘true’ branch (when ‘seps’ is NULL)...
bluez-5.85/profiles/audio/a2dp.c:3045:32: branch_true: ...to here
bluez-5.85/profiles/audio/a2dp.c:3048:21: danger: dereference of NULL ‘find_channel(session)’
# 3046|   
# 3047|   		/* Prepend last used so it is preferred over others */
# 3048|-> 		if (chan->last_used && (chan->last_used->lsep == sep &&
# 3049|   					chan->last_used->rsep->sep == rsep))
# 3050|   			queue_push_head(seps, sep);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def366]
bluez-5.85/profiles/audio/avctp.c:1204:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/profiles/audio/avctp.c:1164:14: acquire_resource: opened here
bluez-5.85/profiles/audio/avctp.c:1165:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/avctp.c:1178:9: branch_false: ...to here
bluez-5.85/profiles/audio/avctp.c:1204:26: throw: if ‘btd_device_get_vendor’ throws an exception...
bluez-5.85/profiles/audio/avctp.c:1204:26: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1202|   
# 1203|   	dev.id.bustype = BUS_BLUETOOTH;
# 1204|-> 	dev.id.vendor  = btd_device_get_vendor(device);
# 1205|   	dev.id.product = btd_device_get_product(device);
# 1206|   	dev.id.version = btd_device_get_version(device);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def367]
bluez-5.85/profiles/audio/avctp.c:1205:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/profiles/audio/avctp.c:1164:14: acquire_resource: opened here
bluez-5.85/profiles/audio/avctp.c:1165:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/avctp.c:1178:9: branch_false: ...to here
bluez-5.85/profiles/audio/avctp.c:1205:26: throw: if ‘btd_device_get_product’ throws an exception...
bluez-5.85/profiles/audio/avctp.c:1205:26: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1203|   	dev.id.bustype = BUS_BLUETOOTH;
# 1204|   	dev.id.vendor  = btd_device_get_vendor(device);
# 1205|-> 	dev.id.product = btd_device_get_product(device);
# 1206|   	dev.id.version = btd_device_get_version(device);
# 1207|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def368]
bluez-5.85/profiles/audio/avctp.c:1206:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/profiles/audio/avctp.c:1164:14: acquire_resource: opened here
bluez-5.85/profiles/audio/avctp.c:1165:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/avctp.c:1178:9: branch_false: ...to here
bluez-5.85/profiles/audio/avctp.c:1206:26: throw: if ‘btd_device_get_version’ throws an exception...
bluez-5.85/profiles/audio/avctp.c:1206:26: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1204|   	dev.id.vendor  = btd_device_get_vendor(device);
# 1205|   	dev.id.product = btd_device_get_product(device);
# 1206|-> 	dev.id.version = btd_device_get_version(device);
# 1207|   
# 1208|   	if (write(fd, &dev, sizeof(dev)) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def369]
bluez-5.85/profiles/audio/avctp.c:1208:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/profiles/audio/avctp.c:1164:14: acquire_resource: opened here
bluez-5.85/profiles/audio/avctp.c:1165:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/avctp.c:1178:9: branch_false: ...to here
bluez-5.85/profiles/audio/avctp.c:1208:13: throw: if ‘write’ throws an exception...
bluez-5.85/profiles/audio/avctp.c:1208:13: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1206|   	dev.id.version = btd_device_get_version(device);
# 1207|   
# 1208|-> 	if (write(fd, &dev, sizeof(dev)) < 0) {
# 1209|   		err = -errno;
# 1210|   		error("Can't write device information: %s (%d)",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def370]
bluez-5.85/profiles/audio/avctp.c:1210:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/profiles/audio/avctp.c:1164:14: acquire_resource: opened here
bluez-5.85/profiles/audio/avctp.c:1165:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/avctp.c:1178:9: branch_false: ...to here
bluez-5.85/profiles/audio/avctp.c:1208:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/audio/avctp.c:1209:24: branch_true: ...to here
bluez-5.85/profiles/audio/avctp.c:1210:17: throw: if ‘btd_error’ throws an exception...
bluez-5.85/profiles/audio/avctp.c:1210:17: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1208|   	if (write(fd, &dev, sizeof(dev)) < 0) {
# 1209|   		err = -errno;
# 1210|-> 		error("Can't write device information: %s (%d)",
# 1211|   						strerror(-err), -err);
# 1212|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def371]
bluez-5.85/profiles/audio/avctp.c:1212:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/profiles/audio/avctp.c:1164:14: acquire_resource: opened here
bluez-5.85/profiles/audio/avctp.c:1165:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/avctp.c:1178:9: branch_false: ...to here
bluez-5.85/profiles/audio/avctp.c:1208:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/audio/avctp.c:1209:24: branch_true: ...to here
bluez-5.85/profiles/audio/avctp.c:1212:17: throw: if ‘close’ throws an exception...
bluez-5.85/profiles/audio/avctp.c:1212:17: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1210|   		error("Can't write device information: %s (%d)",
# 1211|   						strerror(-err), -err);
# 1212|-> 		close(fd);
# 1213|   		return err;
# 1214|   	}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def372]
bluez-5.85/profiles/audio/avrcp.c:742:14: warning[-Wanalyzer-null-argument]: use of NULL ‘status’ where non-null expected
bluez-5.85/profiles/audio/avrcp.c:4600:6: enter_function: entry to ‘avrcp_unregister_player’
bluez-5.85/profiles/audio/avrcp.c:4608:36: branch_true: following ‘true’ branch (when ‘l’ is non-NULL)...
bluez-5.85/profiles/audio/avrcp.c:4609:31: branch_true: ...to here
bluez-5.85/profiles/audio/avrcp.c:4623:25: call_function: calling ‘notify_addressed_player_changed’ from ‘avrcp_unregister_player’
#  740|   static int play_status_to_val(const char *status)
#  741|   {
#  742|-> 	if (!strcasecmp(status, "stopped"))
#  743|   		return AVRCP_PLAY_STATUS_STOPPED;
#  744|   	else if (!strcasecmp(status, "playing"))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def373]
bluez-5.85/profiles/audio/avrcp.c:825:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘data’
bluez-5.85/profiles/audio/avrcp.c:4600:6: enter_function: entry to ‘avrcp_unregister_player’
bluez-5.85/profiles/audio/avrcp.c:4608:36: branch_true: following ‘true’ branch (when ‘l’ is non-NULL)...
bluez-5.85/profiles/audio/avrcp.c:4609:31: branch_true: ...to here
bluez-5.85/profiles/audio/avrcp.c:4623:25: call_function: calling ‘notify_addressed_player_changed’ from ‘avrcp_unregister_player’
#  823|   	case AVRCP_EVENT_TRACK_CHANGED:
#  824|   		size = 9;
#  825|-> 		memcpy(&pdu->params[1], data, sizeof(uint64_t));
#  826|   
#  827|   		break;

Error: CPPCHECK_WARNING (CWE-457): [#def374]
bluez-5.85/profiles/audio/avrcp.c:2377: warning[uninitvar]: Uninitialized variable: attrs
# 2375|   	pdu->params[0] = count;
# 2376|   
# 2377|-> 	memcpy(pdu->params + 1, attrs, count);
# 2378|   
# 2379|   	avctp_send_vendordep_req(session->conn, AVC_CTYPE_STATUS,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def375]
bluez-5.85/profiles/audio/bap.c:2632:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘setup’
bluez-5.85/profiles/audio/bap.c:2805:13: enter_function: entry to ‘bap_state’
bluez-5.85/profiles/audio/bap.c:2819:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bap.c:2822:17: branch_false: ...to here
bluez-5.85/profiles/audio/bap.c:2847:20: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bap.c:2853:25: branch_false: ...to here
bluez-5.85/profiles/audio/bap.c:2853:25: call_function: calling ‘setup_create_io’ from ‘bap_state’
# 2630|   		return;
# 2631|   
# 2632|-> 	if (setup->io_id) {
# 2633|   		g_source_remove(setup->io_id);
# 2634|   		setup->io_id = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def376]
bluez-5.85/profiles/audio/bap.c:3583:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘setup’
bluez-5.85/profiles/audio/bap.c:2805:13: enter_function: entry to ‘bap_state’
bluez-5.85/profiles/audio/bap.c:2819:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bap.c:2822:17: branch_false: ...to here
bluez-5.85/profiles/audio/bap.c:2847:20: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bap.c:2853:25: branch_false: ...to here
bluez-5.85/profiles/audio/bap.c:2853:25: call_function: calling ‘setup_create_io’ from ‘bap_state’
# 3581|   {
# 3582|   	GError *err = NULL;
# 3583|-> 	struct bap_data *bap_data = setup->data;
# 3584|   
# 3585|   	DBG("Create PA sync with this source");

Error: CPPCHECK_WARNING (CWE-476): [#def377]
bluez-5.85/profiles/audio/bass.c:969: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
#  967|   
#  968|   	addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
#  969|-> 	memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
#  970|   	addr->iso_family = AF_BLUETOOTH;
#  971|   

Error: CPPCHECK_WARNING (CWE-476): [#def378]
bluez-5.85/profiles/audio/bass.c:970: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
#  968|   	addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
#  969|   	memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
#  970|-> 	addr->iso_family = AF_BLUETOOTH;
#  971|   
#  972|   	bacpy(&addr->iso_bc->bc_bdaddr, (void *) device_get_address(device));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def379]
bluez-5.85/profiles/audio/bass.c:970:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘addr’
bluez-5.85/profiles/audio/bass.c:942:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bass.c:947:14: branch_false: ...to here
bluez-5.85/profiles/audio/bass.c:948:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bass.c:951:12: branch_false: ...to here
bluez-5.85/profiles/audio/bass.c:968:16: acquire_memory: this call could return NULL
bluez-5.85/profiles/audio/bass.c:970:9: danger: ‘addr’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  968|   	addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
#  969|   	memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
#  970|-> 	addr->iso_family = AF_BLUETOOTH;
#  971|   
#  972|   	bacpy(&addr->iso_bc->bc_bdaddr, (void *) device_get_address(device));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
bluez-5.85/profiles/audio/bass.c:972:9: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/profiles/audio/bass.c:942:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bass.c:947:14: branch_false: ...to here
bluez-5.85/profiles/audio/bass.c:948:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bass.c:951:12: branch_false: ...to here
bluez-5.85/profiles/audio/bass.c:968:16: acquire_memory: allocated here
bluez-5.85/profiles/audio/bass.c:972:9: throw: if ‘device_get_address’ throws an exception...
bluez-5.85/profiles/audio/bass.c:972:9: danger: ‘addr’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  970|   	addr->iso_family = AF_BLUETOOTH;
#  971|   
#  972|-> 	bacpy(&addr->iso_bc->bc_bdaddr, (void *) device_get_address(device));
#  973|   	addr->iso_bc->bc_bdaddr_type = device_get_le_address_type(device);
#  974|   

Error: CPPCHECK_WARNING (CWE-476): [#def381]
bluez-5.85/profiles/audio/bass.c:973: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
#  971|   
#  972|   	bacpy(&addr->iso_bc->bc_bdaddr, (void *) device_get_address(device));
#  973|-> 	addr->iso_bc->bc_bdaddr_type = device_get_le_address_type(device);
#  974|   
#  975|   	err = bind(sk, (struct sockaddr *) addr, sizeof(*addr) +

Error: GCC_ANALYZER_WARNING (CWE-401): [#def382]
bluez-5.85/profiles/audio/bass.c:973:40: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/profiles/audio/bass.c:942:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bass.c:947:14: branch_false: ...to here
bluez-5.85/profiles/audio/bass.c:948:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bass.c:951:12: branch_false: ...to here
bluez-5.85/profiles/audio/bass.c:968:16: acquire_memory: allocated here
bluez-5.85/profiles/audio/bass.c:973:40: throw: if ‘device_get_le_address_type’ throws an exception...
bluez-5.85/profiles/audio/bass.c:973:40: danger: ‘addr’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  971|   
#  972|   	bacpy(&addr->iso_bc->bc_bdaddr, (void *) device_get_address(device));
#  973|-> 	addr->iso_bc->bc_bdaddr_type = device_get_le_address_type(device);
#  974|   
#  975|   	err = bind(sk, (struct sockaddr *) addr, sizeof(*addr) +

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
bluez-5.85/profiles/audio/bass.c:1962:9: warning[-Wanalyzer-malloc-leak]: leak of ‘iov.iov_base’
bluez-5.85/profiles/audio/bass.c:1953:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bass.c:1958:24: branch_false: ...to here
bluez-5.85/profiles/audio/bass.c:1958:24: acquire_memory: allocated here
bluez-5.85/profiles/audio/bass.c:1959:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/audio/bass.c:1962:9: branch_false: ...to here
bluez-5.85/profiles/audio/bass.c:1962:9: throw: if ‘util_iov_push_mem’ throws an exception...
bluez-5.85/profiles/audio/bass.c:1962:9: danger: ‘iov.iov_base’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1960|   		return;
# 1961|   
# 1962|-> 	util_iov_push_mem(&iov, sizeof(params), &params);
# 1963|   
# 1964|   	err = bt_bass_send(assistant->data->bass, &hdr, &iov);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def384]
bluez-5.85/profiles/cups/hcrp.c:200:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ctrl_sk’
bluez-5.85/profiles/cups/hcrp.c:187:24: acquire_resource: socket created here
bluez-5.85/profiles/cups/hcrp.c:187:12: branch_false: following ‘false’ branch (when ‘ctrl_sk >= 0’)...
bluez-5.85/profiles/cups/hcrp.c:195:9: branch_false: ...to here
bluez-5.85/profiles/cups/hcrp.c:199:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/cups/hcrp.c:200:17: branch_true: ...to here
bluez-5.85/profiles/cups/hcrp.c:200:17: throw: if ‘perror’ throws an exception...
bluez-5.85/profiles/cups/hcrp.c:200:17: danger: ‘ctrl_sk’ leaks here
#  198|   
#  199|   	if (bind(ctrl_sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  200|-> 		perror("ERROR: Can't bind socket");
#  201|   		close(ctrl_sk);
#  202|   		if (cups_class)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def385]
bluez-5.85/profiles/cups/hcrp.c:201:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ctrl_sk’
bluez-5.85/profiles/cups/hcrp.c:187:24: acquire_resource: socket created here
bluez-5.85/profiles/cups/hcrp.c:187:12: branch_false: following ‘false’ branch (when ‘ctrl_sk >= 0’)...
bluez-5.85/profiles/cups/hcrp.c:195:9: branch_false: ...to here
bluez-5.85/profiles/cups/hcrp.c:199:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/cups/hcrp.c:200:17: branch_true: ...to here
bluez-5.85/profiles/cups/hcrp.c:201:17: throw: if ‘close’ throws an exception...
bluez-5.85/profiles/cups/hcrp.c:201:17: danger: ‘ctrl_sk’ leaks here
#  199|   	if (bind(ctrl_sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  200|   		perror("ERROR: Can't bind socket");
#  201|-> 		close(ctrl_sk);
#  202|   		if (cups_class)
#  203|   			return CUPS_BACKEND_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-666): [#def386]
bluez-5.85/profiles/cups/hcrp.c:213:13: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘ctrl_sk’ in wrong phase
bluez-5.85/profiles/cups/hcrp.c:187:24: acquire_resource: socket created here
bluez-5.85/profiles/cups/hcrp.c:187:12: branch_false: following ‘false’ branch (when ‘ctrl_sk >= 0’)...
bluez-5.85/profiles/cups/hcrp.c:195:9: branch_false: ...to here
bluez-5.85/profiles/cups/hcrp.c:199:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/cups/hcrp.c:208:9: branch_false: ...to here
bluez-5.85/profiles/cups/hcrp.c:213:13: danger: ‘connect’ expects a new socket file descriptor but ‘ctrl_sk’ is bound
#  211|   	addr.l2_psm = htobs(ctrl_psm);
#  212|   
#  213|-> 	if (connect(ctrl_sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  214|   		perror("ERROR: Can't connect to device");
#  215|   		close(ctrl_sk);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def387]
bluez-5.85/profiles/cups/hcrp.c:214:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ctrl_sk’
bluez-5.85/profiles/cups/hcrp.c:187:24: acquire_resource: socket created here
bluez-5.85/profiles/cups/hcrp.c:187:12: branch_false: following ‘false’ branch (when ‘ctrl_sk >= 0’)...
bluez-5.85/profiles/cups/hcrp.c:195:9: branch_false: ...to here
bluez-5.85/profiles/cups/hcrp.c:199:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/cups/hcrp.c:208:9: branch_false: ...to here
bluez-5.85/profiles/cups/hcrp.c:213:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/cups/hcrp.c:214:17: branch_true: ...to here
bluez-5.85/profiles/cups/hcrp.c:214:17: throw: if ‘perror’ throws an exception...
bluez-5.85/profiles/cups/hcrp.c:214:17: danger: ‘ctrl_sk’ leaks here
#  212|   
#  213|   	if (connect(ctrl_sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  214|-> 		perror("ERROR: Can't connect to device");
#  215|   		close(ctrl_sk);
#  216|   		if (cups_class)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def388]
bluez-5.85/profiles/cups/hcrp.c:215:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ctrl_sk’
bluez-5.85/profiles/cups/hcrp.c:187:24: acquire_resource: socket created here
bluez-5.85/profiles/cups/hcrp.c:187:12: branch_false: following ‘false’ branch (when ‘ctrl_sk >= 0’)...
bluez-5.85/profiles/cups/hcrp.c:195:9: branch_false: ...to here
bluez-5.85/profiles/cups/hcrp.c:199:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/cups/hcrp.c:208:9: branch_false: ...to here
bluez-5.85/profiles/cups/hcrp.c:213:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/cups/hcrp.c:214:17: branch_true: ...to here
bluez-5.85/profiles/cups/hcrp.c:215:17: throw: if ‘close’ throws an exception...
bluez-5.85/profiles/cups/hcrp.c:215:17: danger: ‘ctrl_sk’ leaks here
#  213|   	if (connect(ctrl_sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  214|   		perror("ERROR: Can't connect to device");
#  215|-> 		close(ctrl_sk);
#  216|   		if (cups_class)
#  217|   			return CUPS_BACKEND_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def389]
bluez-5.85/profiles/cups/main.c:467:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘name’
bluez-5.85/profiles/cups/main.c:451:26: enter_function: entry to ‘filter_func’
bluez-5.85/profiles/cups/main.c:454:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/cups/main.c:460:17: branch_true: ...to here
bluez-5.85/profiles/cups/main.c:465:21: call_function: calling ‘parse_device_properties’ from ‘filter_func’
bluez-5.85/profiles/cups/main.c:465:21: return_function: returning to ‘filter_func’ from ‘parse_device_properties’
bluez-5.85/profiles/cups/main.c:465:20: branch_false: following ‘false’ branch...
bluez-5.85/profiles/cups/main.c:467:17: branch_false: ...to here
bluez-5.85/profiles/cups/main.c:467:17: danger: use of uninitialized value ‘name’ here
#  465|   		if (parse_device_properties(&iter, &name, NULL))
#  466|   			remote_device_found(adapter, bdaddr, name);
#  467|-> 		g_free (name);
#  468|   	} else if (dbus_message_is_signal(message, "org.bluez.Adapter1",
#  469|   						"DeviceDisappeared")) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def390]
bluez-5.85/profiles/cups/spp.c:47:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/profiles/cups/spp.c:34:19: acquire_resource: stream socket created here
bluez-5.85/profiles/cups/spp.c:34:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/profiles/cups/spp.c:42:9: branch_false: ...to here
bluez-5.85/profiles/cups/spp.c:46:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/cups/spp.c:47:17: branch_true: ...to here
bluez-5.85/profiles/cups/spp.c:47:17: throw: if ‘perror’ throws an exception...
bluez-5.85/profiles/cups/spp.c:47:17: danger: ‘sk’ leaks here
#   45|   
#   46|   	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   47|-> 		perror("ERROR: Can't bind socket");
#   48|   		close(sk);
#   49|   		if (cups_class)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def391]
bluez-5.85/profiles/cups/spp.c:48:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/profiles/cups/spp.c:34:19: acquire_resource: stream socket created here
bluez-5.85/profiles/cups/spp.c:34:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/profiles/cups/spp.c:42:9: branch_false: ...to here
bluez-5.85/profiles/cups/spp.c:46:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/cups/spp.c:47:17: branch_true: ...to here
bluez-5.85/profiles/cups/spp.c:48:17: throw: if ‘close’ throws an exception...
bluez-5.85/profiles/cups/spp.c:48:17: danger: ‘sk’ leaks here
#   46|   	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   47|   		perror("ERROR: Can't bind socket");
#   48|-> 		close(sk);
#   49|   		if (cups_class)
#   50|   			return CUPS_BACKEND_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-666): [#def392]
bluez-5.85/profiles/cups/spp.c:59:13: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘sk’ in wrong phase
bluez-5.85/profiles/cups/spp.c:34:19: acquire_resource: stream socket created here
bluez-5.85/profiles/cups/spp.c:34:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/profiles/cups/spp.c:42:9: branch_false: ...to here
bluez-5.85/profiles/cups/spp.c:46:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/cups/spp.c:55:9: branch_false: ...to here
bluez-5.85/profiles/cups/spp.c:59:13: danger: ‘connect’ expects a new socket file descriptor but ‘sk’ is bound
#   57|   	addr.rc_channel = channel;
#   58|   
#   59|-> 	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   60|   		perror("ERROR: Can't connect to device");
#   61|   		close(sk);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def393]
bluez-5.85/profiles/cups/spp.c:60:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/profiles/cups/spp.c:34:19: acquire_resource: stream socket created here
bluez-5.85/profiles/cups/spp.c:34:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/profiles/cups/spp.c:42:9: branch_false: ...to here
bluez-5.85/profiles/cups/spp.c:46:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/cups/spp.c:55:9: branch_false: ...to here
bluez-5.85/profiles/cups/spp.c:59:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/cups/spp.c:60:17: branch_true: ...to here
bluez-5.85/profiles/cups/spp.c:60:17: throw: if ‘perror’ throws an exception...
bluez-5.85/profiles/cups/spp.c:60:17: danger: ‘sk’ leaks here
#   58|   
#   59|   	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   60|-> 		perror("ERROR: Can't connect to device");
#   61|   		close(sk);
#   62|   		if (cups_class)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def394]
bluez-5.85/profiles/cups/spp.c:61:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/profiles/cups/spp.c:34:19: acquire_resource: stream socket created here
bluez-5.85/profiles/cups/spp.c:34:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/profiles/cups/spp.c:42:9: branch_false: ...to here
bluez-5.85/profiles/cups/spp.c:46:12: branch_false: following ‘false’ branch...
bluez-5.85/profiles/cups/spp.c:55:9: branch_false: ...to here
bluez-5.85/profiles/cups/spp.c:59:12: branch_true: following ‘true’ branch...
bluez-5.85/profiles/cups/spp.c:60:17: branch_true: ...to here
bluez-5.85/profiles/cups/spp.c:61:17: throw: if ‘close’ throws an exception...
bluez-5.85/profiles/cups/spp.c:61:17: danger: ‘sk’ leaks here
#   59|   	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   60|   		perror("ERROR: Can't connect to device");
#   61|-> 		close(sk);
#   62|   		if (cups_class)
#   63|   			return CUPS_BACKEND_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def395]
bluez-5.85/profiles/network/bnep.c:344:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup_fd’
bluez-5.85/profiles/network/bnep.c:340:18: acquire_resource: opened here
bluez-5.85/profiles/network/bnep.c:341:12: branch_false: following ‘false’ branch (when ‘dup_fd >= 0’)...
bluez-5.85/profiles/network/bnep.c:344:19: branch_false: ...to here
bluez-5.85/profiles/network/bnep.c:344:19: throw: if ‘g_malloc0’ throws an exception...
bluez-5.85/profiles/network/bnep.c:344:19: danger: ‘dup_fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  342|   		return NULL;
#  343|   
#  344|-> 	session = g_new0(struct bnep, 1);
#  345|   	session->io = g_io_channel_unix_new(dup_fd);
#  346|   	session->src = local_role;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def396]
bluez-5.85/profiles/network/bnep.c:345:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup_fd’
bluez-5.85/profiles/network/bnep.c:340:18: acquire_resource: opened here
bluez-5.85/profiles/network/bnep.c:341:12: branch_false: following ‘false’ branch (when ‘dup_fd >= 0’)...
bluez-5.85/profiles/network/bnep.c:344:19: branch_false: ...to here
bluez-5.85/profiles/network/bnep.c:345:23: throw: if ‘g_io_channel_unix_new’ throws an exception...
bluez-5.85/profiles/network/bnep.c:345:23: danger: ‘dup_fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  343|   
#  344|   	session = g_new0(struct bnep, 1);
#  345|-> 	session->io = g_io_channel_unix_new(dup_fd);
#  346|   	session->src = local_role;
#  347|   	session->dst = remote_role;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def397]
bluez-5.85/src/adapter.c:977:9: warning[-Wanalyzer-null-argument]: use of NULL ‘name’ where non-null expected
bluez-5.85/src/adapter.c:1001:5: enter_function: entry to ‘adapter_set_name’
bluez-5.85/src/adapter.c:1003:12: branch_false: following ‘false’ branch...
bluez-5.85/src/adapter.c:1006:9: branch_false: ...to here
bluez-5.85/src/adapter.c:1009:9: release_memory: ‘name’ is NULL
bluez-5.85/src/adapter.c:1015:12: branch_false: following ‘false’ branch...
bluez-5.85/src/adapter.c:1018:9: branch_false: ...to here
bluez-5.85/src/adapter.c:1018:9: branch_false: following ‘false’ branch...
bluez-5.85/src/adapter.c:1020:49: branch_false: ...to here
bluez-5.85/src/adapter.c:1023:16: call_function: calling ‘set_name’ from ‘adapter_set_name’
#  975|   
#  976|   	memset(maxname, 0, sizeof(maxname));
#  977|-> 	strncpy(maxname, name, MAX_NAME_LENGTH - 1);
#  978|   
#  979|   	if (!g_utf8_validate(maxname, -1, NULL)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def398]
bluez-5.85/src/adapter.c:2603:33: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&uuidstr)’
bluez-5.85/src/adapter.c:2586:16: branch_true: following ‘true’ branch...
bluez-5.85/src/adapter.c:2591:21: branch_true: ...to here
bluez-5.85/src/adapter.c:2591:20: branch_false: following ‘false’ branch...
bluez-5.85/src/adapter.c:2595:17: branch_false: ...to here
bluez-5.85/src/adapter.c:2597:20: branch_false: following ‘false’ branch...
bluez-5.85/src/adapter.c:2600:17: branch_false: ...to here
bluez-5.85/src/adapter.c:2603:64: acquire_memory: allocated here
bluez-5.85/src/adapter.c:2603:33: danger: ‘strdup(&uuidstr)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 2601|   		bt_uuid_to_string(&u128, uuidstr, sizeof(uuidstr));
# 2602|   
# 2603|-> 		filter->uuids = g_slist_prepend(filter->uuids, strdup(uuidstr));
# 2604|   
# 2605|   		dbus_message_iter_next(&arriter);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def399]
bluez-5.85/src/adapter.c:3443:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&uuidstr)’
bluez-5.85/src/adapter.c:3434:12: branch_true: following ‘true’ branch...
bluez-5.85/src/adapter.c:3437:14: branch_true: ...to here
bluez-5.85/src/adapter.c:3437:12: branch_true: following ‘true’ branch...
bluez-5.85/src/adapter.c:3440:9: branch_true: ...to here
bluez-5.85/src/adapter.c:3443:33: acquire_memory: allocated here
bluez-5.85/src/adapter.c:3443:9: danger: ‘strdup(&uuidstr)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 3441|   	bt_uuid_to_string(&u128, uuidstr, sizeof(uuidstr));
# 3442|   
# 3443|-> 	g_hash_table_add(uuids, strdup(uuidstr));
# 3444|   }
# 3445|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def400]
bluez-5.85/src/adapter.c:4995:25: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dirname)’
bluez-5.85/src/adapter.c:4987:15: acquire_memory: allocated here
bluez-5.85/src/adapter.c:4988:12: branch_false: following ‘false’ branch...
bluez-5.85/src/adapter.c:4988:12: branch_false: ...to here
bluez-5.85/src/adapter.c:4995:25: throw: if ‘readdir’ throws an exception...
bluez-5.85/src/adapter.c:4995:25: danger: ‘opendir(&dirname)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 4993|   	}
# 4994|   
# 4995|-> 	while ((entry = readdir(dir)) != NULL) {
# 4996|   		struct btd_device *device;
# 4997|   		char filename[PATH_MAX];

Error: CPPCHECK_WARNING (CWE-476): [#def401]
bluez-5.85/src/adv_monitor.c:977: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: monitor->merged_pattern
#  975|   
#  976|   	monitor->merged_pattern = malloc0(sizeof(*monitor->merged_pattern));
#  977|-> 	monitor->merged_pattern->current_state = MERGED_PATTERN_STATE_STABLE;
#  978|   	monitor->merged_pattern->next_state = MERGED_PATTERN_STATE_STABLE;
#  979|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def402]
bluez-5.85/src/adv_monitor.c:977:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*monitor.merged_pattern’
bluez-5.85/src/adv_monitor.c:976:35: acquire_memory: this call could return NULL
bluez-5.85/src/adv_monitor.c:977:9: danger: ‘calloc(1, 56)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  975|   
#  976|   	monitor->merged_pattern = malloc0(sizeof(*monitor->merged_pattern));
#  977|-> 	monitor->merged_pattern->current_state = MERGED_PATTERN_STATE_STABLE;
#  978|   	monitor->merged_pattern->next_state = MERGED_PATTERN_STATE_STABLE;
#  979|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
bluez-5.85/src/adv_monitor.c:1120:18: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/src/adv_monitor.c:1116:14: acquire_memory: allocated here
bluez-5.85/src/adv_monitor.c:1117:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/src/adv_monitor.c:1120:18: branch_false: ...to here
bluez-5.85/src/adv_monitor.c:1120:18: throw: if ‘queue_get_entries’ throws an exception...
bluez-5.85/src/adv_monitor.c:1120:18: danger: ‘cp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1118|   		return false;
# 1119|   
# 1120|-> 	for (e = queue_get_entries(merged_pattern->patterns); e; e = e->next) {
# 1121|   		struct bt_ad_pattern *pattern = e->data;
# 1122|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def404]
bluez-5.85/src/adv_monitor.c:1127:14: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/src/adv_monitor.c:1116:14: acquire_memory: allocated here
bluez-5.85/src/adv_monitor.c:1117:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/src/adv_monitor.c:1120:18: branch_false: ...to here
bluez-5.85/src/adv_monitor.c:1120:63: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
bluez-5.85/src/adv_monitor.c:1127:14: branch_false: ...to here
bluez-5.85/src/adv_monitor.c:1127:14: throw: if ‘mgmt_send’ throws an exception...
bluez-5.85/src/adv_monitor.c:1127:14: danger: ‘cp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1125|   	}
# 1126|   
# 1127|-> 	if (!mgmt_send(merged_pattern->manager->mgmt,
# 1128|   			MGMT_OP_ADD_ADV_PATTERNS_MONITOR,
# 1129|   			merged_pattern->manager->adapter_id, cp_len, cp,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def405]
bluez-5.85/src/adv_monitor.c:1131:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/src/adv_monitor.c:1116:14: acquire_memory: allocated here
bluez-5.85/src/adv_monitor.c:1117:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/src/adv_monitor.c:1120:18: branch_false: ...to here
bluez-5.85/src/adv_monitor.c:1120:63: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
bluez-5.85/src/adv_monitor.c:1127:14: branch_false: ...to here
bluez-5.85/src/adv_monitor.c:1127:12: branch_true: following ‘true’ branch...
bluez-5.85/src/adv_monitor.c:1131:17: branch_true: ...to here
bluez-5.85/src/adv_monitor.c:1131:17: throw: if ‘btd_error’ throws an exception...
bluez-5.85/src/adv_monitor.c:1131:17: danger: ‘cp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1129|   			merged_pattern->manager->adapter_id, cp_len, cp,
# 1130|   			add_adv_patterns_monitor_cb, merged_pattern, NULL)) {
# 1131|-> 		error("Unable to send Add Adv Patterns Monitor command");
# 1132|   		success = false;
# 1133|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def406]
bluez-5.85/src/adv_monitor.c:1163:18: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/src/adv_monitor.c:1151:14: acquire_memory: allocated here
bluez-5.85/src/adv_monitor.c:1152:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/src/adv_monitor.c:1155:35: branch_false: ...to here
bluez-5.85/src/adv_monitor.c:1163:18: throw: if ‘queue_get_entries’ throws an exception...
bluez-5.85/src/adv_monitor.c:1163:18: danger: ‘cp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1161|   	cp->rssi.sampling_period = merged_pattern->rssi.sampling_period;
# 1162|   
# 1163|-> 	for (e = queue_get_entries(merged_pattern->patterns); e; e = e->next) {
# 1164|   		struct bt_ad_pattern *pattern = e->data;
# 1165|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def407]
bluez-5.85/src/adv_monitor.c:1170:14: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/src/adv_monitor.c:1151:14: acquire_memory: allocated here
bluez-5.85/src/adv_monitor.c:1152:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/src/adv_monitor.c:1155:35: branch_false: ...to here
bluez-5.85/src/adv_monitor.c:1163:63: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
bluez-5.85/src/adv_monitor.c:1170:14: branch_false: ...to here
bluez-5.85/src/adv_monitor.c:1170:14: throw: if ‘mgmt_send’ throws an exception...
bluez-5.85/src/adv_monitor.c:1170:14: danger: ‘cp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1168|   	}
# 1169|   
# 1170|-> 	if (!mgmt_send(merged_pattern->manager->mgmt,
# 1171|   			MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI,
# 1172|   			merged_pattern->manager->adapter_id, cp_len, cp,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
bluez-5.85/src/adv_monitor.c:1174:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/src/adv_monitor.c:1151:14: acquire_memory: allocated here
bluez-5.85/src/adv_monitor.c:1152:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/src/adv_monitor.c:1155:35: branch_false: ...to here
bluez-5.85/src/adv_monitor.c:1163:63: branch_false: following ‘false’ branch (when ‘e’ is NULL)...
bluez-5.85/src/adv_monitor.c:1170:14: branch_false: ...to here
bluez-5.85/src/adv_monitor.c:1170:12: branch_true: following ‘true’ branch...
bluez-5.85/src/adv_monitor.c:1174:17: branch_true: ...to here
bluez-5.85/src/adv_monitor.c:1174:17: throw: if ‘btd_error’ throws an exception...
bluez-5.85/src/adv_monitor.c:1174:17: danger: ‘cp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 1172|   			merged_pattern->manager->adapter_id, cp_len, cp,
# 1173|   			add_adv_patterns_monitor_cb, merged_pattern, NULL)) {
# 1174|-> 		error("Unable to send Add Adv Patterns Monitor RSSI command");
# 1175|   		success = false;
# 1176|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def409]
bluez-5.85/src/advertising.c:1010:20: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/src/advertising.c:957:12: enter_function: entry to ‘refresh_legacy_adv’
bluez-5.85/src/advertising.c:974:12: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:979:20: call_function: calling ‘generate_scan_rsp’ from ‘refresh_legacy_adv’
bluez-5.85/src/advertising.c:979:20: return_function: returning to ‘refresh_legacy_adv’ from ‘generate_scan_rsp’
bluez-5.85/src/advertising.c:980:12: branch_true: following ‘true’ branch...
bluez-5.85/src/advertising.c:980:23: branch_true: ...to here
bluez-5.85/src/advertising.c:980:13: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:986:21: branch_false: ...to here
bluez-5.85/src/advertising.c:989:14: acquire_memory: allocated here
bluez-5.85/src/advertising.c:990:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/src/advertising.c:997:9: branch_false: ...to here
bluez-5.85/src/advertising.c:1004:12: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:1007:9: branch_false: ...to here
bluez-5.85/src/advertising.c:1010:20: throw: if ‘mgmt_send’ throws an exception...
bluez-5.85/src/advertising.c:1010:20: danger: ‘cp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
# 1008|   	free(scan_rsp);
# 1009|   
# 1010|-> 	mgmt_ret = mgmt_send(client->manager->mgmt, MGMT_OP_ADD_ADVERTISING,
# 1011|   			client->manager->mgmt_index, param_len, cp,
# 1012|   			func, client, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
bluez-5.85/src/advertising.c:1015:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/src/advertising.c:957:12: enter_function: entry to ‘refresh_legacy_adv’
bluez-5.85/src/advertising.c:974:12: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:979:20: call_function: calling ‘generate_scan_rsp’ from ‘refresh_legacy_adv’
bluez-5.85/src/advertising.c:979:20: return_function: returning to ‘refresh_legacy_adv’ from ‘generate_scan_rsp’
bluez-5.85/src/advertising.c:980:12: branch_true: following ‘true’ branch...
bluez-5.85/src/advertising.c:980:23: branch_true: ...to here
bluez-5.85/src/advertising.c:980:13: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:986:21: branch_false: ...to here
bluez-5.85/src/advertising.c:989:14: acquire_memory: allocated here
bluez-5.85/src/advertising.c:990:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/src/advertising.c:997:9: branch_false: ...to here
bluez-5.85/src/advertising.c:1004:12: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:1007:9: branch_false: ...to here
bluez-5.85/src/advertising.c:1014:12: branch_true: following ‘true’ branch...
bluez-5.85/src/advertising.c:1015:17: branch_true: ...to here
bluez-5.85/src/advertising.c:1015:17: throw: if ‘btd_error’ throws an exception...
bluez-5.85/src/advertising.c:1015:17: danger: ‘cp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
# 1013|   
# 1014|   	if (!mgmt_ret) {
# 1015|-> 		error("Failed to add Advertising Data");
# 1016|   		free(cp);
# 1017|   		return -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def411]
bluez-5.85/src/advertising.c:1467:20: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/src/advertising.c:1409:12: branch_false: following ‘false’ branch (when ‘status == 0’)...
bluez-5.85/src/advertising.c:1412:13: branch_false: ...to here
bluez-5.85/src/advertising.c:1412:12: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:1417:9: branch_false: ...to here
bluez-5.85/src/advertising.c:1430:12: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:1447:14: acquire_memory: allocated here
bluez-5.85/src/advertising.c:1448:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/src/advertising.c:1453:24: branch_false: ...to here
bluez-5.85/src/advertising.c:1458:12: branch_false: following ‘false’ branch (when ‘scan_rsp’ is NULL)...
bluez-5.85/src/advertising.c:1461:9: branch_false: ...to here
bluez-5.85/src/advertising.c:1467:20: throw: if ‘mgmt_send’ throws an exception...
bluez-5.85/src/advertising.c:1467:20: danger: ‘cp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
# 1465|   
# 1466|   	/* Submit request to update instance data */
# 1467|-> 	mgmt_ret = mgmt_send(client->manager->mgmt, MGMT_OP_ADD_EXT_ADV_DATA,
# 1468|   			     client->manager->mgmt_index, param_len, cp,
# 1469|   			     client->refresh_done_func, client, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
bluez-5.85/src/advertising.c:1478:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cp’
bluez-5.85/src/advertising.c:1409:12: branch_false: following ‘false’ branch (when ‘status == 0’)...
bluez-5.85/src/advertising.c:1412:13: branch_false: ...to here
bluez-5.85/src/advertising.c:1412:12: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:1417:9: branch_false: ...to here
bluez-5.85/src/advertising.c:1430:12: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:1447:14: acquire_memory: allocated here
bluez-5.85/src/advertising.c:1448:12: branch_false: following ‘false’ branch (when ‘cp’ is non-NULL)...
bluez-5.85/src/advertising.c:1453:24: branch_false: ...to here
bluez-5.85/src/advertising.c:1458:12: branch_false: following ‘false’ branch (when ‘scan_rsp’ is NULL)...
bluez-5.85/src/advertising.c:1461:9: branch_false: ...to here
bluez-5.85/src/advertising.c:1471:12: branch_false: following ‘false’ branch...
bluez-5.85/src/advertising.c:1475:9: branch_false: ...to here
bluez-5.85/src/advertising.c:1478:17: throw: if ‘btd_error’ throws an exception...
bluez-5.85/src/advertising.c:1478:17: danger: ‘cp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
# 1476|   
# 1477|   	if (!mgmt_ret) {
# 1478|-> 		error("Failed to add Advertising Data");
# 1479|   		goto fail;
# 1480|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def413]
bluez-5.85/src/log.c:40:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/src/log.c:163:6: enter_function: entry to ‘__btd_log_init’
bluez-5.85/src/log.c:179:9: call_function: calling ‘info’ from ‘__btd_log_init’
#   38|   					const char *format, va_list ap)
#   39|   {
#   40|-> 	bt_log_vprintf(index, LOG_IDENT, priority, format, ap);
#   41|   }
#   42|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def414]
bluez-5.85/src/log.c:48:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
bluez-5.85/src/log.c:163:6: enter_function: entry to ‘__btd_log_init’
bluez-5.85/src/log.c:179:9: call_function: calling ‘info’ from ‘__btd_log_init’
#   46|   
#   47|   	va_start(ap, format);
#   48|-> 	vsyslog(LOG_INFO, format, ap);
#   49|   	va_end(ap);
#   50|   

Error: CPPCHECK_WARNING (CWE-758): [#def415]
bluez-5.85/src/log.c:159: error[comparePointers]: Comparing pointers that point to different objects
#  157|   	struct btd_debug_desc *desc;
#  158|   
#  159|-> 	for (desc = __start___debug; desc < __stop___debug; desc++)
#  160|   		desc->flags |= BTD_DEBUG_FLAG_PRINT;
#  161|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
bluez-5.85/src/main.c:773:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(uuid)’
bluez-5.85/src/main.c:741:12: branch_false: following ‘false’ branch...
bluez-5.85/src/main.c:746:27: branch_false: ...to here
bluez-5.85/src/main.c:748:21: branch_true: following ‘true’ branch...
bluez-5.85/src/main.c:752:22: branch_true: ...to here
bluez-5.85/src/main.c:752:20: branch_false: following ‘false’ branch...
bluez-5.85/src/main.c:760:29: branch_true: following ‘true’ branch (when ‘j != 7’)...
bluez-5.85/src/main.c:761:30: branch_true: ...to here
bluez-5.85/src/main.c:766:20: branch_false: following ‘false’ branch (when ‘j != 7’)...
bluez-5.85/src/main.c:771:17: branch_false: ...to here
bluez-5.85/src/main.c:771:17: branch_false: following ‘false’ branch...
bluez-5.85/src/main.c:773:50: branch_false: ...to here
bluez-5.85/src/main.c:773:50: acquire_memory: allocated here
bluez-5.85/src/main.c:773:17: danger: ‘strdup(uuid)’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  771|   		DBG("%s", uuid);
#  772|   
#  773|-> 		queue_push_tail(btd_opts.kernel, strdup(uuid));
#  774|   	}
#  775|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
bluez-5.85/src/main.c:987:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup("*")’
bluez-5.85/src/main.c:987:50: acquire_memory: allocated here
bluez-5.85/src/main.c:987:17: danger: ‘strdup("*")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  985|   		if (!btd_opts.kernel)
#  986|   			btd_opts.kernel = queue_new();
#  987|-> 		queue_push_head(btd_opts.kernel, strdup("*"));
#  988|   	}
#  989|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def418]
bluez-5.85/src/oui.c:50:16: warning[-Wanalyzer-malloc-leak]: leak of ‘comp’
bluez-5.85/src/oui.c:32:12: branch_false: following ‘false’ branch...
bluez-5.85/src/oui.c:35:16: branch_false: ...to here
bluez-5.85/src/oui.c:36:12: branch_false: following ‘false’ branch...
bluez-5.85/src/oui.c:39:16: branch_false: ...to here
bluez-5.85/src/oui.c:41:9: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
bluez-5.85/src/oui.c:42:36: branch_true: ...to here
bluez-5.85/src/oui.c:45:32: acquire_memory: allocated here
bluez-5.85/src/oui.c:50:16: throw: if ‘udev_hwdb_unref’ throws an exception...
bluez-5.85/src/oui.c:50:16: danger: ‘comp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   48|   	}
#   49|   
#   50|-> 	hwdb = udev_hwdb_unref(hwdb);
#   51|   
#   52|   done:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
bluez-5.85/src/oui.c:53:16: warning[-Wanalyzer-malloc-leak]: leak of ‘comp’
bluez-5.85/src/oui.c:32:12: branch_false: following ‘false’ branch...
bluez-5.85/src/oui.c:35:16: branch_false: ...to here
bluez-5.85/src/oui.c:36:12: branch_false: following ‘false’ branch...
bluez-5.85/src/oui.c:39:16: branch_false: ...to here
bluez-5.85/src/oui.c:41:9: branch_true: following ‘true’ branch (when ‘entry’ is non-NULL)...
bluez-5.85/src/oui.c:42:36: branch_true: ...to here
bluez-5.85/src/oui.c:45:32: acquire_memory: allocated here
bluez-5.85/src/oui.c:53:16: throw: if ‘udev_unref’ throws an exception...
bluez-5.85/src/oui.c:53:16: danger: ‘comp’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   51|   
#   52|   done:
#   53|-> 	udev = udev_unref(udev);
#   54|   
#   55|   	return comp;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def420]
bluez-5.85/src/profile.c:2286:21: warning[-Wanalyzer-null-argument]: use of NULL ‘*ext.role’ where non-null expected
bluez-5.85/src/profile.c:2233:12: enter_function: entry to ‘parse_ext_opt’
bluez-5.85/src/profile.c:2241:12: branch_false: following ‘false’ branch...
bluez-5.85/src/profile.c:2247:20: branch_false: ...to here
bluez-5.85/src/profile.c:2247:19: branch_false: following ‘false’ branch...
bluez-5.85/src/profile.c:2252:20: branch_false: ...to here
bluez-5.85/src/profile.c:2252:19: branch_false: following ‘false’ branch...
bluez-5.85/src/profile.c:2257:20: branch_false: ...to here
bluez-5.85/src/profile.c:2257:19: branch_false: following ‘false’ branch...
bluez-5.85/src/profile.c:2265:20: branch_false: ...to here
bluez-5.85/src/profile.c:2265:19: branch_false: following ‘false’ branch...
bluez-5.85/src/profile.c:2274:20: branch_false: ...to here
bluez-5.85/src/profile.c:2274:19: branch_false: following ‘false’ branch...
bluez-5.85/src/profile.c:2279:20: branch_false: ...to here
bluez-5.85/src/profile.c:2279:19: branch_true: following ‘true’ branch...
bluez-5.85/src/profile.c:2280:20: branch_true: ...to here
bluez-5.85/src/profile.c:2280:20: branch_false: following ‘false’ branch...
bluez-5.85/src/profile.c:2282:17: branch_false: ...to here
bluez-5.85/src/profile.c:2284:17: release_memory: ‘*ext.role’ is NULL
bluez-5.85/src/profile.c:2286:21: danger: argument 1 (‘<unknown>’) NULL where non-null expected
# 2284|   		ext->role = g_strdup(str);
# 2285|   
# 2286|-> 		if (g_str_equal(ext->role, "client")) {
# 2287|   			ext->enable_server = false;
# 2288|   			ext->enable_client = true;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def421]
bluez-5.85/src/rfkill.c:75:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&sysname, 0)’
bluez-5.85/src/rfkill.c:68:18: acquire_resource: opened here
bluez-5.85/src/rfkill.c:69:12: branch_false: following ‘false’ branch...
bluez-5.85/src/rfkill.c:72:9: branch_false: ...to here
bluez-5.85/src/rfkill.c:74:12: branch_true: following ‘true’ branch...
bluez-5.85/src/rfkill.c:75:17: branch_true: ...to here
bluez-5.85/src/rfkill.c:75:17: danger: ‘open(&sysname, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   73|   
#   74|   	if (read(namefd, sysname, sizeof(sysname) - 1) < 4) {
#   75|-> 		close(namefd);
#   76|   		return -1;
#   77|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def422]
bluez-5.85/src/rfkill.c:79:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&sysname, 0)’
bluez-5.85/src/rfkill.c:68:18: acquire_resource: opened here
bluez-5.85/src/rfkill.c:69:12: branch_false: following ‘false’ branch...
bluez-5.85/src/rfkill.c:72:9: branch_false: ...to here
bluez-5.85/src/rfkill.c:74:12: branch_false: following ‘false’ branch...
bluez-5.85/src/rfkill.c:79:9: branch_false: ...to here
bluez-5.85/src/rfkill.c:79:9: danger: ‘open(&sysname, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   77|   	}
#   78|   
#   79|-> 	close(namefd);
#   80|   
#   81|   	if (g_str_has_prefix(sysname, "hci") == FALSE)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def423]
bluez-5.85/src/rfkill.c:107:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/rfkill", 2)’
bluez-5.85/src/rfkill.c:87:5: enter_function: entry to ‘rfkill_get_blocked’
bluez-5.85/src/rfkill.c:92:14: acquire_resource: opened here
bluez-5.85/src/rfkill.c:93:12: branch_false: following ‘false’ branch...
bluez-5.85/src/rfkill.c:93:12: branch_false: ...to here
bluez-5.85/src/rfkill.c:104:20: branch_false: following ‘false’ branch...
bluez-5.85/src/rfkill.c:107:22: branch_false: ...to here
bluez-5.85/src/rfkill.c:107:22: call_function: calling ‘get_adapter_id_for_rfkill’ from ‘rfkill_get_blocked’
#  105|   			break;
#  106|   
#  107|-> 		id = get_adapter_id_for_rfkill(event.idx);
#  108|   
#  109|   		if (index == id) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def424]
bluez-5.85/src/rfkill.c:114:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/rfkill", 2)’
bluez-5.85/src/rfkill.c:92:14: acquire_resource: opened here
bluez-5.85/src/rfkill.c:93:12: branch_false: following ‘false’ branch...
bluez-5.85/src/rfkill.c:93:12: branch_false: ...to here
bluez-5.85/src/rfkill.c:114:9: danger: ‘open("/dev/rfkill", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  112|   		}
#  113|   	}
#  114|-> 	close(fd);
#  115|   
#  116|   	return blocked;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def425]
bluez-5.85/src/rfkill.c:195:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/rfkill", 2)’
bluez-5.85/src/rfkill.c:183:14: acquire_resource: opened here
bluez-5.85/src/rfkill.c:184:12: branch_false: following ‘false’ branch...
bluez-5.85/src/rfkill.c:195:19: branch_false: ...to here
bluez-5.85/src/rfkill.c:195:19: danger: ‘open("/dev/rfkill", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  193|   	}
#  194|   
#  195|-> 	channel = g_io_channel_unix_new(fd);
#  196|   	g_io_channel_set_close_on_unref(channel, TRUE);
#  197|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def426]
bluez-5.85/src/sdp-xml.c:306:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
bluez-5.85/src/sdp-xml.c:444:13: enter_function: entry to ‘element_start’
bluez-5.85/src/sdp-xml.c:453:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:465:13: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:465:12: branch_true: following ‘true’ branch...
bluez-5.85/src/sdp-xml.c:466:48: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:466:48: call_function: calling ‘sdp_xml_data_alloc’ from ‘element_start’
bluez-5.85/src/sdp-xml.c:466:48: return_function: returning to ‘element_start’ from ‘sdp_xml_data_alloc’
bluez-5.85/src/sdp-xml.c:474:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:476:19: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:476:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:476:17: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:481:29: branch_false: following ‘false’ branch...
bluez-5.85/src/sdp-xml.c:504:46: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:504:46: call_function: calling ‘sdp_xml_parse_datatype’ from ‘element_start’
#  304|   		for (; i < 32; i += 2) {
#  305|   			buf[0] = data[i];
#  306|-> 			buf[1] = data[i + 1];
#  307|   
#  308|   			val.data[i >> 1] = strtoul(buf, 0, 16);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def427]
bluez-5.85/src/sdp-xml.c:328:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sdp_xml_parse_string_decode(data,  encoding, & length)’
bluez-5.85/src/sdp-xml.c:444:13: enter_function: entry to ‘element_start’
bluez-5.85/src/sdp-xml.c:453:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:465:13: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:465:12: branch_true: following ‘true’ branch...
bluez-5.85/src/sdp-xml.c:466:48: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:466:48: call_function: calling ‘sdp_xml_data_alloc’ from ‘element_start’
bluez-5.85/src/sdp-xml.c:466:48: return_function: returning to ‘element_start’ from ‘sdp_xml_data_alloc’
bluez-5.85/src/sdp-xml.c:474:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:476:19: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:476:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:476:17: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:481:29: branch_false: following ‘false’ branch...
bluez-5.85/src/sdp-xml.c:504:46: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:504:46: call_function: calling ‘sdp_xml_parse_datatype’ from ‘element_start’
#  326|   	if (encoding == SDP_XML_ENCODING_NORMAL) {
#  327|   		text = strdup(data);
#  328|-> 		*length = len;
#  329|   	} else {
#  330|   		char buf[3], *decoded;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def428]
bluez-5.85/src/sdp-xml.c:328:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sdp_xml_parse_string_decode(data, 0, & length)’
bluez-5.85/src/sdp-xml.c:444:13: enter_function: entry to ‘element_start’
bluez-5.85/src/sdp-xml.c:453:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:465:13: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:465:12: branch_true: following ‘true’ branch...
bluez-5.85/src/sdp-xml.c:466:48: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:466:48: call_function: calling ‘sdp_xml_data_alloc’ from ‘element_start’
bluez-5.85/src/sdp-xml.c:466:48: return_function: returning to ‘element_start’ from ‘sdp_xml_data_alloc’
bluez-5.85/src/sdp-xml.c:474:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:476:19: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:476:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:476:17: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:481:29: branch_false: following ‘false’ branch...
bluez-5.85/src/sdp-xml.c:504:46: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:504:46: call_function: calling ‘sdp_xml_parse_datatype’ from ‘element_start’
#  326|   	if (encoding == SDP_XML_ENCODING_NORMAL) {
#  327|   		text = strdup(data);
#  328|-> 		*length = len;
#  329|   	} else {
#  330|   		char buf[3], *decoded;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def429]
bluez-5.85/src/sdp-xml.c:333:34: warning[-Wanalyzer-malloc-leak]: leak of ‘sdp_xml_parse_string_decode(data,  encoding, & length)’
bluez-5.85/src/sdp-xml.c:444:13: enter_function: entry to ‘element_start’
bluez-5.85/src/sdp-xml.c:453:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:465:13: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:465:12: branch_true: following ‘true’ branch...
bluez-5.85/src/sdp-xml.c:466:48: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:466:48: call_function: calling ‘sdp_xml_data_alloc’ from ‘element_start’
bluez-5.85/src/sdp-xml.c:466:48: return_function: returning to ‘element_start’ from ‘sdp_xml_data_alloc’
bluez-5.85/src/sdp-xml.c:474:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:476:19: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:476:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:476:17: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:481:29: branch_true: following ‘true’ branch...
bluez-5.85/src/sdp-xml.c:482:30: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:482:28: branch_true: following ‘true’ branch (when the strings are equal)...
bluez-5.85/src/sdp-xml.c:483:53: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:495:28: branch_true: following ‘true’ branch (when the strings are equal)...
bluez-5.85/src/sdp-xml.c:496:61: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:496:36: branch_true: following ‘true’ branch (when the strings are equal)...
bluez-5.85/src/sdp-xml.c:497:41: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:500:28: branch_true: following ‘true’ branch (when the strings are equal)...
bluez-5.85/src/sdp-xml.c:501:85: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:481:29: branch_false: following ‘false’ branch...
bluez-5.85/src/sdp-xml.c:504:46: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:504:46: call_function: calling ‘sdp_xml_parse_datatype’ from ‘element_start’
#  331|   		int i;
#  332|   
#  333|-> 		decoded = malloc((len >> 1) + 1);
#  334|   		if (!decoded)
#  335|   			return NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def430]
bluez-5.85/src/sdp-xml.c:467:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
bluez-5.85/src/sdp-xml.c:453:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:465:13: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:465:12: branch_true: following ‘true’ branch...
bluez-5.85/src/sdp-xml.c:466:48: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:467:17: danger: dereference of NULL ‘sdp_xml_data_alloc()’
#  465|   	if (ctx_data->stack_head) {
#  466|   		struct sdp_xml_data *newelem = sdp_xml_data_alloc();
#  467|-> 		newelem->next = ctx_data->stack_head;
#  468|   		ctx_data->stack_head = newelem;
#  469|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def431]
bluez-5.85/src/sdp-xml.c:471:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
bluez-5.85/src/sdp-xml.c:453:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:465:13: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:465:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdp-xml.c:470:40: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:471:17: danger: dereference of NULL ‘sdp_xml_data_alloc()’
#  469|   	} else {
#  470|   		ctx_data->stack_head = sdp_xml_data_alloc();
#  471|-> 		ctx_data->stack_head->next = NULL;
#  472|   	}
#  473|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def432]
bluez-5.85/src/sdp-xml.c:501:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
bluez-5.85/src/sdp-xml.c:444:13: enter_function: entry to ‘element_start’
bluez-5.85/src/sdp-xml.c:453:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:465:13: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:465:12: branch_true: following ‘true’ branch...
bluez-5.85/src/sdp-xml.c:466:48: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:466:48: call_function: calling ‘sdp_xml_data_alloc’ from ‘element_start’
bluez-5.85/src/sdp-xml.c:466:48: return_function: returning to ‘element_start’ from ‘sdp_xml_data_alloc’
bluez-5.85/src/sdp-xml.c:474:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:476:19: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:476:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
bluez-5.85/src/sdp-xml.c:476:17: branch_false: ...to here
bluez-5.85/src/sdp-xml.c:481:29: branch_true: following ‘true’ branch...
bluez-5.85/src/sdp-xml.c:482:30: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:482:28: branch_true: following ‘true’ branch (when the strings are equal)...
bluez-5.85/src/sdp-xml.c:483:53: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:495:28: branch_true: following ‘true’ branch (when the strings are equal)...
bluez-5.85/src/sdp-xml.c:496:61: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:496:36: branch_true: following ‘true’ branch (when the strings are equal)...
bluez-5.85/src/sdp-xml.c:497:41: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:500:28: branch_true: following ‘true’ branch (when the strings are equal)...
bluez-5.85/src/sdp-xml.c:501:85: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:501:62: acquire_memory: allocated here
bluez-5.85/src/sdp-xml.c:481:29: branch_true: following ‘true’ branch...
bluez-5.85/src/sdp-xml.c:482:30: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:482:28: branch_true: following ‘true’ branch (when the strings are equal)...
bluez-5.85/src/sdp-xml.c:483:53: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:500:28: branch_true: following ‘true’ branch (when the strings are equal)...
bluez-5.85/src/sdp-xml.c:501:85: branch_true: ...to here
bluez-5.85/src/sdp-xml.c:501:33: danger: ‘<unknown>’ leaks here; was allocated at [(27)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/26)
#  499|   
#  500|   			if (!strcmp(attribute_names[i], "name"))
#  501|-> 				ctx_data->stack_head->name = strdup(attribute_values[i]);
#  502|   		}
#  503|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def433]
bluez-5.85/src/sdp-xml.c:934:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strBuf’
bluez-5.85/src/sdp-xml.c:1000:6: enter_function: entry to ‘convert_sdp_record_to_xml’
bluez-5.85/src/sdp-xml.c:1008:12: branch_true: following ‘true’ branch...
bluez-5.85/src/sdp-xml.c:1011:17: call_function: inlined call to ‘sdp_list_foreach’ from ‘convert_sdp_record_to_xml’
#  932|   		appender(data, "<url value=\"");
#  933|   		strBuf = strndup(value->val.str, value->unitSize - 1);
#  934|-> 		appender(data, strBuf);
#  935|   		free(strBuf);
#  936|   		appender(data, "\" />\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
bluez-5.85/src/sdpd-database.c:156:24: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
bluez-5.85/src/sdpd-database.c:147:31: acquire_memory: allocated here
bluez-5.85/src/sdpd-database.c:149:12: branch_false: following ‘false’ branch (when ‘item’ is non-NULL)...
bluez-5.85/src/sdpd-database.c:154:9: branch_false: ...to here
bluez-5.85/src/sdpd-database.c:156:24: throw: if ‘sdp_list_insert_sorted’ throws an exception...
bluez-5.85/src/sdpd-database.c:156:24: danger: ‘item’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  154|   	item->sock = sock;
#  155|   	item->record = record;
#  156|-> 	socket_index = sdp_list_insert_sorted(socket_index, item, compare_indices);
#  157|   }
#  158|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
bluez-5.85/src/sdpd-database.c:178:21: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
bluez-5.85/src/sdpd-database.c:171:15: acquire_memory: allocated here
bluez-5.85/src/sdpd-database.c:172:12: branch_false: following ‘false’ branch (when ‘dev’ is non-NULL)...
bluez-5.85/src/sdpd-database.c:175:9: branch_false: ...to here
bluez-5.85/src/sdpd-database.c:178:21: throw: if ‘sdp_list_insert_sorted’ throws an exception...
bluez-5.85/src/sdpd-database.c:178:21: danger: ‘dev’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  176|   	dev->handle = rec->handle;
#  177|   
#  178|-> 	access_db = sdp_list_insert_sorted(access_db, dev, access_sort);
#  179|   }
#  180|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
bluez-5.85/src/sdpd-request.c:70:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1009:13: enter_function: entry to ‘process_request’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1077:17: call_function: calling ‘sdp_cstate_cleanup’ from ‘process_request’
#   68|   		return;
#   69|   
#   70|-> 	cstates = sdp_list_remove(cstates, cinfo);
#   71|   	free(cinfo->buf.data);
#   72|   	free(cinfo);

Error: CPPCHECK_WARNING (CWE-476): [#def437]
bluez-5.85/src/sdpd-request.c:105: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  103|   	uint8_t *data = malloc(buf->data_size);
#  104|   
#  105|-> 	memcpy(data, buf->data, buf->data_size);
#  106|   	memset(cinfo, 0, sizeof(sdp_cont_info_t));
#  107|   	cinfo->buf.data = data;

Error: CPPCHECK_WARNING (CWE-476): [#def438]
bluez-5.85/src/sdpd-request.c:106: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cinfo
#  104|   
#  105|   	memcpy(data, buf->data, buf->data_size);
#  106|-> 	memset(cinfo, 0, sizeof(sdp_cont_info_t));
#  107|   	cinfo->buf.data = data;
#  108|   	cinfo->buf.data_size = buf->data_size;

Error: CPPCHECK_WARNING (CWE-476): [#def439]
bluez-5.85/src/sdpd-request.c:107: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cinfo
#  105|   	memcpy(data, buf->data, buf->data_size);
#  106|   	memset(cinfo, 0, sizeof(sdp_cont_info_t));
#  107|-> 	cinfo->buf.data = data;
#  108|   	cinfo->buf.data_size = buf->data_size;
#  109|   	cinfo->buf.buf_size = buf->data_size;

Error: CPPCHECK_WARNING (CWE-476): [#def440]
bluez-5.85/src/sdpd-request.c:108: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cinfo
#  106|   	memset(cinfo, 0, sizeof(sdp_cont_info_t));
#  107|   	cinfo->buf.data = data;
#  108|-> 	cinfo->buf.data_size = buf->data_size;
#  109|   	cinfo->buf.buf_size = buf->data_size;
#  110|   	cinfo->timestamp = sdp_get_time();

Error: CPPCHECK_WARNING (CWE-476): [#def441]
bluez-5.85/src/sdpd-request.c:109: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cinfo
#  107|   	cinfo->buf.data = data;
#  108|   	cinfo->buf.data_size = buf->data_size;
#  109|-> 	cinfo->buf.buf_size = buf->data_size;
#  110|   	cinfo->timestamp = sdp_get_time();
#  111|   	cinfo->sock = req->sock;

Error: CPPCHECK_WARNING (CWE-476): [#def442]
bluez-5.85/src/sdpd-request.c:110: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cinfo
#  108|   	cinfo->buf.data_size = buf->data_size;
#  109|   	cinfo->buf.buf_size = buf->data_size;
#  110|-> 	cinfo->timestamp = sdp_get_time();
#  111|   	cinfo->sock = req->sock;
#  112|   	cinfo->opcode = req->opcode;

Error: CPPCHECK_WARNING (CWE-476): [#def443]
bluez-5.85/src/sdpd-request.c:111: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cinfo
#  109|   	cinfo->buf.buf_size = buf->data_size;
#  110|   	cinfo->timestamp = sdp_get_time();
#  111|-> 	cinfo->sock = req->sock;
#  112|   	cinfo->opcode = req->opcode;
#  113|   

Error: CPPCHECK_WARNING (CWE-476): [#def444]
bluez-5.85/src/sdpd-request.c:112: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cinfo
#  110|   	cinfo->timestamp = sdp_get_time();
#  111|   	cinfo->sock = req->sock;
#  112|-> 	cinfo->opcode = req->opcode;
#  113|   
#  114|   	cstates = sdp_list_append(cstates, cinfo);

Error: CPPCHECK_WARNING (CWE-476): [#def445]
bluez-5.85/src/sdpd-request.c:116: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cinfo
#  114|   	cstates = sdp_list_append(cstates, cinfo);
#  115|   
#  116|-> 	return cinfo->timestamp;
#  117|   }
#  118|   

Error: COMPILER_WARNING: [#def446]
bluez-5.85/src/sdpd-request.c: scope_hint: In function ‘extract_des’
bluez-5.85/src/sdpd-request.c:141:15: warning[-Wunused-but-set-variable=]: variable ‘numberOfElements’ set but not used
#  141 |         short numberOfElements = 0;
#      |               ^~~~~~~~~~~~~~~~
#  139|   	uint8_t seqType;
#  140|   	int scanned, data_size = 0;
#  141|-> 	short numberOfElements = 0;
#  142|   	int seqlen = 0;
#  143|   	sdp_list_t *pSeq = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def447]
bluez-5.85/src/sdpd-request.c:149:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1009:13: enter_function: entry to ‘process_request’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1033:26: call_function: calling ‘service_search_req’ from ‘process_request’
#  147|   	size_t bufsize;
#  148|   
#  149|-> 	scanned = sdp_extract_seqtype(buf, len, &seqType, &data_size);
#  150|   
#  151|   	SDPDBG("Seq type : %d", seqType);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def448]
bluez-5.85/src/sdpd-request.c:153:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1009:13: enter_function: entry to ‘process_request’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1033:26: call_function: calling ‘service_search_req’ from ‘process_request’
#  151|   	SDPDBG("Seq type : %d", seqType);
#  152|   	if (!scanned || (seqType != SDP_SEQ8 && seqType != SDP_SEQ16)) {
#  153|-> 		error("Unknown seq type");
#  154|   		return -1;
#  155|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def449]
bluez-5.85/src/sdpd-request.c:203: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aid
#  201|   				struct attrid *aid;
#  202|   				aid = malloc(sizeof(struct attrid));
#  203|-> 				aid->dtd = dataType;
#  204|   				aid->uint16 = get_be16(p);
#  205|   				pElem = (char *) aid;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def450]
bluez-5.85/src/sdpd-request.c:203:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aid’
bluez-5.85/src/sdpd-request.c:1009:13: enter_function: entry to ‘process_request’
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1038:26: call_function: calling ‘service_attr_req’ from ‘process_request’
#  201|   				struct attrid *aid;
#  202|   				aid = malloc(sizeof(struct attrid));
#  203|-> 				aid->dtd = dataType;
#  204|   				aid->uint16 = get_be16(p);
#  205|   				pElem = (char *) aid;

Error: CPPCHECK_WARNING (CWE-476): [#def451]
bluez-5.85/src/sdpd-request.c:204: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aid
#  202|   				aid = malloc(sizeof(struct attrid));
#  203|   				aid->dtd = dataType;
#  204|-> 				aid->uint16 = get_be16(p);
#  205|   				pElem = (char *) aid;
#  206|   			} else {

Error: CPPCHECK_WARNING (CWE-476): [#def452]
bluez-5.85/src/sdpd-request.c:230: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aid
#  228|   				struct attrid *aid;
#  229|   				aid = malloc(sizeof(struct attrid));
#  230|-> 				aid->dtd = dataType;
#  231|   				aid->uint32 = get_be32(p);
#  232|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def453]
bluez-5.85/src/sdpd-request.c:230:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aid’
bluez-5.85/src/sdpd-request.c:1009:13: enter_function: entry to ‘process_request’
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1038:26: call_function: calling ‘service_attr_req’ from ‘process_request’
#  228|   				struct attrid *aid;
#  229|   				aid = malloc(sizeof(struct attrid));
#  230|-> 				aid->dtd = dataType;
#  231|   				aid->uint32 = get_be32(p);
#  232|   

Error: CPPCHECK_WARNING (CWE-476): [#def454]
bluez-5.85/src/sdpd-request.c:231: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aid
#  229|   				aid = malloc(sizeof(struct attrid));
#  230|   				aid->dtd = dataType;
#  231|-> 				aid->uint32 = get_be32(p);
#  232|   
#  233|   				pElem = (char *) aid;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def455]
bluez-5.85/src/sdpd-request.c:250:34: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1009:13: enter_function: entry to ‘process_request’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1033:26: call_function: calling ‘service_search_req’ from ‘process_request’
#  248|   		case SDP_UUID128:
#  249|   			puuid = malloc(sizeof(uuid_t));
#  250|-> 			status = sdp_uuid_extract(p, bufsize, puuid, &localSeqLength);
#  251|   			if (status < 0) {
#  252|   				free(puuid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def456]
bluez-5.85/src/sdpd-request.c:250:34: warning[-Wanalyzer-malloc-leak]: leak of ‘puuid’
bluez-5.85/src/sdpd-request.c:837:12: enter_function: entry to ‘service_search_attr_req’
bluez-5.85/src/sdpd-request.c:854:19: call_function: calling ‘extract_des’ from ‘service_search_attr_req’
#  248|   		case SDP_UUID128:
#  249|   			puuid = malloc(sizeof(uuid_t));
#  250|-> 			status = sdp_uuid_extract(p, bufsize, puuid, &localSeqLength);
#  251|   			if (status < 0) {
#  252|   				free(puuid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
bluez-5.85/src/sdpd-request.c:265:32: warning[-Wanalyzer-malloc-leak]: leak of ‘aid’
bluez-5.85/src/sdpd-request.c:1009:13: enter_function: entry to ‘process_request’
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1038:26: call_function: calling ‘service_attr_req’ from ‘process_request’
#  263|   		}
#  264|   		if (status == 0) {
#  265|-> 			pSeq = sdp_list_append(pSeq, pElem);
#  266|   			numberOfElements++;
#  267|   			SDPDBG("No of elements : %d", numberOfElements);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
bluez-5.85/src/sdpd-request.c:265:32: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1009:13: enter_function: entry to ‘process_request’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1033:26: call_function: calling ‘service_search_req’ from ‘process_request’
#  263|   		}
#  264|   		if (status == 0) {
#  265|-> 			pSeq = sdp_list_append(pSeq, pElem);
#  266|   			numberOfElements++;
#  267|   			SDPDBG("No of elements : %d", numberOfElements);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
bluez-5.85/src/sdpd-request.c:265:32: warning[-Wanalyzer-malloc-leak]: leak of ‘pElem’
bluez-5.85/src/sdpd-request.c:837:12: enter_function: entry to ‘service_search_attr_req’
bluez-5.85/src/sdpd-request.c:854:19: call_function: calling ‘extract_des’ from ‘service_search_attr_req’
#  263|   		}
#  264|   		if (status == 0) {
#  265|-> 			pSeq = sdp_list_append(pSeq, pElem);
#  266|   			numberOfElements++;
#  267|   			SDPDBG("No of elements : %d", numberOfElements);

Error: CPPCHECK_WARNING (CWE-476): [#def460]
bluez-5.85/src/sdpd-request.c:1017: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
# 1015|   	int status = SDP_INVALID_SYNTAX;
# 1016|   
# 1017|-> 	memset(buf, 0, USHRT_MAX);
# 1018|   	rsp.data = buf + sizeof(sdp_pdu_hdr_t);
# 1019|   	rsp.data_size = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def461]
bluez-5.85/src/sdpd-request.c:1017:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘buf’ where non-null expected
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: this call could return NULL
bluez-5.85/src/sdpd-request.c:1017:9: danger: argument 1 (‘buf’) from [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
# 1015|   	int status = SDP_INVALID_SYNTAX;
# 1016|   
# 1017|-> 	memset(buf, 0, USHRT_MAX);
# 1018|   	rsp.data = buf + sizeof(sdp_pdu_hdr_t);
# 1019|   	rsp.data_size = 0;

Error: CPPCHECK_WARNING (CWE-682): [#def462]
bluez-5.85/src/sdpd-request.c:1018: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 1016|   
# 1017|   	memset(buf, 0, USHRT_MAX);
# 1018|-> 	rsp.data = buf + sizeof(sdp_pdu_hdr_t);
# 1019|   	rsp.data_size = 0;
# 1020|   	rsp.buf_size = USHRT_MAX - sizeof(sdp_pdu_hdr_t);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
bluez-5.85/src/sdpd-request.c:1050:34: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1049:20: branch_true: following ‘true’ branch...
bluez-5.85/src/sdpd-request.c:1050:34: branch_true: ...to here
bluez-5.85/src/sdpd-request.c:1050:34: throw: if ‘service_register_req’ throws an exception...
bluez-5.85/src/sdpd-request.c:1050:34: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 1048|   		SDPDBG("Service register request");
# 1049|   		if (req->local) {
# 1050|-> 			status = service_register_req(req, &rsp);
# 1051|   			rsphdr->pdu_id = SDP_SVC_REGISTER_RSP;
# 1052|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
bluez-5.85/src/sdpd-request.c:1057:34: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1056:20: branch_true: following ‘true’ branch...
bluez-5.85/src/sdpd-request.c:1057:34: branch_true: ...to here
bluez-5.85/src/sdpd-request.c:1057:34: throw: if ‘service_update_req’ throws an exception...
bluez-5.85/src/sdpd-request.c:1057:34: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1055|   		SDPDBG("Service update request");
# 1056|   		if (req->local) {
# 1057|-> 			status = service_update_req(req, &rsp);
# 1058|   			rsphdr->pdu_id = SDP_SVC_UPDATE_RSP;
# 1059|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
bluez-5.85/src/sdpd-request.c:1064:34: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1063:20: branch_true: following ‘true’ branch...
bluez-5.85/src/sdpd-request.c:1064:34: branch_true: ...to here
bluez-5.85/src/sdpd-request.c:1064:34: throw: if ‘service_remove_req’ throws an exception...
bluez-5.85/src/sdpd-request.c:1064:34: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 1062|   		SDPDBG("Service removal request");
# 1063|   		if (req->local) {
# 1064|-> 			status = service_remove_req(req, &rsp);
# 1065|   			rsphdr->pdu_id = SDP_SVC_REMOVE_RSP;
# 1066|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
bluez-5.85/src/sdpd-request.c:1069:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1023:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-request.c:1028:23: branch_false: ...to here
bluez-5.85/src/sdpd-request.c:1069:17: throw: if ‘btd_error’ throws an exception...
bluez-5.85/src/sdpd-request.c:1069:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 1067|   		break;
# 1068|   	default:
# 1069|-> 		error("Unknown PDU ID : 0x%x received", reqhdr->pdu_id);
# 1070|   		status = SDP_INVALID_SYNTAX;
# 1071|   		break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
bluez-5.85/src/sdpd-request.c:1093:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1093:13: throw: if ‘send’ throws an exception...
bluez-5.85/src/sdpd-request.c:1093:13: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 1091|   
# 1092|   	/* stream the rsp PDU */
# 1093|-> 	if (send(req->sock, rsp.data, rsp.data_size, 0) < 0)
# 1094|   		error("send: %s (%d)", strerror(errno), errno);
# 1095|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
bluez-5.85/src/sdpd-request.c:1094:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-request.c:1014:24: acquire_memory: allocated here
bluez-5.85/src/sdpd-request.c:1093:12: branch_true: following ‘true’ branch...
bluez-5.85/src/sdpd-request.c:1094:17: branch_true: ...to here
bluez-5.85/src/sdpd-request.c:1094:17: throw: if ‘btd_error’ throws an exception...
bluez-5.85/src/sdpd-request.c:1094:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 1092|   	/* stream the rsp PDU */
# 1093|   	if (send(req->sock, rsp.data, rsp.data_size, 0) < 0)
# 1094|-> 		error("send: %s (%d)", strerror(errno), errno);
# 1095|   
# 1096|   	SDPDBG("Bytes Sent : %d", rsp.data_size);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
bluez-5.85/src/sdpd-server.c:161:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/src/sdpd-server.c:149:12: branch_false: following ‘false’ branch...
bluez-5.85/src/sdpd-server.c:152:15: branch_false: ...to here
bluez-5.85/src/sdpd-server.c:153:12: branch_false: following ‘false’ branch (when ‘len > 4’)...
bluez-5.85/src/sdpd-server.c:156:40: branch_false: ...to here
bluez-5.85/src/sdpd-server.c:157:15: acquire_memory: allocated here
bluez-5.85/src/sdpd-server.c:158:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/src/sdpd-server.c:161:15: branch_false: ...to here
bluez-5.85/src/sdpd-server.c:161:15: throw: if ‘recv’ throws an exception...
bluez-5.85/src/sdpd-server.c:161:15: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  159|   		return TRUE;
#  160|   
#  161|-> 	len = recv(sk, buf, size, 0);
#  162|   	/* Check here only that the received message is not empty.
#  163|   	 * Incorrect length of message should be processed later

Error: CPPCHECK_WARNING (CWE-476): [#def470]
bluez-5.85/src/sdpd-service.c:378: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: version
#  376|   	for (i = 0; i < sdpServerVnumEntries; i++) {
#  377|   		uint16_t *version = malloc(sizeof(uint16_t));
#  378|-> 		*version = sdpVnumArray[i].major;
#  379|   		*version = (*version << 8);
#  380|   		*version |= sdpVnumArray[i].minor;

Error: CPPCHECK_WARNING (CWE-476): [#def471]
bluez-5.85/src/sdpd-service.c:379: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: version
#  377|   		uint16_t *version = malloc(sizeof(uint16_t));
#  378|   		*version = sdpVnumArray[i].major;
#  379|-> 		*version = (*version << 8);
#  380|   		*version |= sdpVnumArray[i].minor;
#  381|   		versions[i] = version;

Error: CPPCHECK_WARNING (CWE-476): [#def472]
bluez-5.85/src/sdpd-service.c:380: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: version
#  378|   		*version = sdpVnumArray[i].major;
#  379|   		*version = (*version << 8);
#  380|-> 		*version |= sdpVnumArray[i].minor;
#  381|   		versions[i] = version;
#  382|   		versionDTDs[i] = &dtd;

Error: CPPCHECK_WARNING (CWE-476): [#def473]
bluez-5.85/src/sdpd-service.c:381: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: versions
#  379|   		*version = (*version << 8);
#  380|   		*version |= sdpVnumArray[i].minor;
#  381|-> 		versions[i] = version;
#  382|   		versionDTDs[i] = &dtd;
#  383|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def474]
bluez-5.85/src/sdpd-service.c:382: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: versionDTDs
#  380|   		*version |= sdpVnumArray[i].minor;
#  381|   		versions[i] = version;
#  382|-> 		versionDTDs[i] = &dtd;
#  383|   	}
#  384|   	pData = sdp_seq_alloc(versionDTDs, versions, sdpServerVnumEntries);

Error: CPPCHECK_WARNING (CWE-476): [#def475]
bluez-5.85/src/sdpd-service.c:386: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: versions
#  384|   	pData = sdp_seq_alloc(versionDTDs, versions, sdpServerVnumEntries);
#  385|   	for (i = 0; i < sdpServerVnumEntries; i++)
#  386|-> 		free(versions[i]);
#  387|   	free(versions);
#  388|   	free(versionDTDs);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def476]
bluez-5.85/src/shared/ad.c:389:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
bluez-5.85/src/shared/ad.c:385:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/ad.c:386:21: branch_true: ...to here
bluez-5.85/src/shared/ad.c:388:17: release_memory: using NULL here
bluez-5.85/src/shared/ad.c:389:17: danger: argument 1 ('realloc(*<unknown>.data,  len)') NULL where non-null expected
#  387|   			return false;
#  388|   		new_data->data = realloc(new_data->data, len);
#  389|-> 		memcpy(new_data->data, data, len);
#  390|   		new_data->len = len;
#  391|   		return true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def477]
bluez-5.85/src/shared/ad.c:547:43: warning[-Wanalyzer-malloc-leak]: leak of 'iov.iov_base'
bluez-5.85/src/shared/ad.c:694:10: enter_function: entry to 'bt_ad_generate'
bluez-5.85/src/shared/ad.c:698:12: branch_false: following 'false' branch (when 'ad' is non-NULL)...
bluez-5.85/src/shared/ad.c:701:19: branch_false: ...to here
bluez-5.85/src/shared/ad.c:701:19: call_function: calling 'bt_ad_length' from 'bt_ad_generate'
bluez-5.85/src/shared/ad.c:701:19: return_function: returning to 'bt_ad_generate' from 'bt_ad_length'
bluez-5.85/src/shared/ad.c:703:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/ad.c:706:24: branch_false: ...to here
bluez-5.85/src/shared/ad.c:706:24: acquire_memory: allocated here
bluez-5.85/src/shared/ad.c:707:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/ad.c:710:9: branch_false: ...to here
bluez-5.85/src/shared/ad.c:712:9: call_function: calling 'serialize_service_uuids' from 'bt_ad_generate'
#  545|   				uint8_t ad_type, struct iovec *iov)
#  546|   {
#  547|-> 	const struct queue_entry *entry = queue_get_entries(uuids);
#  548|   	uint8_t *len = NULL;
#  549|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def478]
bluez-5.85/src/shared/ad.c:556:33: warning[-Wanalyzer-malloc-leak]: leak of 'iov.iov_base'
bluez-5.85/src/shared/ad.c:694:10: enter_function: entry to 'bt_ad_generate'
bluez-5.85/src/shared/ad.c:698:12: branch_false: following 'false' branch (when 'ad' is non-NULL)...
bluez-5.85/src/shared/ad.c:701:19: branch_false: ...to here
bluez-5.85/src/shared/ad.c:701:19: call_function: calling 'bt_ad_length' from 'bt_ad_generate'
bluez-5.85/src/shared/ad.c:701:19: return_function: returning to 'bt_ad_generate' from 'bt_ad_length'
bluez-5.85/src/shared/ad.c:703:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/ad.c:706:24: branch_false: ...to here
bluez-5.85/src/shared/ad.c:706:24: acquire_memory: allocated here
bluez-5.85/src/shared/ad.c:707:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/ad.c:710:9: branch_false: ...to here
bluez-5.85/src/shared/ad.c:712:9: call_function: calling 'serialize_service_uuids' from 'bt_ad_generate'
#  554|   			if (!len) {
#  555|   				len = iov->iov_base + iov->iov_len;
#  556|-> 				util_iov_push_u8(iov, 1);
#  557|   				util_iov_push_u8(iov, ad_type);
#  558|   			}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def479]
bluez-5.85/src/shared/ad.c:847:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
bluez-5.85/src/shared/ad.c:843:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/ad.c:844:21: branch_true: ...to here
bluez-5.85/src/shared/ad.c:846:17: release_memory: using NULL here
bluez-5.85/src/shared/ad.c:847:17: danger: argument 1 ('realloc(*<unknown>.data,  len)') NULL where non-null expected
#  845|   			return false;
#  846|   		new_data->data = realloc(new_data->data, len);
#  847|-> 		memcpy(new_data->data, data, len);
#  848|   		new_data->len = len;
#  849|   		return true;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def480]
bluez-5.85/src/shared/ad.c:983:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
bluez-5.85/src/shared/ad.c:979:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/ad.c:980:21: branch_true: ...to here
bluez-5.85/src/shared/ad.c:982:17: release_memory: using NULL here
bluez-5.85/src/shared/ad.c:983:17: danger: argument 1 ('realloc(*<unknown>.data,  len)') NULL where non-null expected
#  981|   			return false;
#  982|   		new_data->data = realloc(new_data->data, len);
#  983|-> 		memcpy(new_data->data, data, len);
#  984|   		new_data->len = len;
#  985|   		return true;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def481]
bluez-5.85/src/shared/att.c:307:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/att.c:821:13: enter_function: entry to 'handle_rsp'
bluez-5.85/src/shared/att.c:835:12: branch_true: following 'true' branch (when 'op' is NULL)...
bluez-5.85/src/shared/att.c:836:17: branch_true: ...to here
bluez-5.85/src/shared/att.c:836:17: call_function: calling 'att_log' from 'handle_rsp'
#  305|   
#  306|   	va_start(va, format);
#  307|-> 	util_debug_va(att->debug_callback, att->debug_data, format, va);
#  308|   	va_end(va);
#  309|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def482]
bluez-5.85/src/shared/bap.c:708:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/bap.c:5671:6: enter_function: entry to 'bt_bap_detach'
bluez-5.85/src/shared/bap.c:5673:9: call_function: calling 'bap_debug' from 'bt_bap_detach'
#  706|   
#  707|   	va_start(ap, format);
#  708|-> 	util_debug_va(bap->debug_func, bap->debug_data, format, ap);
#  709|   	va_end(ap);
#  710|   }

Error: CPPCHECK_WARNING (CWE-476): [#def483]
bluez-5.85/src/shared/bap.c:1027: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1025|   	status = malloc(len);
# 1026|   
# 1027|-> 	memset(status, 0, len);
# 1028|   	status->id = ep->id;
# 1029|   	status->state = ep->state;

Error: CPPCHECK_WARNING (CWE-476): [#def484]
bluez-5.85/src/shared/bap.c:1028: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1026|   
# 1027|   	memset(status, 0, len);
# 1028|-> 	status->id = ep->id;
# 1029|   	status->state = ep->state;
# 1030|   

Error: CPPCHECK_WARNING (CWE-476): [#def485]
bluez-5.85/src/shared/bap.c:1029: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1027|   	memset(status, 0, len);
# 1028|   	status->id = ep->id;
# 1029|-> 	status->state = ep->state;
# 1030|   
# 1031|   	/* Initialize preferred settings if not set */

Error: CPPCHECK_WARNING (CWE-476): [#def486]
bluez-5.85/src/shared/bap.c:1091: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1089|   	status = malloc(len);
# 1090|   
# 1091|-> 	memset(status, 0, len);
# 1092|   	status->id = ep->id;
# 1093|   	status->state = ep->state;

Error: CPPCHECK_WARNING (CWE-476): [#def487]
bluez-5.85/src/shared/bap.c:1092: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1090|   
# 1091|   	memset(status, 0, len);
# 1092|-> 	status->id = ep->id;
# 1093|   	status->state = ep->state;
# 1094|   

Error: CPPCHECK_WARNING (CWE-476): [#def488]
bluez-5.85/src/shared/bap.c:1093: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1091|   	memset(status, 0, len);
# 1092|   	status->id = ep->id;
# 1093|-> 	status->state = ep->state;
# 1094|   
# 1095|   	qos = (void *)status->params;

Error: CPPCHECK_WARNING (CWE-476): [#def489]
bluez-5.85/src/shared/bap.c:1095: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1093|   	status->state = ep->state;
# 1094|   
# 1095|-> 	qos = (void *)status->params;
# 1096|   	qos->cis_id = stream->qos.ucast.cis_id;
# 1097|   	qos->cig_id = stream->qos.ucast.cig_id;

Error: CPPCHECK_WARNING (CWE-476): [#def490]
bluez-5.85/src/shared/bap.c:1128: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1126|   	status = malloc(len);
# 1127|   
# 1128|-> 	memset(status, 0, len);
# 1129|   	status->id = ep->id;
# 1130|   	status->state = state;

Error: CPPCHECK_WARNING (CWE-476): [#def491]
bluez-5.85/src/shared/bap.c:1129: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1127|   
# 1128|   	memset(status, 0, len);
# 1129|-> 	status->id = ep->id;
# 1130|   	status->state = state;
# 1131|   

Error: CPPCHECK_WARNING (CWE-476): [#def492]
bluez-5.85/src/shared/bap.c:1130: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1128|   	memset(status, 0, len);
# 1129|   	status->id = ep->id;
# 1130|-> 	status->state = state;
# 1131|   
# 1132|   	meta = (void *)status->params;

Error: CPPCHECK_WARNING (CWE-476): [#def493]
bluez-5.85/src/shared/bap.c:1132: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: status
# 1130|   	status->state = state;
# 1131|   
# 1132|-> 	meta = (void *)status->params;
# 1133|   	meta->cis_id = stream->qos.ucast.cis_id;
# 1134|   	meta->cig_id = stream->qos.ucast.cig_id;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def494]
bluez-5.85/src/shared/bap.c:1672:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/bap.c:5342:13: enter_function: entry to 'bap_cp_notify'
bluez-5.85/src/shared/bap.c:5351:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/bap.c:5355:9: branch_false: ...to here
bluez-5.85/src/shared/bap.c:5371:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/bap.c:5371:12: branch_false: ...to here
bluez-5.85/src/shared/bap.c:5387:9: call_function: calling 'bap_req_complete' from 'bap_cp_notify'
bluez-5.85/src/shared/bap.c:5387:9: return_function: returning to 'bap_cp_notify' from 'bap_req_complete'
bluez-5.85/src/shared/bap.c:5388:9: call_function: calling 'bap_process_queue' from 'bap_cp_notify'
# 1670|   	}
# 1671|   
# 1672|-> 	if (!gatt_db_attribute_get_char_data(ascs->ase_cp, NULL, &handle,
# 1673|   						NULL, NULL, NULL)) {
# 1674|   		DBG(bap, "Unable to find Control Point");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def495]
bluez-5.85/src/shared/bap.c:5396:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
# 5394|   	struct bt_ascs *ascs = bap_get_ascs(bap);
# 5395|   
# 5396|-> 	if (!gatt_db_attribute_get_char_data(ascs->ase_cp, NULL,
# 5397|   						&value_handle,
# 5398|   						NULL, NULL, NULL))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def496]
bluez-5.85/src/shared/bap.c:5461:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
# 5459|   	struct bt_ascs *ascs = bap_get_ascs(bap);
# 5460|   
# 5461|-> 	ascs->service = attr;
# 5462|   
# 5463|   	gatt_db_service_set_claimed(attr, true);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def497]
bluez-5.85/src/shared/bass.c:141:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/bass.c:1497:13: enter_function: entry to 'bass_disconnected'
bluez-5.85/src/shared/bass.c:1503:9: call_function: calling 'bass_debug' from 'bass_disconnected'
#  139|   
#  140|   	va_start(ap, format);
#  141|-> 	util_debug_va(bass->debug_func, bass->debug_data, format, ap);
#  142|   	va_end(ap);
#  143|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def498]
bluez-5.85/src/shared/bass.c:420:17: warning[-Wanalyzer-null-dereference]: dereference of NULL 'bad_code'
bluez-5.85/src/shared/bass.c:1279:13: enter_function: entry to 'read_bcast_recv_state'
bluez-5.85/src/shared/bass.c:1298:13: call_function: calling 'bass_build_bcast_src' from 'read_bcast_recv_state'
#  418|   
#  419|   	if (enc == BT_BASS_BIG_ENC_STATE_BAD_CODE)
#  420|-> 		memcpy(bcast_src->bad_code, bad_code, BT_BASS_BCAST_CODE_SIZE);
#  421|   	else
#  422|   		memset(bcast_src->bad_code, 0, BT_BASS_BCAST_CODE_SIZE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def499]
bluez-5.85/src/shared/bass.c:455:15: warning[-Wanalyzer-malloc-leak]: leak of 'notif'
bluez-5.85/src/shared/bass.c:1861:5: enter_function: entry to 'bt_bass_set_pa_sync'
bluez-5.85/src/shared/bass.c:1865:12: branch_false: following 'false' branch (when 'bcast_src' is non-NULL)...
bluez-5.85/src/shared/bass.c:1868:9: branch_false: ...to here
bluez-5.85/src/shared/bass.c:1870:15: call_function: calling 'bass_parse_bcast_src' from 'bt_bass_set_pa_sync'
#  453|   		return NULL;
#  454|   
#  455|-> 	iov = new0(struct iovec, 1);
#  456|   	if (!iov) {
#  457|   		free(notif);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def500]
bluez-5.85/src/shared/bass.c:1047:28: warning[-Wanalyzer-malloc-leak]: leak of '*data.meta'
bluez-5.85/src/shared/bass.c:1018:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/bass.c:1026:9: branch_false: ...to here
bluez-5.85/src/shared/bass.c:1028:25: branch_true: following 'true' branch...
bluez-5.85/src/shared/bass.c:1030:34: branch_true: ...to here
bluez-5.85/src/shared/bass.c:1034:20: branch_false: following 'false' branch...
bluez-5.85/src/shared/bass.c:1037:22: branch_false: ...to here
bluez-5.85/src/shared/bass.c:1037:20: branch_false: following 'false' branch...
bluez-5.85/src/shared/bass.c:1041:33: branch_false: ...to here
bluez-5.85/src/shared/bass.c:1041:20: branch_true: following 'true' branch...
bluez-5.85/src/shared/bass.c:1043:25: branch_true: ...to here
bluez-5.85/src/shared/bass.c:1047:28: branch_false: following 'false' branch...
bluez-5.85/src/shared/bass.c:1051:22: branch_false: ...to here
bluez-5.85/src/shared/bass.c:1051:20: branch_true: following 'true' branch...
bluez-5.85/src/shared/bass.c:1051:20: branch_true: ...to here
bluez-5.85/src/shared/bass.c:1028:25: branch_true: following 'true' branch...
bluez-5.85/src/shared/bass.c:1030:34: branch_true: ...to here
bluez-5.85/src/shared/bass.c:1034:20: branch_false: following 'false' branch...
bluez-5.85/src/shared/bass.c:1037:22: branch_false: ...to here
bluez-5.85/src/shared/bass.c:1037:20: branch_false: following 'false' branch...
bluez-5.85/src/shared/bass.c:1041:33: branch_false: ...to here
bluez-5.85/src/shared/bass.c:1041:20: branch_true: following 'true' branch...
bluez-5.85/src/shared/bass.c:1043:25: branch_true: ...to here
bluez-5.85/src/shared/bass.c:1046:38: acquire_memory: allocated here
bluez-5.85/src/shared/bass.c:1047:28: danger: '*data.meta' leaks here; was allocated at [(23)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/22)
# 1045|   			free(data->meta);
# 1046|   			data->meta = malloc0(data->meta_len);
# 1047|-> 			if (!data->meta)
# 1048|   				return;
# 1049|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def501]
bluez-5.85/src/shared/bass.c:1829:9: warning[-Wanalyzer-malloc-leak]: leak of 'req.iov_base'
bluez-5.85/src/shared/bass.c:1812:5: enter_function: entry to 'bt_bass_send'
bluez-5.85/src/shared/bass.c:1820:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/bass.c:1823:9: call_function: calling 'bass_debug' from 'bt_bass_send'
bluez-5.85/src/shared/bass.c:1823:9: return_function: returning to 'bt_bass_send' from 'bass_debug'
bluez-5.85/src/shared/bass.c:1825:24: acquire_memory: allocated here
bluez-5.85/src/shared/bass.c:1826:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/bass.c:1829:9: branch_false: ...to here
bluez-5.85/src/shared/bass.c:1829:9: throw: if 'util_iov_push_mem' throws an exception...
bluez-5.85/src/shared/bass.c:1829:9: danger: 'req.iov_base' leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
# 1827|   		return -EINVAL;
# 1828|   
# 1829|-> 	util_iov_push_mem(&req, sizeof(*hdr), hdr);
# 1830|   	util_iov_push_mem(&req, params->iov_len, params->iov_base);
# 1831|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def502]
bluez-5.85/src/shared/btsnoop.c:83:23: warning[-Wanalyzer-malloc-leak]: leak of 'btsnoop'
bluez-5.85/src/shared/btsnoop.c:79:19: acquire_memory: allocated here
bluez-5.85/src/shared/btsnoop.c:80:12: branch_false: following 'false' branch (when 'btsnoop' is non-NULL)...
bluez-5.85/src/shared/btsnoop.c:83:23: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:83:23: throw: if 'open' throws an exception...
bluez-5.85/src/shared/btsnoop.c:83:23: danger: 'btsnoop' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   81|   		return NULL;
#   82|   
#   83|-> 	btsnoop->fd = open(path, O_RDONLY | O_CLOEXEC);
#   84|   	if (btsnoop->fd < 0) {
#   85|   		free(btsnoop);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def503]
bluez-5.85/src/shared/btsnoop.c:123:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
bluez-5.85/src/shared/btsnoop.c:80:12: branch_false: following 'false' branch (when 'btsnoop' is non-NULL)...
bluez-5.85/src/shared/btsnoop.c:83:23: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:83:23: acquire_resource: opened here
bluez-5.85/src/shared/btsnoop.c:84:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/btsnoop.c:89:9: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:123:9: throw: if 'close' throws an exception...
bluez-5.85/src/shared/btsnoop.c:123:9: danger: leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  121|   
#  122|   failed:
#  123|-> 	close(btsnoop->fd);
#  124|   	free(btsnoop);
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def504]
bluez-5.85/src/shared/btsnoop.c:123:9: warning[-Wanalyzer-malloc-leak]: leak of 'btsnoop'
bluez-5.85/src/shared/btsnoop.c:79:19: acquire_memory: allocated here
bluez-5.85/src/shared/btsnoop.c:80:12: branch_false: following 'false' branch (when 'btsnoop' is non-NULL)...
bluez-5.85/src/shared/btsnoop.c:83:23: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:84:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/btsnoop.c:89:9: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:123:9: throw: if 'close' throws an exception...
bluez-5.85/src/shared/btsnoop.c:123:9: danger: 'btsnoop' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  121|   
#  122|   failed:
#  123|-> 	close(btsnoop->fd);
#  124|   	free(btsnoop);
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def505]
bluez-5.85/src/shared/btsnoop.c:153:23: warning[-Wanalyzer-malloc-leak]: leak of 'btsnoop'
bluez-5.85/src/shared/btsnoop.c:138:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/btsnoop.c:141:19: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:141:19: acquire_memory: allocated here
bluez-5.85/src/shared/btsnoop.c:142:12: branch_false: following 'false' branch (when 'btsnoop' is non-NULL)...
bluez-5.85/src/shared/btsnoop.c:146:12: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:153:23: throw: if 'open' throws an exception...
bluez-5.85/src/shared/btsnoop.c:153:23: danger: 'btsnoop' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  151|   	}
#  152|   
#  153|-> 	btsnoop->fd = open(real_path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC,
#  154|   									0644);
#  155|   	if (btsnoop->fd < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def506]
bluez-5.85/src/shared/btsnoop.c:170:19: warning[-Wanalyzer-malloc-leak]: leak of 'btsnoop'
bluez-5.85/src/shared/btsnoop.c:138:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/btsnoop.c:141:19: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:141:19: acquire_memory: allocated here
bluez-5.85/src/shared/btsnoop.c:142:12: branch_false: following 'false' branch (when 'btsnoop' is non-NULL)...
bluez-5.85/src/shared/btsnoop.c:146:12: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:155:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/btsnoop.c:160:9: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:170:19: throw: if 'write' throws an exception...
bluez-5.85/src/shared/btsnoop.c:170:19: danger: 'btsnoop' leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  168|   	hdr.type = htobe32(btsnoop->format);
#  169|   
#  170|-> 	written = write(btsnoop->fd, &hdr, BTSNOOP_HDR_SIZE);
#  171|   	if (written < 0) {
#  172|   		close(btsnoop->fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def507]
bluez-5.85/src/shared/btsnoop.c:172:17: warning[-Wanalyzer-malloc-leak]: leak of 'btsnoop'
bluez-5.85/src/shared/btsnoop.c:138:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/btsnoop.c:141:19: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:141:19: acquire_memory: allocated here
bluez-5.85/src/shared/btsnoop.c:142:12: branch_false: following 'false' branch (when 'btsnoop' is non-NULL)...
bluez-5.85/src/shared/btsnoop.c:146:12: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:155:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/btsnoop.c:160:9: branch_false: ...to here
bluez-5.85/src/shared/btsnoop.c:171:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/btsnoop.c:172:17: branch_true: ...to here
bluez-5.85/src/shared/btsnoop.c:172:17: throw: if 'close' throws an exception...
bluez-5.85/src/shared/btsnoop.c:172:17: danger: 'btsnoop' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  170|   	written = write(btsnoop->fd, &hdr, BTSNOOP_HDR_SIZE);
#  171|   	if (written < 0) {
#  172|-> 		close(btsnoop->fd);
#  173|   		free(btsnoop);
#  174|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def508]
bluez-5.85/src/shared/ccp.c:124:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/ccp.c:1220:6: enter_function: entry to 'bt_ccp_detach'
bluez-5.85/src/shared/ccp.c:1222:9: call_function: calling 'ccp_debug' from 'bt_ccp_detach'
#  122|   
#  123|   	va_start(ap, format);
#  124|-> 	util_debug_va(ccp->debug_func, ccp->debug_data, format, ap);
#  125|   	va_end(ap);
#  126|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def509]
bluez-5.85/src/shared/ccp.c:813:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/ccp.c:806:13: enter_function: entry to 'bt_ccp_technology_attach'
bluez-5.85/src/shared/ccp.c:809:30: call_function: calling 'ccp_get_ccs' from 'bt_ccp_technology_attach'
bluez-5.85/src/shared/ccp.c:809:30: return_function: returning to 'bt_ccp_technology_attach' from 'ccp_get_ccs'
bluez-5.85/src/shared/ccp.c:811:9: call_function: calling 'ccp_debug' from 'bt_ccp_technology_attach'
bluez-5.85/src/shared/ccp.c:811:9: return_function: returning to 'bt_ccp_technology_attach' from 'ccp_debug'
bluez-5.85/src/shared/ccp.c:813:46: danger: dereference of NULL 'ccp_get_ccs(ccp)'
#  811|   	DBG(ccp, "");
#  812|   
#  813|-> 	if (!gatt_db_attribute_get_char_data(ccs->bearer_technology, NULL,
#  814|   					     &value_handle,
#  815|   					     NULL, NULL, NULL))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def510]
bluez-5.85/src/shared/ccp.c:833:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/ccp.c:826:13: enter_function: entry to 'bt_ccp_strength_attach'
bluez-5.85/src/shared/ccp.c:829:30: call_function: calling 'ccp_get_ccs' from 'bt_ccp_strength_attach'
bluez-5.85/src/shared/ccp.c:829:30: return_function: returning to 'bt_ccp_strength_attach' from 'ccp_get_ccs'
bluez-5.85/src/shared/ccp.c:831:9: call_function: calling 'ccp_debug' from 'bt_ccp_strength_attach'
bluez-5.85/src/shared/ccp.c:831:9: return_function: returning to 'bt_ccp_strength_attach' from 'ccp_debug'
bluez-5.85/src/shared/ccp.c:833:46: danger: dereference of NULL 'ccp_get_ccs(ccp)'
#  831|   	DBG(ccp, "");
#  832|   
#  833|-> 	if (!gatt_db_attribute_get_char_data(ccs->signal_strength, NULL,
#  834|   					     &value_handle,
#  835|   					     NULL, NULL, NULL))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def511]
bluez-5.85/src/shared/ccp.c:853:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/ccp.c:846:13: enter_function: entry to 'bt_ccp_ccid_attach'
bluez-5.85/src/shared/ccp.c:849:30: call_function: calling 'ccp_get_ccs' from 'bt_ccp_ccid_attach'
bluez-5.85/src/shared/ccp.c:849:30: return_function: returning to 'bt_ccp_ccid_attach' from 'ccp_get_ccs'
bluez-5.85/src/shared/ccp.c:851:9: call_function: calling 'ccp_debug' from 'bt_ccp_ccid_attach'
bluez-5.85/src/shared/ccp.c:851:9: return_function: returning to 'bt_ccp_ccid_attach' from 'ccp_debug'
bluez-5.85/src/shared/ccp.c:853:46: danger: dereference of NULL 'ccp_get_ccs(ccp)'
#  851|   	DBG(ccp, "");
#  852|   
#  853|-> 	if (!gatt_db_attribute_get_char_data(ccs->ccid, NULL, &value_handle,
#  854|   					     NULL, NULL, NULL))
#  855|   		return;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def512]
bluez-5.85/src/shared/ccp.c:872:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/ccp.c:865:13: enter_function: entry to 'bt_ccp_tar_uri_attach'
bluez-5.85/src/shared/ccp.c:868:30: call_function: calling 'ccp_get_ccs' from 'bt_ccp_tar_uri_attach'
bluez-5.85/src/shared/ccp.c:868:30: return_function: returning to 'bt_ccp_tar_uri_attach' from 'ccp_get_ccs'
bluez-5.85/src/shared/ccp.c:870:9: call_function: calling 'ccp_debug' from 'bt_ccp_tar_uri_attach'
bluez-5.85/src/shared/ccp.c:870:9: return_function: returning to 'bt_ccp_tar_uri_attach' from 'ccp_debug'
bluez-5.85/src/shared/ccp.c:872:46: danger: dereference of NULL 'ccp_get_ccs(ccp)'
#  870|   	DBG(ccp, "");
#  871|   
#  872|-> 	if (!gatt_db_attribute_get_char_data(ccs->target_bearer_uri, NULL,
#  873|   					     &value_handle,
#  874|   					     NULL, NULL, NULL))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def513]
bluez-5.85/src/shared/ccp.c:893:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/ccp.c:886:13: enter_function: entry to 'bt_ccp_ctrl_point_attach'
bluez-5.85/src/shared/ccp.c:889:30: call_function: calling 'ccp_get_ccs' from 'bt_ccp_ctrl_point_attach'
bluez-5.85/src/shared/ccp.c:889:30: return_function: returning to 'bt_ccp_ctrl_point_attach' from 'ccp_get_ccs'
bluez-5.85/src/shared/ccp.c:891:9: call_function: calling 'ccp_debug' from 'bt_ccp_ctrl_point_attach'
bluez-5.85/src/shared/ccp.c:891:9: return_function: returning to 'bt_ccp_ctrl_point_attach' from 'ccp_debug'
bluez-5.85/src/shared/ccp.c:893:46: danger: dereference of NULL 'ccp_get_ccs(ccp)'
#  891|   	DBG(ccp, "");
#  892|   
#  893|-> 	if (!gatt_db_attribute_get_char_data(ccs->call_ctrl_point, NULL,
#  894|   					     &value_handle,
#  895|   					     NULL, NULL, NULL))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def514]
bluez-5.85/src/shared/ccp.c:913:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/ccp.c:906:13: enter_function: entry to 'bt_ccp_ctrl_opcode_attach'
bluez-5.85/src/shared/ccp.c:909:30: call_function: calling 'ccp_get_ccs' from 'bt_ccp_ctrl_opcode_attach'
bluez-5.85/src/shared/ccp.c:909:30: return_function: returning to 'bt_ccp_ctrl_opcode_attach' from 'ccp_get_ccs'
bluez-5.85/src/shared/ccp.c:911:9: call_function: calling 'ccp_debug' from 'bt_ccp_ctrl_opcode_attach'
bluez-5.85/src/shared/ccp.c:911:9: return_function: returning to 'bt_ccp_ctrl_opcode_attach' from 'ccp_debug'
bluez-5.85/src/shared/ccp.c:913:46: danger: dereference of NULL 'ccp_get_ccs(ccp)'
#  911|   	DBG(ccp, "");
#  912|   
#  913|-> 	if (!gatt_db_attribute_get_char_data(ccs->call_ctrl_opt_opcode, NULL,
#  914|   					     &value_handle,
#  915|   					     NULL, NULL, NULL))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def515]
bluez-5.85/src/shared/ccp.c:933:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/ccp.c:926:13: enter_function: entry to 'bt_ccp_friendly_name_attach'
bluez-5.85/src/shared/ccp.c:929:30: call_function: calling 'ccp_get_ccs' from 'bt_ccp_friendly_name_attach'
bluez-5.85/src/shared/ccp.c:929:30: return_function: returning to 'bt_ccp_friendly_name_attach' from 'ccp_get_ccs'
bluez-5.85/src/shared/ccp.c:931:9: call_function: calling 'ccp_debug' from 'bt_ccp_friendly_name_attach'
bluez-5.85/src/shared/ccp.c:931:9: return_function: returning to 'bt_ccp_friendly_name_attach' from 'ccp_debug'
bluez-5.85/src/shared/ccp.c:933:46: danger: dereference of NULL 'ccp_get_ccs(ccp)'
#  931|   	DBG(ccp, "");
#  932|   
#  933|-> 	if (!gatt_db_attribute_get_char_data(ccs->friendly_name, NULL,
#  934|   					     &value_handle,
#  935|   					     NULL, NULL, NULL))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def516]
bluez-5.85/src/shared/ccp.c:953:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/ccp.c:946:13: enter_function: entry to 'bt_ccp_signal_intrvl_attach'
bluez-5.85/src/shared/ccp.c:949:30: call_function: calling 'ccp_get_ccs' from 'bt_ccp_signal_intrvl_attach'
bluez-5.85/src/shared/ccp.c:949:30: return_function: returning to 'bt_ccp_signal_intrvl_attach' from 'ccp_get_ccs'
bluez-5.85/src/shared/ccp.c:951:9: call_function: calling 'ccp_debug' from 'bt_ccp_signal_intrvl_attach'
bluez-5.85/src/shared/ccp.c:951:9: return_function: returning to 'bt_ccp_signal_intrvl_attach' from 'ccp_debug'
bluez-5.85/src/shared/ccp.c:953:46: danger: dereference of NULL 'ccp_get_ccs(ccp)'
#  951|   	DBG(ccp, "");
#  952|   
#  953|-> 	if (!gatt_db_attribute_get_char_data(ccs->signal_reporting_intrvl, NULL,
#  954|   					     &value_handle,
#  955|   					     NULL, NULL, NULL))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def517]
bluez-5.85/src/shared/ccp.c:973:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/ccp.c:966:13: enter_function: entry to 'bt_ccp_uri_list_attach'
bluez-5.85/src/shared/ccp.c:969:30: call_function: calling 'ccp_get_ccs' from 'bt_ccp_uri_list_attach'
bluez-5.85/src/shared/ccp.c:969:30: return_function: returning to 'bt_ccp_uri_list_attach' from 'ccp_get_ccs'
bluez-5.85/src/shared/ccp.c:971:9: call_function: calling 'ccp_debug' from 'bt_ccp_uri_list_attach'
bluez-5.85/src/shared/ccp.c:971:9: return_function: returning to 'bt_ccp_uri_list_attach' from 'ccp_debug'
bluez-5.85/src/shared/ccp.c:973:46: danger: dereference of NULL 'ccp_get_ccs(ccp)'
#  971|   	DBG(ccp, "");
#  972|   
#  973|-> 	if (!gatt_db_attribute_get_char_data(ccs->bearer_uri_schemes_list, NULL,
#  974|   					     &value_handle,
#  975|   					     NULL, NULL, NULL))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def518]
bluez-5.85/src/shared/ccp.c:1129:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/ccp.c:1123:13: enter_function: entry to 'foreach_ccs_service'
bluez-5.85/src/shared/ccp.c:1127:30: call_function: calling 'ccp_get_ccs' from 'foreach_ccs_service'
bluez-5.85/src/shared/ccp.c:1127:30: return_function: returning to 'foreach_ccs_service' from 'ccp_get_ccs'
bluez-5.85/src/shared/ccp.c:1129:9: danger: dereference of NULL 'ccp_get_ccs(user_data)'
# 1127|   	struct bt_ccs *ccs = ccp_get_ccs(ccp);
# 1128|   
# 1129|-> 	ccs->service = attr;
# 1130|   
# 1131|   	gatt_db_service_foreach_char(attr, foreach_ccs_char, ccp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def519]
bluez-5.85/src/shared/crypto.c:213:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*crypto.cmac_aes'
bluez-5.85/src/shared/crypto.c:589:13: enter_function: entry to 'aes_cmac_be'
bluez-5.85/src/shared/crypto.c:598:14: call_function: calling 'alg_new' from 'aes_cmac_be'
#  211|   	/* FIXME: This should use accept4() with SOCK_CLOEXEC */
#  212|   	return accept(fd, NULL, 0);
#  213|-> }
#  214|   
#  215|   static bool alg_encrypt(int fd, const void *inbuf, size_t inlen,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def520]
bluez-5.85/src/shared/crypto.c:213:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*crypto.ecb_aes'
bluez-5.85/src/shared/crypto.c:357:6: enter_function: entry to 'bt_crypto_e'
bluez-5.85/src/shared/crypto.c:367:9: call_function: inlined call to 'swap_buf' from 'bt_crypto_e'
bluez-5.85/src/shared/crypto.c:369:14: call_function: calling 'alg_new' from 'bt_crypto_e'
#  211|   	/* FIXME: This should use accept4() with SOCK_CLOEXEC */
#  212|   	return accept(fd, NULL, 0);
#  213|-> }
#  214|   
#  215|   static bool alg_encrypt(int fd, const void *inbuf, size_t inlen,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def521]
bluez-5.85/src/shared/crypto.c:259:39: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'alg_new(*crypto.ecb_aes, & tmp, 16)'
bluez-5.85/src/shared/crypto.c:357:6: enter_function: entry to 'bt_crypto_e'
bluez-5.85/src/shared/crypto.c:367:9: call_function: inlined call to 'swap_buf' from 'bt_crypto_e'
bluez-5.85/src/shared/crypto.c:369:14: call_function: calling 'alg_new' from 'bt_crypto_e'
bluez-5.85/src/shared/crypto.c:369:14: return_function: returning to 'bt_crypto_e' from 'alg_new'
bluez-5.85/src/shared/crypto.c:370:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/crypto.c:370:12: branch_false: ...to here
bluez-5.85/src/shared/crypto.c:375:9: call_function: inlined call to 'swap_buf' from 'bt_crypto_e'
bluez-5.85/src/shared/crypto.c:377:14: call_function: calling 'alg_encrypt' from 'bt_crypto_e'
#  257|   
#  258|   	for (i = 0; i < len; i++)
#  259|-> 		dst[len - 1 - i] = src[i];
#  260|   }
#  261|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def522]
bluez-5.85/src/shared/crypto.c:602:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'alg_new(*crypto.cmac_aes,  key, 16)'
bluez-5.85/src/shared/crypto.c:589:13: enter_function: entry to 'aes_cmac_be'
bluez-5.85/src/shared/crypto.c:598:14: call_function: calling 'alg_new' from 'aes_cmac_be'
bluez-5.85/src/shared/crypto.c:598:14: return_function: returning to 'aes_cmac_be' from 'alg_new'
bluez-5.85/src/shared/crypto.c:599:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/crypto.c:602:15: branch_false: ...to here
bluez-5.85/src/shared/crypto.c:602:15: throw: if 'send' throws an exception...
bluez-5.85/src/shared/crypto.c:602:15: danger: 'alg_new(*crypto.cmac_aes,  key, 16)' leaks here
#  600|   		return false;
#  601|   
#  602|-> 	len = send(fd, msg, msg_len, 0);
#  603|   	if (len < 0) {
#  604|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def523]
bluez-5.85/src/shared/crypto.c:738:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'alg_new(*crypto.cmac_aes, & key, 16)'
bluez-5.85/src/shared/crypto.c:724:6: enter_function: entry to 'bt_crypto_gatt_hash'
bluez-5.85/src/shared/crypto.c:731:12: branch_false: following 'false' branch (when 'crypto' is non-NULL)...
bluez-5.85/src/shared/crypto.c:734:14: branch_false: ...to here
bluez-5.85/src/shared/crypto.c:734:14: call_function: calling 'alg_new' from 'bt_crypto_gatt_hash'
bluez-5.85/src/shared/crypto.c:734:14: return_function: returning to 'bt_crypto_gatt_hash' from 'alg_new'
bluez-5.85/src/shared/crypto.c:735:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/crypto.c:738:15: branch_false: ...to here
bluez-5.85/src/shared/crypto.c:738:15: throw: if 'writev' throws an exception...
bluez-5.85/src/shared/crypto.c:738:15: danger: 'alg_new(*crypto.cmac_aes, & key, 16)' leaks here
#  736|   		return false;
#  737|   
#  738|-> 	len = writev(fd, iov, iov_len);
#  739|   	if (len < 0) {
#  740|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def524]
bluez-5.85/src/shared/csip.c:224:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/csip.c:220:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/csip.c:223:9: acquire_resource: 'va_start' called here
bluez-5.85/src/shared/csip.c:224:9: throw: if 'util_debug_va' throws an exception...
bluez-5.85/src/shared/csip.c:224:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  222|   
#  223|   	va_start(ap, format);
#  224|-> 	util_debug_va(csip->debug_func, csip->debug_data, format, ap);
#  225|   	va_end(ap);
#  226|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def525]
bluez-5.85/src/shared/ecc.c:78:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
bluez-5.85/src/shared/ecc.c:906:6: enter_function: entry to 'ecdh_shared_secret'
bluez-5.85/src/shared/ecc.c:914:14: call_function: calling 'get_random_number' from 'ecdh_shared_secret'
#   76|   		ret = read(fd, ptr, left);
#   77|   		if (ret <= 0) {
#   78|-> 			close(fd);
#   79|   			return false;
#   80|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def526]
bluez-5.85/src/shared/ecc.c:86:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
bluez-5.85/src/shared/ecc.c:906:6: enter_function: entry to 'ecdh_shared_secret'
bluez-5.85/src/shared/ecc.c:914:14: call_function: calling 'get_random_number' from 'ecdh_shared_secret'
#   84|   	}
#   85|   
#   86|-> 	close(fd);
#   87|   
#   88|   	return true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def527]
bluez-5.85/src/shared/gatt-client.c:191:9: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-client.c:3142:13: enter_function: entry to 'handle_next_prep_write'
bluez-5.85/src/shared/gatt-client.c:3149:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-client.c:3150:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3155:9: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3165:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/gatt-client.c:3166:17: branch_true: ...to here
bluez-5.85/src/shared/gatt-client.c:3166:17: call_function: calling 'request_unref' from 'handle_next_prep_write'
#  189|   		return;
#  190|   
#  191|-> 	queue_remove_all(client->idle_cbs, idle_notify, NULL, idle_destroy);
#  192|   
#  193|   	bt_gatt_client_unref(client);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def528]
bluez-5.85/src/shared/gatt-client.c:205:17: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-client.c:3142:13: enter_function: entry to 'handle_next_prep_write'
bluez-5.85/src/shared/gatt-client.c:3149:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-client.c:3150:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3155:9: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3165:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/gatt-client.c:3166:17: branch_true: ...to here
bluez-5.85/src/shared/gatt-client.c:3166:17: call_function: calling 'request_unref' from 'handle_next_prep_write'
#  203|   
#  204|   	if (req->destroy)
#  205|-> 		req->destroy(req->data);
#  206|   
#  207|   	if (!req->removed) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def529]
bluez-5.85/src/shared/gatt-client.c:208:17: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-client.c:3142:13: enter_function: entry to 'handle_next_prep_write'
bluez-5.85/src/shared/gatt-client.c:3149:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-client.c:3150:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3155:9: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3165:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/gatt-client.c:3166:17: branch_true: ...to here
bluez-5.85/src/shared/gatt-client.c:3166:17: call_function: calling 'request_unref' from 'handle_next_prep_write'
#  206|   
#  207|   	if (!req->removed) {
#  208|-> 		queue_remove(client->pending_requests, req);
#  209|   		if (queue_isempty(client->pending_requests))
#  210|   			notify_client_idle(client);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def530]
bluez-5.85/src/shared/gatt-client.c:209:21: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-client.c:3142:13: enter_function: entry to 'handle_next_prep_write'
bluez-5.85/src/shared/gatt-client.c:3149:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-client.c:3150:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3155:9: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3165:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/gatt-client.c:3166:17: branch_true: ...to here
bluez-5.85/src/shared/gatt-client.c:3166:17: call_function: calling 'request_unref' from 'handle_next_prep_write'
#  207|   	if (!req->removed) {
#  208|   		queue_remove(client->pending_requests, req);
#  209|-> 		if (queue_isempty(client->pending_requests))
#  210|   			notify_client_idle(client);
#  211|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def531]
bluez-5.85/src/shared/gatt-client.c:418:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/gatt-client.c:1968:13: enter_function: entry to 'service_changed_cb'
bluez-5.85/src/shared/gatt-client.c:1981:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/gatt-client.c:1982:17: branch_true: ...to here
bluez-5.85/src/shared/gatt-client.c:1982:17: call_function: calling 'gatt_log' from 'service_changed_cb'
#  416|   
#  417|   	if (client->debug_callback)
#  418|-> 		util_debug_va(client->debug_callback, client->debug_data,
#  419|   							format, va);
#  420|   	else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def532]
bluez-5.85/src/shared/gatt-client.c:2659:9: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-client.c:3142:13: enter_function: entry to 'handle_next_prep_write'
bluez-5.85/src/shared/gatt-client.c:3149:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-client.c:3150:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3155:9: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3165:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/gatt-client.c:3166:17: branch_true: ...to here
bluez-5.85/src/shared/gatt-client.c:3166:17: call_function: calling 'request_unref' from 'handle_next_prep_write'
# 2657|   		return false;
# 2658|   
# 2659|-> 	queue_remove_all(client->pending_requests, NULL, NULL, cancel_pending);
# 2660|   
# 2661|   	if (client->discovery_req) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def533]
bluez-5.85/src/shared/gatt-client.c:2662:17: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-client.c:3142:13: enter_function: entry to 'handle_next_prep_write'
bluez-5.85/src/shared/gatt-client.c:3149:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-client.c:3150:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3155:9: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3165:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/gatt-client.c:3166:17: branch_true: ...to here
bluez-5.85/src/shared/gatt-client.c:3166:17: call_function: calling 'request_unref' from 'handle_next_prep_write'
# 2660|   
# 2661|   	if (client->discovery_req) {
# 2662|-> 		bt_gatt_request_cancel(client->discovery_req);
# 2663|   		bt_gatt_request_unref(client->discovery_req);
# 2664|   		client->discovery_req = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def534]
bluez-5.85/src/shared/gatt-client.c:2663:17: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-client.c:3142:13: enter_function: entry to 'handle_next_prep_write'
bluez-5.85/src/shared/gatt-client.c:3149:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-client.c:3150:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3155:9: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3165:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/gatt-client.c:3166:17: branch_true: ...to here
bluez-5.85/src/shared/gatt-client.c:3166:17: call_function: calling 'request_unref' from 'handle_next_prep_write'
# 2661|   	if (client->discovery_req) {
# 2662|   		bt_gatt_request_cancel(client->discovery_req);
# 2663|-> 		bt_gatt_request_unref(client->discovery_req);
# 2664|   		client->discovery_req = NULL;
# 2665|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def535]
bluez-5.85/src/shared/gatt-client.c:2668:17: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-client.c:3142:13: enter_function: entry to 'handle_next_prep_write'
bluez-5.85/src/shared/gatt-client.c:3149:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-client.c:3150:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3155:9: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3165:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/gatt-client.c:3166:17: branch_true: ...to here
bluez-5.85/src/shared/gatt-client.c:3166:17: call_function: calling 'request_unref' from 'handle_next_prep_write'
# 2666|   
# 2667|   	if (client->mtu_req_id)
# 2668|-> 		bt_att_cancel(client->att, client->mtu_req_id);
# 2669|   
# 2670|   	return true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def536]
bluez-5.85/src/shared/gatt-client.c:2854:1: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
bluez-5.85/src/shared/gatt-client.c:2856:13: enter_function: entry to 'read_long_cb'
bluez-5.85/src/shared/gatt-client.c:2864:12: branch_false: following 'false' branch (when 'opcode != 1')...
bluez-5.85/src/shared/gatt-client.c:2870:15: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:2871:28: branch_false: following 'false' branch (when 'opcode == 13')...
bluez-5.85/src/shared/gatt-client.c:2872:29: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:2870:13: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-client.c:2877:12: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:2877:12: branch_false: following 'false' branch (when 'length != 0')...
bluez-5.85/src/shared/gatt-client.c:2880:14: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:2880:14: call_function: calling 'append_chunk' from 'read_long_cb'
# 2852|   
# 2853|   	return true;
# 2854|-> }
# 2855|   
# 2856|   static void read_long_cb(uint8_t opcode, const void *pdu,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def537]
bluez-5.85/src/shared/gatt-client.c:3159:15: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-client.c:3149:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-client.c:3150:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3155:9: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3159:15: throw: if 'bt_att_resend' throws an exception...
bluez-5.85/src/shared/gatt-client.c:3159:15: danger: 'pdu' leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 3157|   	memcpy(pdu + 4, op->value + op->index, op->cur_length);
# 3158|   
# 3159|-> 	err = bt_att_resend(op->client->att, req->att_id,
# 3160|   						BT_ATT_OP_PREP_WRITE_REQ,
# 3161|   						pdu, op->cur_length + 4,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def538]
bluez-5.85/src/shared/gatt-client.c:3401:23: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-client.c:3331:14: enter_function: entry to 'bt_gatt_client_write_long_value'
bluez-5.85/src/shared/gatt-client.c:3343:12: branch_false: following 'false' branch (when 'client' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3346:21: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3346:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-client.c:3352:13: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3352:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-client.c:3355:14: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3357:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-client.c:3362:15: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3362:15: call_function: calling 'request_create' from 'bt_gatt_client_write_long_value'
bluez-5.85/src/shared/gatt-client.c:3362:15: return_function: returning to 'bt_gatt_client_write_long_value' from 'request_create'
bluez-5.85/src/shared/gatt-client.c:3363:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-client.c:3369:16: branch_false: ...to here
bluez-5.85/src/shared/gatt-client.c:3385:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-client.c:3390:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-client.c:3391:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-client.c:3397:9: call_function: inlined call to 'put_le16' from 'bt_gatt_client_write_long_value'
bluez-5.85/src/shared/gatt-client.c:3401:23: throw: if 'bt_att_send' throws an exception...
bluez-5.85/src/shared/gatt-client.c:3401:23: danger: 'pdu' leaks here; was allocated at [(19)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/18)
# 3399|   	memcpy(pdu + 4, op->value, op->cur_length);
# 3400|   
# 3401|-> 	req->att_id = bt_att_send(client->att, BT_ATT_OP_PREP_WRITE_REQ,
# 3402|   							pdu, op->cur_length + 4,
# 3403|   							prepare_write_cb, req,

Error: CPPCHECK_WARNING (CWE-682): [#def539]
bluez-5.85/src/shared/gatt-db.c:397: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  395|   		data = malloc(2 + 2 + attr->value_len);
#  396|   		put_le16(attr->handle, data);
#  397|-> 		bt_uuid_to_le(&attr->uuid, data + 2);
#  398|   		memcpy(data + 4, attr->value, attr->value_len);
#  399|   		break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def540]
bluez-5.85/src/shared/gatt-db.c:397:17: warning[-Wanalyzer-malloc-leak]: leak of 'data'
bluez-5.85/src/shared/gatt-db.c:376:13: enter_function: entry to 'gen_hash_m'
bluez-5.85/src/shared/gatt-db.c:395:24: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-db.c:396:17: call_function: inlined call to 'put_le16' from 'gen_hash_m'
bluez-5.85/src/shared/gatt-db.c:397:17: throw: if 'bt_uuid_to_le' throws an exception...
bluez-5.85/src/shared/gatt-db.c:397:17: danger: 'data' leaks here; was allocated at [(4)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/3)
#  395|   		data = malloc(2 + 2 + attr->value_len);
#  396|   		put_le16(attr->handle, data);
#  397|-> 		bt_uuid_to_le(&attr->uuid, data + 2);
#  398|   		memcpy(data + 4, attr->value, attr->value_len);
#  399|   		break;

Error: CPPCHECK_WARNING (CWE-682): [#def541]
bluez-5.85/src/shared/gatt-db.c:398: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  396|   		put_le16(attr->handle, data);
#  397|   		bt_uuid_to_le(&attr->uuid, data + 2);
#  398|-> 		memcpy(data + 4, attr->value, attr->value_len);
#  399|   		break;
#  400|   	case GATT_CHARAC_USER_DESC_UUID:

Error: CPPCHECK_WARNING (CWE-682): [#def542]
bluez-5.85/src/shared/gatt-db.c:409: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  407|   		data = malloc(2 + 2 + attr->value_len);
#  408|   		put_le16(attr->handle, data);
#  409|-> 		bt_uuid_to_le(&attr->uuid, data + 2);
#  410|   		break;
#  411|   	default:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def543]
bluez-5.85/src/shared/gatt-db.c:409:17: warning[-Wanalyzer-malloc-leak]: leak of 'data'
bluez-5.85/src/shared/gatt-db.c:376:13: enter_function: entry to 'gen_hash_m'
bluez-5.85/src/shared/gatt-db.c:407:24: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-db.c:408:17: call_function: inlined call to 'put_le16' from 'gen_hash_m'
bluez-5.85/src/shared/gatt-db.c:409:17: throw: if 'bt_uuid_to_le' throws an exception...
bluez-5.85/src/shared/gatt-db.c:409:17: danger: 'data' leaks here; was allocated at [(4)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/3)
#  407|   		data = malloc(2 + 2 + attr->value_len);
#  408|   		put_le16(attr->handle, data);
#  409|-> 		bt_uuid_to_le(&attr->uuid, data + 2);
#  410|   		break;
#  411|   	default:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def544]
bluez-5.85/src/shared/gatt-db.c:1927:32: warning[-Wanalyzer-null-dereference]: dereference of NULL 'value'
bluez-5.85/src/shared/gatt-db.c:1930:13: enter_function: entry to 'read_ext_prop'
bluez-5.85/src/shared/gatt-db.c:1945:9: call_function: calling 'gatt_db_attribute_read' from 'read_ext_prop'
# 1925|   		return;
# 1926|   
# 1927|-> 	*ext_prop = (uint16_t) value[0];
# 1928|   }
# 1929|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def545]
bluez-5.85/src/shared/gatt-server.c:266:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/gatt-server.c:262:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-server.c:265:9: acquire_resource: 'va_start' called here
bluez-5.85/src/shared/gatt-server.c:266:9: throw: if 'util_debug_va' throws an exception...
bluez-5.85/src/shared/gatt-server.c:266:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  264|   
#  265|   	va_start(ap, format);
#  266|-> 	util_debug_va(server->debug_callback, server->debug_data, format, ap);
#  267|   	va_end(ap);
#  268|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def546]
bluez-5.85/src/shared/gatt-server.c:1347:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'malloc((long unsigned int)length)' where non-null expected
bluez-5.85/src/shared/gatt-server.c:1304:13: enter_function: entry to 'prep_write_cb'
bluez-5.85/src/shared/gatt-server.c:1315:12: branch_false: following 'false' branch (when 'length > 3')...
bluez-5.85/src/shared/gatt-server.c:1320:13: branch_false: ...to here
bluez-5.85/src/shared/gatt-server.c:1320:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-server.c:1325:18: call_function: inlined call to 'get_le16' from 'prep_write_cb'
bluez-5.85/src/shared/gatt-server.c:1329:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-server.c:1334:9: branch_false: ...to here
bluez-5.85/src/shared/gatt-server.c:1334:9: call_function: calling 'gatt_log' from 'prep_write_cb'
bluez-5.85/src/shared/gatt-server.c:1334:9: return_function: returning to 'prep_write_cb' from 'gatt_log'
bluez-5.85/src/shared/gatt-server.c:1336:17: call_function: inlined call to 'check_length' from 'prep_write_cb'
bluez-5.85/src/shared/gatt-server.c:1340:17: branch_false: ...to here
bluez-5.85/src/shared/gatt-server.c:1341:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-server.c:1344:16: branch_false: ...to here
bluez-5.85/src/shared/gatt-server.c:1346:21: acquire_memory: this call could return NULL
bluez-5.85/src/shared/gatt-server.c:1347:9: danger: argument 1 ('malloc((long unsigned int)length)') from [(23)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/22) could be NULL where non-null expected
# 1345|   	pwcd->chan = chan;
# 1346|   	pwcd->pdu = malloc(length);
# 1347|-> 	memcpy(pwcd->pdu, pdu, length);
# 1348|   	pwcd->length = length;
# 1349|   	pwcd->server = server;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def547]
bluez-5.85/src/shared/gatt-server.c:1841:17: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-server.c:1855:6: enter_function: entry to 'bt_gatt_server_send_indication'
bluez-5.85/src/shared/gatt-server.c:1867:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-server.c:1871:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-server.c:1872:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-server.c:1875:16: branch_false: ...to here
bluez-5.85/src/shared/gatt-server.c:1887:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/gatt-server.c:1888:17: branch_true: ...to here
bluez-5.85/src/shared/gatt-server.c:1888:17: call_function: calling 'destroy_ind_data' from 'bt_gatt_server_send_indication'
# 1839|   
# 1840|   	if (data->destroy)
# 1841|-> 		data->destroy(data->user_data);
# 1842|   
# 1843|   	free(data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def548]
bluez-5.85/src/shared/gatt-server.c:1875:16: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-server.c:1867:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-server.c:1871:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-server.c:1872:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-server.c:1875:16: branch_false: ...to here
bluez-5.85/src/shared/gatt-server.c:1875:16: throw: if 'util_malloc' throws an exception...
bluez-5.85/src/shared/gatt-server.c:1875:16: danger: 'pdu' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1873|   		return false;
# 1874|   
# 1875|-> 	data = new0(struct ind_data, 1);
# 1876|   
# 1877|   	data->callback = callback;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def549]
bluez-5.85/src/shared/gatt-server.c:1884:20: warning[-Wanalyzer-malloc-leak]: leak of 'pdu'
bluez-5.85/src/shared/gatt-server.c:1867:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/gatt-server.c:1871:15: acquire_memory: allocated here
bluez-5.85/src/shared/gatt-server.c:1872:12: branch_false: following 'false' branch (when 'pdu' is non-NULL)...
bluez-5.85/src/shared/gatt-server.c:1875:16: branch_false: ...to here
bluez-5.85/src/shared/gatt-server.c:1884:20: throw: if 'bt_att_send' throws an exception...
bluez-5.85/src/shared/gatt-server.c:1884:20: danger: 'pdu' leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1882|   	memcpy(pdu + 2, value, pdu_len - 2);
# 1883|   
# 1884|-> 	result = !!bt_att_send(server->att, BT_ATT_OP_HANDLE_IND, pdu,
# 1885|   							pdu_len, conf_cb,
# 1886|   							data, destroy_ind_data);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def550]
bluez-5.85/src/shared/hci.c:332:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'create_socket(index, 1)'
bluez-5.85/src/shared/hci.c:397:16: enter_function: entry to 'bt_hci_new_user_channel'
bluez-5.85/src/shared/hci.c:402:14: call_function: calling 'create_socket' from 'bt_hci_new_user_channel'
bluez-5.85/src/shared/hci.c:402:14: return_function: returning to 'bt_hci_new_user_channel' from 'create_socket'
bluez-5.85/src/shared/hci.c:403:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/hci.c:409:15: branch_false: ...to here
bluez-5.85/src/shared/hci.c:409:15: call_function: calling 'create_hci' from 'bt_hci_new_user_channel'
#  330|   		return NULL;
#  331|   
#  332|-> 	hci = new0(struct bt_hci, 1);
#  333|   	hci->io = io_new(fd);
#  334|   	if (!hci->io) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def551]
bluez-5.85/src/shared/hci.c:333:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'create_socket(index, 1)'
bluez-5.85/src/shared/hci.c:397:16: enter_function: entry to 'bt_hci_new_user_channel'
bluez-5.85/src/shared/hci.c:402:14: call_function: calling 'create_socket' from 'bt_hci_new_user_channel'
bluez-5.85/src/shared/hci.c:402:14: return_function: returning to 'bt_hci_new_user_channel' from 'create_socket'
bluez-5.85/src/shared/hci.c:403:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/hci.c:409:15: branch_false: ...to here
bluez-5.85/src/shared/hci.c:409:15: call_function: calling 'create_hci' from 'bt_hci_new_user_channel'
#  331|   
#  332|   	hci = new0(struct bt_hci, 1);
#  333|-> 	hci->io = io_new(fd);
#  334|   	if (!hci->io) {
#  335|   		free(hci);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def552]
bluez-5.85/src/shared/hci.c:390:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
bluez-5.85/src/shared/hci.c:379:14: acquire_resource: socket created here
bluez-5.85/src/shared/hci.c:381:12: branch_false: following 'false' branch (when 'fd >= 0')...
bluez-5.85/src/shared/hci.c:385:9: branch_false: ...to here
bluez-5.85/src/shared/hci.c:389:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hci.c:390:17: branch_true: ...to here
bluez-5.85/src/shared/hci.c:390:17: throw: if 'close' throws an exception...
bluez-5.85/src/shared/hci.c:390:17: danger: 'fd' leaks here
#  388|   
#  389|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  390|-> 		close(fd);
#  391|   		return -1;
#  392|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def553]
bluez-5.85/src/shared/hfp.c:164:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/hfp.c:2797:13: enter_function: entry to 'slc_brsf_resp'
bluez-5.85/src/shared/hfp.c:2802:9: call_function: calling 'hfp_debug' from 'slc_brsf_resp'
#  162|   
#  163|   	va_start(ap, format);
#  164|-> 	util_debug_va(debug_func, debug_data, format, ap);
#  165|   	va_end(ap);
#  166|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def554]
bluez-5.85/src/shared/hfp.c:218:14: warning[-Wanalyzer-malloc-leak]: leak of 'str'
bluez-5.85/src/shared/hfp.c:775:6: enter_function: entry to 'hfp_gw_send_result'
bluez-5.85/src/shared/hfp.c:811:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hfp.c:812:17: branch_true: ...to here
bluez-5.85/src/shared/hfp.c:813:17: call_function: calling 'process_input' from 'hfp_gw_send_result'
#  216|   		return;
#  217|   
#  218|-> 	if (!ringbuf_len(hfp->write_buf))
#  219|   		return;
#  220|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def555]
bluez-5.85/src/shared/hfp.c:221:14: warning[-Wanalyzer-malloc-leak]: leak of 'str'
bluez-5.85/src/shared/hfp.c:775:6: enter_function: entry to 'hfp_gw_send_result'
bluez-5.85/src/shared/hfp.c:811:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hfp.c:812:17: branch_true: ...to here
bluez-5.85/src/shared/hfp.c:813:17: call_function: calling 'process_input' from 'hfp_gw_send_result'
#  219|   		return;
#  220|   
#  221|-> 	if (!io_set_write_handler(hfp->io, can_write_data,
#  222|   					hfp, write_watch_destroy))
#  223|   		return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def556]
bluez-5.85/src/shared/hfp.c:239:17: warning[-Wanalyzer-malloc-leak]: leak of 'str'
bluez-5.85/src/shared/hfp.c:775:6: enter_function: entry to 'hfp_gw_send_result'
bluez-5.85/src/shared/hfp.c:811:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hfp.c:812:17: branch_true: ...to here
bluez-5.85/src/shared/hfp.c:813:17: call_function: calling 'process_input' from 'hfp_gw_send_result'
#  237|   	if (hfp->command_callback) {
#  238|   		hfp->result_pending = true;
#  239|-> 		hfp->command_callback(data, hfp->command_data);
#  240|   	} else {
#  241|   		hfp_gw_send_result(hfp, HFP_RESULT_ERROR);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def557]
bluez-5.85/src/shared/hfp.c:311:19: warning[-Wanalyzer-malloc-leak]: leak of 'str'
bluez-5.85/src/shared/hfp.c:775:6: enter_function: entry to 'hfp_gw_send_result'
bluez-5.85/src/shared/hfp.c:811:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hfp.c:812:17: branch_true: ...to here
bluez-5.85/src/shared/hfp.c:813:17: call_function: calling 'process_input' from 'hfp_gw_send_result'
#  309|   done:
#  310|   
#  311|-> 	handler = queue_find(hfp->cmd_handlers, match_handler_prefix,
#  312|   								lookup_prefix);
#  313|   	if (!handler) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def558]
bluez-5.85/src/shared/hfp.c:319:9: warning[-Wanalyzer-malloc-leak]: leak of 'str'
bluez-5.85/src/shared/hfp.c:775:6: enter_function: entry to 'hfp_gw_send_result'
bluez-5.85/src/shared/hfp.c:811:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hfp.c:812:17: branch_true: ...to here
bluez-5.85/src/shared/hfp.c:813:17: call_function: calling 'process_input' from 'hfp_gw_send_result'
#  317|   
#  318|   	hfp->result_pending = true;
#  319|-> 	handler->callback(&context, type, handler->user_data);
#  320|   
#  321|   	return true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def559]
bluez-5.85/src/shared/hfp.c:541:23: warning[-Wanalyzer-malloc-leak]: leak of 'str'
bluez-5.85/src/shared/hfp.c:775:6: enter_function: entry to 'hfp_gw_send_result'
bluez-5.85/src/shared/hfp.c:811:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hfp.c:812:17: branch_true: ...to here
bluez-5.85/src/shared/hfp.c:813:17: call_function: calling 'process_input' from 'hfp_gw_send_result'
#  539|   
#  540|   	do {
#  541|-> 		str = ringbuf_peek(hfp->read_buf, 0, &len);
#  542|   		if (!str)
#  543|   			return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def560]
bluez-5.85/src/shared/hfp.c:554:36: warning[-Wanalyzer-malloc-leak]: leak of 'str'
bluez-5.85/src/shared/hfp.c:775:6: enter_function: entry to 'hfp_gw_send_result'
bluez-5.85/src/shared/hfp.c:811:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hfp.c:812:17: branch_true: ...to here
bluez-5.85/src/shared/hfp.c:813:17: call_function: calling 'process_input' from 'hfp_gw_send_result'
#  552|   			 * it's just an incomplete command.
#  553|   			 */
#  554|-> 			if (len == ringbuf_len(hfp->read_buf))
#  555|   				return;
#  556|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def561]
bluez-5.85/src/shared/hfp.c:557:32: warning[-Wanalyzer-malloc-leak]: leak of 'str'
bluez-5.85/src/shared/hfp.c:775:6: enter_function: entry to 'hfp_gw_send_result'
bluez-5.85/src/shared/hfp.c:811:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hfp.c:812:17: branch_true: ...to here
bluez-5.85/src/shared/hfp.c:813:17: call_function: calling 'process_input' from 'hfp_gw_send_result'
#  555|   				return;
#  556|   
#  557|-> 			str2 = ringbuf_peek(hfp->read_buf, len, &len2);
#  558|   			if (!str2)
#  559|   				return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def562]
bluez-5.85/src/shared/hfp.c:802:13: warning[-Wanalyzer-malloc-leak]: leak of 'str'
bluez-5.85/src/shared/hfp.c:775:6: enter_function: entry to 'hfp_gw_send_result'
bluez-5.85/src/shared/hfp.c:811:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hfp.c:812:17: branch_true: ...to here
bluez-5.85/src/shared/hfp.c:813:17: call_function: calling 'process_input' from 'hfp_gw_send_result'
#  800|   	}
#  801|   
#  802|-> 	if (ringbuf_printf(hfp->write_buf, "\r\n%s\r\n", str) < 0)
#  803|   		return false;
#  804|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def563]
bluez-5.85/src/shared/hfp.c:1495:15: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/hfp.c:1749:13: enter_function: entry to 'send_clcc'
bluez-5.85/src/shared/hfp.c:1751:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/hfp.c:1751:30: branch_true: ...to here
bluez-5.85/src/shared/hfp.c:1751:13: branch_false: following 'false' branch...
bluez-5.85/src/shared/hfp.c:1754:14: branch_false: ...to here
bluez-5.85/src/shared/hfp.c:1754:14: call_function: calling 'hfp_hf_send_command' from 'send_clcc'
# 1493|   
# 1494|   	va_start(ap, format);
# 1495|-> 	len = ringbuf_vprintf(hfp->write_buf, fmt, ap);
# 1496|   	va_end(ap);
# 1497|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def564]
bluez-5.85/src/shared/mainloop.c:287:25: warning[-Wanalyzer-malloc-leak]: leak of 'data'
bluez-5.85/src/shared/mainloop.c:267:12: branch_false: following 'false' branch (when 'callback' is non-NULL)...
bluez-5.85/src/shared/mainloop.c:270:16: branch_false: ...to here
bluez-5.85/src/shared/mainloop.c:270:16: acquire_memory: allocated here
bluez-5.85/src/shared/mainloop.c:271:12: branch_false: following 'false' branch (when 'data' is non-NULL)...
bluez-5.85/src/shared/mainloop.c:274:9: branch_false: ...to here
bluez-5.85/src/shared/mainloop.c:280:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/mainloop.c:285:12: branch_false: ...to here
bluez-5.85/src/shared/mainloop.c:285:12: branch_true: following 'true' branch (when 'msec != 0')...
bluez-5.85/src/shared/mainloop.c:286:21: branch_true: ...to here
bluez-5.85/src/shared/mainloop.c:286:20: branch_true: following 'true' branch...
bluez-5.85/src/shared/mainloop.c:287:25: branch_true: ...to here
bluez-5.85/src/shared/mainloop.c:287:25: throw: if 'close' throws an exception...
bluez-5.85/src/shared/mainloop.c:287:25: danger: 'data' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  285|   	if (msec > 0) {
#  286|   		if (timeout_set(data->fd, msec) < 0) {
#  287|-> 			close(data->fd);
#  288|   			free(data);
#  289|   			return -EIO;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def565]
bluez-5.85/src/shared/mainloop.c:295:17: warning[-Wanalyzer-malloc-leak]: leak of 'data'
bluez-5.85/src/shared/mainloop.c:267:12: branch_false: following 'false' branch (when 'callback' is non-NULL)...
bluez-5.85/src/shared/mainloop.c:270:16: branch_false: ...to here
bluez-5.85/src/shared/mainloop.c:270:16: acquire_memory: allocated here
bluez-5.85/src/shared/mainloop.c:271:12: branch_false: following 'false' branch (when 'data' is non-NULL)...
bluez-5.85/src/shared/mainloop.c:274:9: branch_false: ...to here
bluez-5.85/src/shared/mainloop.c:280:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/mainloop.c:285:12: branch_false: ...to here
bluez-5.85/src/shared/mainloop.c:293:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/mainloop.c:295:17: branch_true: ...to here
bluez-5.85/src/shared/mainloop.c:295:17: throw: if 'close' throws an exception...
bluez-5.85/src/shared/mainloop.c:295:17: danger: 'data' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  293|   	if (mainloop_add_fd(data->fd, EPOLLIN | EPOLLONESHOT,
#  294|   				timeout_callback, data, timeout_destroy) < 0) {
#  295|-> 		close(data->fd);
#  296|   		free(data);
#  297|   		return -EIO;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def566]
bluez-5.85/src/shared/mcp.c:114:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/mcp.c:1035:13: enter_function: entry to 'mcp_media_cp_notify'
bluez-5.85/src/shared/mcp.c:1040:9: call_function: calling 'mcp_debug' from 'mcp_media_cp_notify'
#  112|   
#  113|   	va_start(ap, format);
#  114|-> 	util_debug_va(mcp->debug_func, mcp->debug_data, format, ap);
#  115|   	va_end(ap);
#  116|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def567]
bluez-5.85/src/shared/mcp.c:589:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:578:21: enter_function: entry to 'mcp_send'
bluez-5.85/src/shared/mcp.c:580:30: call_function: calling 'mcp_get_mcs' from 'mcp_send'
bluez-5.85/src/shared/mcp.c:580:30: return_function: returning to 'mcp_send' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:584:9: call_function: calling 'mcp_debug' from 'mcp_send'
bluez-5.85/src/shared/mcp.c:584:9: return_function: returning to 'mcp_send' from 'mcp_debug'
bluez-5.85/src/shared/mcp.c:586:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/mcp.c:589:46: branch_false: ...to here
bluez-5.85/src/shared/mcp.c:589:46: danger: dereference of NULL 'mcp_get_mcs(mcp)'
#  587|   		return -1;
#  588|   
#  589|-> 	if (!gatt_db_attribute_get_char_data(mcs->media_cp, NULL, &handle,
#  590|   					NULL, NULL, NULL))
#  591|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def568]
bluez-5.85/src/shared/mcp.c:1068:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:1063:13: enter_function: entry to 'bt_mcp_mp_name_attach'
bluez-5.85/src/shared/mcp.c:1066:30: call_function: calling 'mcp_get_mcs' from 'bt_mcp_mp_name_attach'
bluez-5.85/src/shared/mcp.c:1066:30: return_function: returning to 'bt_mcp_mp_name_attach' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:1068:46: danger: dereference of NULL 'mcp_get_mcs(mcp)'
# 1066|   	struct bt_mcs *mcs = mcp_get_mcs(mcp);
# 1067|   
# 1068|-> 	if (!gatt_db_attribute_get_char_data(mcs->mp_name, NULL, &value_handle,
# 1069|   						NULL, NULL, NULL))
# 1070|   		return;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def569]
bluez-5.85/src/shared/mcp.c:1086:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:1081:13: enter_function: entry to 'bt_mcp_track_changed_attach'
bluez-5.85/src/shared/mcp.c:1084:30: call_function: calling 'mcp_get_mcs' from 'bt_mcp_track_changed_attach'
bluez-5.85/src/shared/mcp.c:1084:30: return_function: returning to 'bt_mcp_track_changed_attach' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:1086:46: danger: dereference of NULL 'mcp_get_mcs(mcp)'
# 1084|   	struct bt_mcs *mcs = mcp_get_mcs(mcp);
# 1085|   
# 1086|-> 	if (!gatt_db_attribute_get_char_data(mcs->track_changed, NULL,
# 1087|   				&value_handle, NULL, NULL, NULL))
# 1088|   		return;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def570]
bluez-5.85/src/shared/mcp.c:1102:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:1097:13: enter_function: entry to 'bt_mcp_track_title_attach'
bluez-5.85/src/shared/mcp.c:1100:30: call_function: calling 'mcp_get_mcs' from 'bt_mcp_track_title_attach'
bluez-5.85/src/shared/mcp.c:1100:30: return_function: returning to 'bt_mcp_track_title_attach' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:1102:46: danger: dereference of NULL 'mcp_get_mcs(mcp)'
# 1100|   	struct bt_mcs *mcs = mcp_get_mcs(mcp);
# 1101|   
# 1102|-> 	if (!gatt_db_attribute_get_char_data(mcs->track_title, NULL,
# 1103|   				&value_handle, NULL, NULL, NULL))
# 1104|   		return;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def571]
bluez-5.85/src/shared/mcp.c:1120:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:1115:13: enter_function: entry to 'bt_mcp_track_duration_attach'
bluez-5.85/src/shared/mcp.c:1118:30: call_function: calling 'mcp_get_mcs' from 'bt_mcp_track_duration_attach'
bluez-5.85/src/shared/mcp.c:1118:30: return_function: returning to 'bt_mcp_track_duration_attach' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:1120:46: danger: dereference of NULL 'mcp_get_mcs(mcp)'
# 1118|   	struct bt_mcs *mcs = mcp_get_mcs(mcp);
# 1119|   
# 1120|-> 	if (!gatt_db_attribute_get_char_data(mcs->track_duration, NULL,
# 1121|   				&value_handle, NULL, NULL, NULL))
# 1122|   		return;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def572]
bluez-5.85/src/shared/mcp.c:1138:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:1133:13: enter_function: entry to 'bt_mcp_track_position_attach'
bluez-5.85/src/shared/mcp.c:1136:30: call_function: calling 'mcp_get_mcs' from 'bt_mcp_track_position_attach'
bluez-5.85/src/shared/mcp.c:1136:30: return_function: returning to 'bt_mcp_track_position_attach' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:1138:46: danger: dereference of NULL 'mcp_get_mcs(mcp)'
# 1136|   	struct bt_mcs *mcs = mcp_get_mcs(mcp);
# 1137|   
# 1138|-> 	if (!gatt_db_attribute_get_char_data(mcs->track_position, NULL,
# 1139|   				&value_handle, NULL, NULL, NULL))
# 1140|   		return;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def573]
bluez-5.85/src/shared/mcp.c:1156:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:1151:13: enter_function: entry to 'bt_mcp_media_state_attach'
bluez-5.85/src/shared/mcp.c:1154:30: call_function: calling 'mcp_get_mcs' from 'bt_mcp_media_state_attach'
bluez-5.85/src/shared/mcp.c:1154:30: return_function: returning to 'bt_mcp_media_state_attach' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:1156:46: danger: dereference of NULL 'mcp_get_mcs(mcp)'
# 1154|   	struct bt_mcs *mcs = mcp_get_mcs(mcp);
# 1155|   
# 1156|-> 	if (!gatt_db_attribute_get_char_data(mcs->media_state, NULL,
# 1157|   				&value_handle, NULL, NULL, NULL))
# 1158|   		return;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def574]
bluez-5.85/src/shared/mcp.c:1174:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:1169:13: enter_function: entry to 'bt_mcp_media_cp_attach'
bluez-5.85/src/shared/mcp.c:1172:30: call_function: calling 'mcp_get_mcs' from 'bt_mcp_media_cp_attach'
bluez-5.85/src/shared/mcp.c:1172:30: return_function: returning to 'bt_mcp_media_cp_attach' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:1174:46: danger: dereference of NULL 'mcp_get_mcs(mcp)'
# 1172|   	struct bt_mcs *mcs = mcp_get_mcs(mcp);
# 1173|   
# 1174|-> 	if (!gatt_db_attribute_get_char_data(mcs->media_cp, NULL,
# 1175|   				&value_handle, NULL, NULL, NULL))
# 1176|   		return;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def575]
bluez-5.85/src/shared/mcp.c:1190:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:1185:13: enter_function: entry to 'bt_mcp_media_cp_op_supported_attach'
bluez-5.85/src/shared/mcp.c:1188:30: call_function: calling 'mcp_get_mcs' from 'bt_mcp_media_cp_op_supported_attach'
bluez-5.85/src/shared/mcp.c:1188:30: return_function: returning to 'bt_mcp_media_cp_op_supported_attach' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:1190:46: danger: dereference of NULL 'mcp_get_mcs(mcp)'
# 1188|   	struct bt_mcs *mcs = mcp_get_mcs(mcp);
# 1189|   
# 1190|-> 	if (!gatt_db_attribute_get_char_data(mcs->media_cp_op_supportd, NULL,
# 1191|   				&value_handle, NULL, NULL, NULL))
# 1192|   		return;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def576]
bluez-5.85/src/shared/mcp.c:1209:46: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:1204:13: enter_function: entry to 'bt_mcp_content_control_id_supported_attach'
bluez-5.85/src/shared/mcp.c:1207:30: call_function: calling 'mcp_get_mcs' from 'bt_mcp_content_control_id_supported_attach'
bluez-5.85/src/shared/mcp.c:1207:30: return_function: returning to 'bt_mcp_content_control_id_supported_attach' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:1209:46: danger: dereference of NULL 'mcp_get_mcs(mcp)'
# 1207|   	struct bt_mcs *mcs = mcp_get_mcs(mcp);
# 1208|   
# 1209|-> 	if (!gatt_db_attribute_get_char_data(mcs->content_control_id, NULL,
# 1210|   				&value_handle, NULL, NULL, NULL))
# 1211|   		return;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def577]
bluez-5.85/src/shared/mcp.c:1376:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/mcp.c:1368:13: enter_function: entry to 'foreach_mcs_service'
bluez-5.85/src/shared/mcp.c:1372:30: call_function: calling 'mcp_get_mcs' from 'foreach_mcs_service'
bluez-5.85/src/shared/mcp.c:1372:30: return_function: returning to 'foreach_mcs_service' from 'mcp_get_mcs'
bluez-5.85/src/shared/mcp.c:1374:9: call_function: calling 'mcp_debug' from 'foreach_mcs_service'
bluez-5.85/src/shared/mcp.c:1374:9: return_function: returning to 'foreach_mcs_service' from 'mcp_debug'
bluez-5.85/src/shared/mcp.c:1376:9: danger: dereference of NULL 'mcp_get_mcs(user_data)'
# 1374|   	DBG(mcp, "");
# 1375|   
# 1376|-> 	mcs->service = attr;
# 1377|   
# 1378|   	gatt_db_service_foreach_char(attr, foreach_mcs_char, mcp);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def578]
bluez-5.85/src/shared/mgmt.c:191:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/mgmt.c:187:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/mgmt.c:190:9: acquire_resource: 'va_start' called here
bluez-5.85/src/shared/mgmt.c:191:9: throw: if 'util_debug_va' throws an exception...
bluez-5.85/src/shared/mgmt.c:191:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  189|   
#  190|   	va_start(ap, format);
#  191|-> 	util_debug_va(mgmt->debug_callback, mgmt->debug_data, format, ap);
#  192|   	va_end(ap);
#  193|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def579]
bluez-5.85/src/shared/mgmt.c:452:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
bluez-5.85/src/shared/mgmt.c:493:14: enter_function: entry to 'mgmt_new_default'
bluez-5.85/src/shared/mgmt.c:502:14: acquire_resource: socket created here
bluez-5.85/src/shared/mgmt.c:504:12: branch_false: following 'false' branch (when 'fd >= 0')...
bluez-5.85/src/shared/mgmt.c:507:9: branch_false: ...to here
bluez-5.85/src/shared/mgmt.c:512:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/mgmt.c:517:16: branch_false: ...to here
bluez-5.85/src/shared/mgmt.c:517:16: call_function: calling 'mgmt_new' from 'mgmt_new_default'
#  450|   		return NULL;
#  451|   
#  452|-> 	mgmt = new0(struct mgmt, 1);
#  453|   	mgmt->fd = fd;
#  454|   	mgmt->close_on_unref = false;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def580]
bluez-5.85/src/shared/mgmt.c:463:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
bluez-5.85/src/shared/mgmt.c:493:14: enter_function: entry to 'mgmt_new_default'
bluez-5.85/src/shared/mgmt.c:502:14: acquire_resource: socket created here
bluez-5.85/src/shared/mgmt.c:504:12: branch_false: following 'false' branch (when 'fd >= 0')...
bluez-5.85/src/shared/mgmt.c:507:9: branch_false: ...to here
bluez-5.85/src/shared/mgmt.c:512:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/mgmt.c:517:16: branch_false: ...to here
bluez-5.85/src/shared/mgmt.c:517:16: call_function: calling 'mgmt_new' from 'mgmt_new_default'
#  461|   	}
#  462|   
#  463|-> 	mgmt->io = io_new(fd);
#  464|   	if (!mgmt->io) {
#  465|   		free(mgmt->buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def581]
bluez-5.85/src/shared/mgmt.c:513:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
bluez-5.85/src/shared/mgmt.c:502:14: acquire_resource: socket created here
bluez-5.85/src/shared/mgmt.c:504:12: branch_false: following 'false' branch (when 'fd >= 0')...
bluez-5.85/src/shared/mgmt.c:507:9: branch_false: ...to here
bluez-5.85/src/shared/mgmt.c:512:12: branch_true: following 'true' branch...
bluez-5.85/src/shared/mgmt.c:513:17: branch_true: ...to here
bluez-5.85/src/shared/mgmt.c:513:17: throw: if 'close' throws an exception...
bluez-5.85/src/shared/mgmt.c:513:17: danger: 'fd' leaks here
#  511|   
#  512|   	if (bind(fd, &addr.common, sizeof(addr.hci)) < 0) {
#  513|-> 		close(fd);
#  514|   		return NULL;
#  515|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def582]
bluez-5.85/src/shared/mgmt.c:666:34: warning[-Wanalyzer-malloc-leak]: leak of 'mgmt_tlv_new(type,  length,  value)'
bluez-5.85/src/shared/mgmt.c:689:6: enter_function: entry to 'mgmt_tlv_add'
bluez-5.85/src/shared/mgmt.c:692:34: call_function: calling 'mgmt_tlv_new' from 'mgmt_tlv_add'
bluez-5.85/src/shared/mgmt.c:692:34: return_function: returning to 'mgmt_tlv_add' from 'mgmt_tlv_new'
bluez-5.85/src/shared/mgmt.c:694:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/mgmt.c:697:14: branch_false: ...to here
bluez-5.85/src/shared/mgmt.c:697:14: throw: if 'queue_push_tail' throws an exception...
bluez-5.85/src/shared/mgmt.c:666:34: danger: 'mgmt_tlv_new(type,  length,  value)' leaks here; was allocated at [(4)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/3)
#  664|   								void *value)
#  665|   {
#  666|-> 	struct mgmt_tlv *entry = malloc(sizeof(*entry) + length);
#  667|   
#  668|   	if (!entry)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def583]
bluez-5.85/src/shared/mgmt.c:772:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf_ptr'
bluez-5.85/src/shared/mgmt.c:762:12: branch_false: following 'false' branch (when 'tlv_list' is non-NULL)...
bluez-5.85/src/shared/mgmt.c:765:22: branch_false: ...to here
bluez-5.85/src/shared/mgmt.c:765:15: acquire_memory: allocated here
bluez-5.85/src/shared/mgmt.c:767:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
bluez-5.85/src/shared/mgmt.c:770:9: branch_false: ...to here
bluez-5.85/src/shared/mgmt.c:772:9: throw: if 'queue_foreach' throws an exception...
bluez-5.85/src/shared/mgmt.c:772:9: danger: 'buf_ptr' leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  770|   	buf_ptr = buf;
#  771|   
#  772|-> 	queue_foreach(tlv_list->tlv_queue, mgmt_tlv_to_buf, &buf_ptr);
#  773|   
#  774|   	ret = mgmt_send(mgmt, opcode, index, tlv_list->size, (void *)buf,

Error: GCC_ANALYZER_WARNING (CWE-404): [#def584]
bluez-5.85/src/shared/micp.c:245:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/micp.c:241:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/micp.c:244:9: acquire_resource: 'va_start' called here
bluez-5.85/src/shared/micp.c:245:9: throw: if 'util_debug_va' throws an exception...
bluez-5.85/src/shared/micp.c:245:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  243|   
#  244|   	va_start(ap, format);
#  245|-> 	util_debug_va(micp->debug_func, micp->debug_data, format, ap);
#  246|   	va_end(ap);
#  247|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def585]
bluez-5.85/src/shared/micp.c:339:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/micp.c:323:16: enter_function: entry to 'mics_muted'
bluez-5.85/src/shared/micp.c:331:15: call_function: inlined call to 'micp_get_mdb' from 'mics_muted'
bluez-5.85/src/shared/micp.c:332:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/micp.c:337:22: call_function: inlined call to 'mdb_get_mute_state' from 'mics_muted'
bluez-5.85/src/shared/micp.c:339:9: branch_true: ...to here
bluez-5.85/src/shared/micp.c:339:9: danger: dereference of NULL '<unknown>'
#  337|   	mute_state = mdb_get_mute_state(mdb);
#  338|   
#  339|-> 	*mute_state = MICS_MUTED;
#  340|   
#  341|   	gatt_db_attribute_notify(mdb->mics->ms, (void *)mute_state,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def586]
bluez-5.85/src/shared/micp.c:786:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/micp.c:780:13: enter_function: entry to 'foreach_mics_service'
bluez-5.85/src/shared/micp.c:784:32: call_function: calling 'micp_get_mics' from 'foreach_mics_service'
bluez-5.85/src/shared/micp.c:784:32: return_function: returning to 'foreach_mics_service' from 'micp_get_mics'
bluez-5.85/src/shared/micp.c:786:9: danger: dereference of NULL 'micp_get_mics(user_data)'
#  784|   	struct bt_mics *mics = micp_get_mics(micp);
#  785|   
#  786|-> 	mics->service = attr;
#  787|   
#  788|   	gatt_db_service_set_claimed(attr, true);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def587]
bluez-5.85/src/shared/pcap.c:67:20: warning[-Wanalyzer-malloc-leak]: leak of 'pcap'
bluez-5.85/src/shared/pcap.c:63:16: acquire_memory: allocated here
bluez-5.85/src/shared/pcap.c:64:12: branch_false: following 'false' branch (when 'pcap' is non-NULL)...
bluez-5.85/src/shared/pcap.c:67:20: branch_false: ...to here
bluez-5.85/src/shared/pcap.c:67:20: throw: if 'open' throws an exception...
bluez-5.85/src/shared/pcap.c:67:20: danger: 'pcap' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   65|   		return NULL;
#   66|   
#   67|-> 	pcap->fd = open(path, O_RDONLY | O_CLOEXEC);
#   68|   	if (pcap->fd < 0) {
#   69|   		free(pcap);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def588]
bluez-5.85/src/shared/pcap.c:89:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
bluez-5.85/src/shared/pcap.c:64:12: branch_false: following 'false' branch (when 'pcap' is non-NULL)...
bluez-5.85/src/shared/pcap.c:67:20: branch_false: ...to here
bluez-5.85/src/shared/pcap.c:67:20: acquire_resource: opened here
bluez-5.85/src/shared/pcap.c:68:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/pcap.c:73:15: branch_false: ...to here
bluez-5.85/src/shared/pcap.c:89:9: throw: if 'close' throws an exception...
bluez-5.85/src/shared/pcap.c:89:9: danger: leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   87|   
#   88|   failed:
#   89|-> 	close(pcap->fd);
#   90|   	free(pcap);
#   91|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def589]
bluez-5.85/src/shared/pcap.c:89:9: warning[-Wanalyzer-malloc-leak]: leak of 'pcap'
bluez-5.85/src/shared/pcap.c:63:16: acquire_memory: allocated here
bluez-5.85/src/shared/pcap.c:64:12: branch_false: following 'false' branch (when 'pcap' is non-NULL)...
bluez-5.85/src/shared/pcap.c:67:20: branch_false: ...to here
bluez-5.85/src/shared/pcap.c:68:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/pcap.c:73:15: branch_false: ...to here
bluez-5.85/src/shared/pcap.c:89:9: throw: if 'close' throws an exception...
bluez-5.85/src/shared/pcap.c:89:9: danger: 'pcap' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   87|   
#   88|   failed:
#   89|-> 	close(pcap->fd);
#   90|   	free(pcap);
#   91|   

Error: COMPILER_WARNING: [#def590]
bluez-5.85/src/shared/shell.c: scope_hint: In function 'menu_generator'
bluez-5.85/src/shared/shell.c:182:29: warning[-Wunused-but-set-variable=]: variable 'index' set but not used
#  182 |         static unsigned int index, len;
#      |                             ^~~~~
#  180|   static char *menu_generator(const char *text, int state)
#  181|   {
#  182|-> 	static unsigned int index, len;
#  183|   	static struct queue_entry *entry;
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def591]
bluez-5.85/src/shared/shell.c:511:15: warning[-Wanalyzer-malloc-leak]: leak of 'opt'
bluez-5.85/src/shared/shell.c:685:12: enter_function: entry to 'shell_exec'
bluez-5.85/src/shared/shell.c:697:24: call_function: calling 'menu_exec' from 'shell_exec'
#  509|   	char *str;
#  510|   
#  511|-> 	str = strdelimit(arg, del, '"');
#  512|   
#  513|   	if (wordexp(str, w, flags)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def592]
bluez-5.85/src/shared/shell.c:511:15: warning[-Wanalyzer-malloc-leak]: leak of 'str'
bluez-5.85/src/shared/shell.c:1070:15: enter_function: entry to 'args_completion'
bluez-5.85/src/shared/shell.c:1078:12: branch_false: following 'false' branch (when 'index >= 0')...
bluez-5.85/src/shared/shell.c:1081:14: branch_false: ...to here
bluez-5.85/src/shared/shell.c:1081:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/shell.c:1084:15: branch_false: ...to here
bluez-5.85/src/shared/shell.c:1084:15: acquire_memory: allocated here
bluez-5.85/src/shared/shell.c:1086:13: call_function: calling 'parse_args' from 'args_completion'
#  509|   	char *str;
#  510|   
#  511|-> 	str = strdelimit(arg, del, '"');
#  512|   
#  513|   	if (wordexp(str, w, flags)) {

Error: COMPILER_WARNING (CWE-704): [#def593]
bluez-5.85/src/shared/shell.c: scope_hint: In function 'cmd_exec'
bluez-5.85/src/shared/shell.c:555:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  555 |         man = strrchr(entry->arg, '>');
#      |             ^
#  553|   
#  554|   	/* Find last mandatory arguments */
#  555|-> 	man = strrchr(entry->arg, '>');
#  556|   	if (!man) {
#  557|   		opt = strdup(entry->arg);

Error: COMPILER_WARNING (CWE-704): [#def594]
bluez-5.85/src/shared/shell.c:555:13: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  553|   
#  554|   	/* Find last mandatory arguments */
#  555|-> 	man = strrchr(entry->arg, '>');
#  556|   	if (!man) {
#  557|   		opt = strdup(entry->arg);

Error: COMPILER_WARNING (CWE-704): [#def595]
bluez-5.85/src/shared/shell.c:566:21: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  566 |                 opt = strrchr(entry->arg, '<');
#      |                     ^
#  564|   	else {
#  565|   		/* Find where mandatory arguments start */
#  566|-> 		opt = strrchr(entry->arg, '<');
#  567|   		/* Skip if mandatory arguments are not in the right format */
#  568|   		if (!opt || opt > man) {

Error: COMPILER_WARNING (CWE-704): [#def596]
bluez-5.85/src/shared/shell.c:566:21: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  564|   	else {
#  565|   		/* Find where mandatory arguments start */
#  566|-> 		opt = strrchr(entry->arg, '<');
#  567|   		/* Skip if mandatory arguments are not in the right format */
#  568|   		if (!opt || opt > man) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def597]
bluez-5.85/src/shared/shell.c:746:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/shell.c:238:13: enter_function: entry to 'cmd_back'
bluez-5.85/src/shared/shell.c:241:17: call_function: calling 'bt_shell_printf' from 'cmd_back'
#  744|   	if (data.monitor) {
#  745|   		va_start(args, fmt);
#  746|-> 		bt_log_vprintf(0xffff, data.name, LOG_INFO, fmt, args);
#  747|   		va_end(args);
#  748|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def598]
bluez-5.85/src/shared/shell.c:753:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'saved_line'
bluez-5.85/src/shared/shell.c:238:13: enter_function: entry to 'cmd_back'
bluez-5.85/src/shared/shell.c:241:17: call_function: calling 'bt_shell_printf' from 'cmd_back'
#  751|   		if (!data.saved_prompt)
#  752|   			rl_restore_prompt();
#  753|-> 		rl_replace_line(saved_line, 0);
#  754|   		rl_point = saved_point;
#  755|   		rl_redisplay();

Error: COMPILER_WARNING (CWE-704): [#def599]
bluez-5.85/src/shared/shell.c: scope_hint: In function 'cmd_generator'
bluez-5.85/src/shared/shell.c:1017:21: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1017 |                 cmd = strrchr(text, '.');
#      |                     ^
# 1015|   			return cmd;
# 1016|   
# 1017|-> 		cmd = strrchr(text, '.');
# 1018|   		if (!cmd)
# 1019|   			return NULL;

Error: COMPILER_WARNING (CWE-704): [#def600]
bluez-5.85/src/shared/shell.c:1017:21: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1015|   			return cmd;
# 1016|   
# 1017|-> 		cmd = strrchr(text, '.');
# 1018|   		if (!cmd)
# 1019|   			return NULL;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def601]
bluez-5.85/src/shared/tester.c:166:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/tester.c:165:9: acquire_resource: 'va_start' called here
bluez-5.85/src/shared/tester.c:166:9: throw: if 'bt_log_vprintf' throws an exception...
bluez-5.85/src/shared/tester.c:166:9: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  164|   
#  165|   	va_start(ap, format);
#  166|-> 	bt_log_vprintf(HCI_DEV_NONE, tester_name, LOG_INFO, format, ap);
#  167|   	va_end(ap);
#  168|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def602]
bluez-5.85/src/shared/tester.c:179:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/tester.c:178:9: acquire_resource: 'va_start' called here
bluez-5.85/src/shared/tester.c:179:9: throw: if 'bt_log_vprintf' throws an exception...
bluez-5.85/src/shared/tester.c:179:9: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  177|   
#  178|   	va_start(ap, format);
#  179|-> 	bt_log_vprintf(HCI_DEV_NONE, tester_name, LOG_INFO, format, ap);
#  180|   	va_end(ap);
#  181|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def603]
bluez-5.85/src/shared/tester.c:192:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/tester.c:191:9: acquire_resource: 'va_start' called here
bluez-5.85/src/shared/tester.c:192:9: throw: if 'bt_log_vprintf' throws an exception...
bluez-5.85/src/shared/tester.c:192:9: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  190|   
#  191|   	va_start(ap, format);
#  192|-> 	bt_log_vprintf(HCI_DEV_NONE, tester_name, LOG_DEBUG, format, ap);
#  193|   	va_end(ap);
#  194|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def604]
bluez-5.85/src/shared/tester.c:205:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/tester.c:204:9: acquire_resource: 'va_start' called here
bluez-5.85/src/shared/tester.c:205:9: throw: if 'bt_log_vprintf' throws an exception...
bluez-5.85/src/shared/tester.c:205:9: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  203|   
#  204|   	va_start(ap, format);
#  205|-> 	bt_log_vprintf(HCI_DEV_NONE, tester_name, LOG_WARNING, format, ap);
#  206|   	va_end(ap);
#  207|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def605]
bluez-5.85/src/shared/tester.c:1047:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/tester.c:1035:12: enter_function: entry to 'tester_setup_io'
bluez-5.85/src/shared/tester.c:1037:34: call_function: inlined call to 'tester_get_test' from 'tester_setup_io'
bluez-5.85/src/shared/tester.c:1039:14: branch_true: ...to here
bluez-5.85/src/shared/tester.c:1039:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/tester.c:1047:9: danger: dereference of NULL '<unknown>'
# 1045|   	}
# 1046|   
# 1047|-> 	test->iov = iov;
# 1048|   	test->iovcnt = iovcnt;
# 1049|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def606]
bluez-5.85/src/shared/tester.c:1063:13: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/tester.c:1059:6: enter_function: entry to 'tester_io_send'
bluez-5.85/src/shared/tester.c:1061:34: call_function: inlined call to 'tester_get_test' from 'tester_io_send'
bluez-5.85/src/shared/tester.c:1063:13: branch_true: ...to here
bluez-5.85/src/shared/tester.c:1063:13: danger: dereference of NULL '<unknown>'
# 1061|   	struct test_case *test = tester_get_test();
# 1062|   
# 1063|-> 	if (test->iovcnt)
# 1064|   		io_set_write_handler(ios[1], test_io_send, NULL, NULL);
# 1065|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def607]
bluez-5.85/src/shared/tester.c:1071:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/tester.c:1067:6: enter_function: entry to 'tester_io_set_complete_func'
bluez-5.85/src/shared/tester.c:1069:34: call_function: inlined call to 'tester_get_test' from 'tester_io_set_complete_func'
bluez-5.85/src/shared/tester.c:1071:9: branch_true: ...to here
bluez-5.85/src/shared/tester.c:1071:9: danger: dereference of NULL '<unknown>'
# 1069|   	struct test_case *test = tester_get_test();
# 1070|   
# 1071|-> 	test->io_complete_func = func;
# 1072|   }
# 1073|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def608]
bluez-5.85/src/shared/uhid.c:217:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/uhid", 524290)'
bluez-5.85/src/shared/uhid.c:193:17: enter_function: entry to 'bt_uhid_new_default'
bluez-5.85/src/shared/uhid.c:198:14: acquire_resource: opened here
bluez-5.85/src/shared/uhid.c:199:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/uhid.c:202:16: branch_false: ...to here
bluez-5.85/src/shared/uhid.c:202:16: call_function: calling 'bt_uhid_new' from 'bt_uhid_new_default'
#  215|   	struct bt_uhid *uhid;
#  216|   
#  217|-> 	uhid = new0(struct bt_uhid, 1);
#  218|   	uhid->io = io_new(fd);
#  219|   	if (!uhid->io)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def609]
bluez-5.85/src/shared/uhid.c:218:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/uhid", 524290)'
bluez-5.85/src/shared/uhid.c:193:17: enter_function: entry to 'bt_uhid_new_default'
bluez-5.85/src/shared/uhid.c:198:14: acquire_resource: opened here
bluez-5.85/src/shared/uhid.c:199:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/uhid.c:202:16: branch_false: ...to here
bluez-5.85/src/shared/uhid.c:202:16: call_function: calling 'bt_uhid_new' from 'bt_uhid_new_default'
#  216|   
#  217|   	uhid = new0(struct bt_uhid, 1);
#  218|-> 	uhid->io = io_new(fd);
#  219|   	if (!uhid->io)
#  220|   		goto failed;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def610]
bluez-5.85/src/shared/util.c:350:15: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
bluez-5.85/src/shared/util.c:342:15: enter_function: entry to 'util_iov_dup'
bluez-5.85/src/shared/util.c:347:12: branch_false: following 'false' branch (when 'iov' is non-NULL)...
bluez-5.85/src/shared/util.c:350:15: branch_false: ...to here
bluez-5.85/src/shared/util.c:350:15: call_function: calling 'util_malloc' from 'util_iov_dup'
bluez-5.85/src/shared/util.c:350:15: return_function: returning to 'util_iov_dup' from 'util_malloc'
bluez-5.85/src/shared/util.c:350:15: danger: argument 1 ('util_malloc(cnt * 16)') NULL where non-null expected
#  348|   		return NULL;
#  349|   
#  350|-> 	dup = new0(struct iovec, cnt);
#  351|   
#  352|   	for (i = 0; i < cnt; i++)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def611]
bluez-5.85/src/shared/util.c:379:9: warning[-Wanalyzer-null-argument]: use of NULL '*iov.iov_base' where non-null expected
bluez-5.85/src/shared/util.c:377:9: release_memory: '*iov.iov_base' is NULL
bluez-5.85/src/shared/util.c:379:9: danger: argument 1 ('realloc(*iov.iov_base,  len)') NULL where non-null expected
#  377|   	iov->iov_base = realloc(iov->iov_base, len);
#  378|   	iov->iov_len = len;
#  379|-> 	memcpy(iov->iov_base, src, len);
#  380|   }
#  381|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def612]
bluez-5.85/src/shared/util.c:379:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
bluez-5.85/src/shared/util.c:342:15: enter_function: entry to 'util_iov_dup'
bluez-5.85/src/shared/util.c:347:12: branch_false: following 'false' branch (when 'iov' is non-NULL)...
bluez-5.85/src/shared/util.c:350:15: branch_false: ...to here
bluez-5.85/src/shared/util.c:350:15: call_function: calling 'util_malloc' from 'util_iov_dup'
bluez-5.85/src/shared/util.c:350:15: return_function: returning to 'util_iov_dup' from 'util_malloc'
bluez-5.85/src/shared/util.c:352:21: branch_true: following 'true' branch (when 'i < cnt')...
bluez-5.85/src/shared/util.c:353:62: branch_true: ...to here
bluez-5.85/src/shared/util.c:353:17: call_function: calling 'util_iov_memcpy' from 'util_iov_dup'
#  377|   	iov->iov_base = realloc(iov->iov_base, len);
#  378|   	iov->iov_len = len;
#  379|-> 	memcpy(iov->iov_base, src, len);
#  380|   }
#  381|   

Error: CPPCHECK_WARNING (CWE-476): [#def613]
bluez-5.85/src/shared/util.c:1850: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dup
# 1848|   
# 1849|   	dup = strdup(str);
# 1850|-> 	if (dup[0] == '\0')
# 1851|   		return dup;
# 1852|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def614]
bluez-5.85/src/shared/util.c:1850:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'dup'
bluez-5.85/src/shared/util.c:1846:12: branch_false: following 'false' branch (when 'str' is non-NULL)...
bluez-5.85/src/shared/util.c:1849:15: branch_false: ...to here
bluez-5.85/src/shared/util.c:1849:15: acquire_memory: this call could return NULL
bluez-5.85/src/shared/util.c:1850:13: danger: 'dup' could be NULL: unchecked value from [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1848|   
# 1849|   	dup = strdup(str);
# 1850|-> 	if (dup[0] == '\0')
# 1851|   		return dup;
# 1852|   

Error: CPPCHECK_WARNING (CWE-476): [#def615]
bluez-5.85/src/shared/util.h:264: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: __p
#  262|   static inline void put_le16(uint16_t val, void *dst)
#  263|   {
#  264|-> 	put_unaligned(cpu_to_le16(val), (uint16_t *) dst);
#  265|   }
#  266|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def616]
bluez-5.85/src/shared/util.h:264:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'data'
bluez-5.85/src/shared/gatt-db.c:395:24: acquire_memory: this call could return NULL
bluez-5.85/src/shared/gatt-db.c:396:17: call_function: inlined call to 'put_le16' from 'gen_hash_m'
#  262|   static inline void put_le16(uint16_t val, void *dst)
#  263|   {
#  264|-> 	put_unaligned(cpu_to_le16(val), (uint16_t *) dst);
#  265|   }
#  266|   

Error: CPPCHECK_WARNING (CWE-476): [#def617]
bluez-5.85/src/shared/util.h:269: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: __p
#  267|   static inline void put_be16(uint16_t val, const void *ptr)
#  268|   {
#  269|-> 	put_unaligned(cpu_to_be16(val), (uint16_t *) ptr);
#  270|   }
#  271|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def618]
bluez-5.85/src/shared/util.h:269:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pElem’
bluez-5.85/src/sdpd-request.c:837:12: enter_function: entry to ‘service_search_attr_req’
bluez-5.85/src/sdpd-request.c:854:19: call_function: calling ‘extract_des’ from ‘service_search_attr_req’
#  267|   static inline void put_be16(uint16_t val, const void *ptr)
#  268|   {
#  269|-> 	put_unaligned(cpu_to_be16(val), (uint16_t *) ptr);
#  270|   }
#  271|   

Error: CPPCHECK_WARNING (CWE-476): [#def619]
bluez-5.85/src/shared/util.h:291: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: __p
#  289|   static inline void put_be32(uint32_t val, void *dst)
#  290|   {
#  291|-> 	put_unaligned(cpu_to_be32(val), (uint32_t *) dst);
#  292|   }
#  293|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def620]
bluez-5.85/src/shared/util.h:291:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pElem’
bluez-5.85/src/sdpd-request.c:837:12: enter_function: entry to ‘service_search_attr_req’
bluez-5.85/src/sdpd-request.c:854:19: call_function: calling ‘extract_des’ from ‘service_search_attr_req’
#  289|   static inline void put_be32(uint32_t val, void *dst)
#  290|   {
#  291|-> 	put_unaligned(cpu_to_be32(val), (uint32_t *) dst);
#  292|   }
#  293|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def621]
bluez-5.85/src/shared/vcp.c:313:22: warning[-Wanalyzer-malloc-leak]: leak of 'iov_pull_string(&iov)'
bluez-5.85/src/shared/vcp.c:2793:13: enter_function: entry to 'aics_audio_ip_desr_notify'
bluez-5.85/src/shared/vcp.c:2800:23: call_function: calling 'iov_pull_string' from 'aics_audio_ip_desr_notify'
bluez-5.85/src/shared/vcp.c:2800:23: return_function: returning to 'aics_audio_ip_desr_notify' from 'iov_pull_string'
bluez-5.85/src/shared/vcp.c:2801:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/vcp.c:2804:9: branch_false: ...to here
bluez-5.85/src/shared/vcp.c:2804:9: call_function: calling 'vcp_debug' from 'aics_audio_ip_desr_notify'
#  311|   		return NULL;
#  312|   
#  313|-> 	res = malloc(iov->iov_len + 1);
#  314|   	if (!res)
#  315|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def622]
bluez-5.85/src/shared/vcp.c:322:9: warning[-Wanalyzer-malloc-leak]: leak of 'res'
bluez-5.85/src/shared/vcp.c:310:12: branch_false: following 'false' branch (when 'iov' is non-NULL)...
bluez-5.85/src/shared/vcp.c:313:22: branch_false: ...to here
bluez-5.85/src/shared/vcp.c:313:15: acquire_memory: allocated here
bluez-5.85/src/shared/vcp.c:314:12: branch_false: following 'false' branch (when 'res' is non-NULL)...
bluez-5.85/src/shared/vcp.c:317:12: branch_false: ...to here
bluez-5.85/src/shared/vcp.c:322:9: throw: if 'util_iov_pull' throws an exception...
bluez-5.85/src/shared/vcp.c:322:9: danger: 'res' leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  320|   	res[iov->iov_len] = 0;
#  321|   
#  322|-> 	util_iov_pull(iov, iov->iov_len);
#  323|   	return res;
#  324|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def623]
bluez-5.85/src/shared/vcp.c:523:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
bluez-5.85/src/shared/vcp.c:519:12: branch_false: following 'false' branch...
bluez-5.85/src/shared/vcp.c:522:9: acquire_resource: 'va_start' called here
bluez-5.85/src/shared/vcp.c:523:9: throw: if 'util_debug_va' throws an exception...
bluez-5.85/src/shared/vcp.c:523:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  521|   
#  522|   	va_start(ap, format);
#  523|-> 	util_debug_va(vcp->debug_func, vcp->debug_data, format, ap);
#  524|   	va_end(ap);
#  525|   }

Error: CPPCHECK_WARNING (CWE-476): [#def624]
bluez-5.85/src/shared/vcp.c:1808: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ip_descr
# 1806|   	aics_gain_settng_prop = new0(struct gain_setting_prop, 1);
# 1807|   	ip_descr = malloc(256);
# 1808|-> 	memset(ip_descr, 0, 256);
# 1809|   
# 1810|   	aics_aud_ip_st->mute = AICS_NOT_MUTED;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def625]
bluez-5.85/src/shared/vcp.c:1808:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'ip_descr' where non-null expected
bluez-5.85/src/shared/vcp.c:1800:12: branch_false: following 'false' branch (when 'db' is non-NULL)...
bluez-5.85/src/shared/vcp.c:1803:16: branch_false: ...to here
bluez-5.85/src/shared/vcp.c:1807:20: acquire_memory: this call could return NULL
bluez-5.85/src/shared/vcp.c:1808:9: danger: argument 1 ('ip_descr') from [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
# 1806|   	aics_gain_settng_prop = new0(struct gain_setting_prop, 1);
# 1807|   	ip_descr = malloc(256);
# 1808|-> 	memset(ip_descr, 0, 256);
# 1809|   
# 1810|   	aics_aud_ip_st->mute = AICS_NOT_MUTED;

Error: CPPCHECK_WARNING (CWE-476): [#def626]
bluez-5.85/src/shared/vcp.c:1820: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ip_descr
# 1818|   	aics->aud_input_type =	AICS_AUD_IP_TYPE_BLUETOOTH;
# 1819|   	aics->aud_input_status = AICS_AUD_IP_STATUS_ACTIVE;
# 1820|-> 	memcpy(ip_descr, ip_descr_str, strlen(ip_descr_str));
# 1821|   	aics->aud_input_descr = ip_descr;
# 1822|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def627]
bluez-5.85/src/shared/vcp.c:2168:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
bluez-5.85/src/shared/vcp.c:2163:13: enter_function: entry to 'vcp_set_volume_server'
bluez-5.85/src/shared/vcp.c:2165:33: call_function: inlined call to 'vcp_get_vdb' from 'vcp_set_volume_server'
bluez-5.85/src/shared/vcp.c:2168:9: branch_true: ...to here
bluez-5.85/src/shared/vcp.c:2168:9: danger: dereference of NULL '0'
# 2166|   	struct vol_state *vstate;
# 2167|   
# 2168|-> 	vcp->volume = volume;
# 2169|   
# 2170|   	if (!vdb) {

Error: COMPILER_WARNING (CWE-704): [#def628]
bluez-5.85/src/textfile.c: scope_hint: In function ‘create_dirs’
bluez-5.85/src/textfile.c:81:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   81 |         prev = strchr(filename, '/');
#      |              ^
#   79|   	strcat(dir, "/");
#   80|   
#   81|-> 	prev = strchr(filename, '/');
#   82|   
#   83|   	while (prev) {

Error: COMPILER_WARNING (CWE-704): [#def629]
bluez-5.85/src/textfile.c:81:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   79|   	strcat(dir, "/");
#   80|   
#   81|-> 	prev = strchr(filename, '/');
#   82|   
#   83|   	while (prev) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def630]
bluez-5.85/src/textfile.c:174:13: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
bluez-5.85/src/textfile.c:168:15: acquire_memory: allocated here
bluez-5.85/src/textfile.c:169:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
bluez-5.85/src/textfile.c:172:9: branch_false: ...to here
bluez-5.85/src/textfile.c:174:13: throw: if ‘write’ throws an exception...
bluez-5.85/src/textfile.c:174:13: danger: ‘str’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  172|   	sprintf(str, "%s %s\n", key, value);
#  173|   
#  174|-> 	if (write(fd, str, size) < 0)
#  175|   		err = -errno;
#  176|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def631]
bluez-5.85/src/textfile.c:306:13: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
bluez-5.85/src/textfile.c:204:12: enter_function: entry to ‘write_key’
bluez-5.85/src/textfile.c:213:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:216:13: branch_false: ...to here
bluez-5.85/src/textfile.c:216:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:221:13: branch_false: ...to here
bluez-5.85/src/textfile.c:221:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:226:9: branch_false: ...to here
bluez-5.85/src/textfile.c:228:12: branch_false: following ‘false’ branch (when ‘size != 0’)...
bluez-5.85/src/textfile.c:236:15: branch_false: ...to here
bluez-5.85/src/textfile.c:238:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:243:15: branch_false: ...to here
bluez-5.85/src/textfile.c:244:15: call_function: calling ‘find_key’ from ‘write_key’
bluez-5.85/src/textfile.c:244:15: return_function: returning to ‘write_key’ from ‘find_key’
bluez-5.85/src/textfile.c:245:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:254:16: branch_false: ...to here
bluez-5.85/src/textfile.c:256:15: call_function: calling ‘strnpbrk’ from ‘write_key’
bluez-5.85/src/textfile.c:256:15: return_function: returning to ‘write_key’ from ‘strnpbrk’
bluez-5.85/src/textfile.c:257:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:262:12: branch_false: ...to here
bluez-5.85/src/textfile.c:270:12: branch_false: following ‘false’ branch (when ‘len != 0’)...
bluez-5.85/src/textfile.c:283:12: branch_false: ...to here
bluez-5.85/src/textfile.c:283:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:288:15: acquire_memory: allocated here
bluez-5.85/src/textfile.c:289:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
bluez-5.85/src/textfile.c:294:9: branch_false: ...to here
bluez-5.85/src/textfile.c:297:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:302:9: branch_false: ...to here
bluez-5.85/src/textfile.c:306:13: throw: if ‘write’ throws an exception...
bluez-5.85/src/textfile.c:306:13: danger: ‘str’ leaks here; was allocated at [(34)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/33)
#  304|   		err = write_key_value(fd, key, value);
#  305|   
#  306|-> 	if (write(fd, str, len) < 0)
#  307|   		err = -errno;
#  308|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def632]
bluez-5.85/src/textfile.c:386:9: warning[-Wanalyzer-malloc-leak]: leak of ‘str’
bluez-5.85/src/textfile.c:328:14: enter_function: entry to ‘read_key’
bluez-5.85/src/textfile.c:336:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:339:13: branch_false: ...to here
bluez-5.85/src/textfile.c:339:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:344:13: branch_false: ...to here
bluez-5.85/src/textfile.c:344:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:349:9: branch_false: ...to here
bluez-5.85/src/textfile.c:352:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:357:15: branch_false: ...to here
bluez-5.85/src/textfile.c:358:15: call_function: calling ‘find_key’ from ‘read_key’
bluez-5.85/src/textfile.c:358:15: return_function: returning to ‘read_key’ from ‘find_key’
bluez-5.85/src/textfile.c:359:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:364:36: branch_false: ...to here
bluez-5.85/src/textfile.c:364:15: call_function: calling ‘strnpbrk’ from ‘read_key’
bluez-5.85/src/textfile.c:364:15: return_function: returning to ‘read_key’ from ‘strnpbrk’
bluez-5.85/src/textfile.c:365:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:370:22: branch_false: ...to here
bluez-5.85/src/textfile.c:370:15: acquire_memory: allocated here
bluez-5.85/src/textfile.c:371:12: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
bluez-5.85/src/textfile.c:376:9: branch_false: ...to here
bluez-5.85/src/textfile.c:386:9: throw: if ‘close’ throws an exception...
bluez-5.85/src/textfile.c:386:9: danger: ‘str’ leaks here; was allocated at [(28)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/27)
#  384|   
#  385|   close:
#  386|-> 	close(fd);
#  387|   	errno = -err;
#  388|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def633]
bluez-5.85/src/textfile.c:483:17: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
bluez-5.85/src/textfile.c:407:5: enter_function: entry to ‘textfile_foreach’
bluez-5.85/src/textfile.c:415:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:418:13: branch_false: ...to here
bluez-5.85/src/textfile.c:418:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:423:13: branch_false: ...to here
bluez-5.85/src/textfile.c:423:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:428:9: branch_false: ...to here
bluez-5.85/src/textfile.c:431:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:431:12: branch_false: ...to here
bluez-5.85/src/textfile.c:438:16: branch_true: following ‘true’ branch...
bluez-5.85/src/textfile.c:439:23: branch_true: ...to here
bluez-5.85/src/textfile.c:439:23: call_function: calling ‘strnpbrk’ from ‘textfile_foreach’
bluez-5.85/src/textfile.c:439:23: return_function: returning to ‘textfile_foreach’ from ‘strnpbrk’
bluez-5.85/src/textfile.c:440:20: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:445:23: branch_false: ...to here
bluez-5.85/src/textfile.c:447:23: acquire_memory: allocated here
bluez-5.85/src/textfile.c:448:20: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
bluez-5.85/src/textfile.c:453:17: branch_false: ...to here
bluez-5.85/src/textfile.c:458:20: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:464:23: branch_false: ...to here
bluez-5.85/src/textfile.c:464:23: call_function: calling ‘strnpbrk’ from ‘textfile_foreach’
bluez-5.85/src/textfile.c:464:23: return_function: returning to ‘textfile_foreach’ from ‘strnpbrk’
bluez-5.85/src/textfile.c:465:20: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:471:23: branch_false: ...to here
bluez-5.85/src/textfile.c:474:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/src/textfile.c:480:17: branch_false: ...to here
bluez-5.85/src/textfile.c:483:17: throw: if the called function throws an exception...
bluez-5.85/src/textfile.c:483:17: danger: ‘key’ leaks here; was allocated at [(21)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/20)
#  481|   		memcpy(value, off, len);
#  482|   
#  483|-> 		func(key, value, data);
#  484|   
#  485|   		free(key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def634]
bluez-5.85/src/textfile.c:483:17: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
bluez-5.85/src/textfile.c:407:5: enter_function: entry to ‘textfile_foreach’
bluez-5.85/src/textfile.c:415:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:418:13: branch_false: ...to here
bluez-5.85/src/textfile.c:418:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:423:13: branch_false: ...to here
bluez-5.85/src/textfile.c:423:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:428:9: branch_false: ...to here
bluez-5.85/src/textfile.c:431:12: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:431:12: branch_false: ...to here
bluez-5.85/src/textfile.c:438:16: branch_true: following ‘true’ branch...
bluez-5.85/src/textfile.c:439:23: branch_true: ...to here
bluez-5.85/src/textfile.c:439:23: call_function: calling ‘strnpbrk’ from ‘textfile_foreach’
bluez-5.85/src/textfile.c:439:23: return_function: returning to ‘textfile_foreach’ from ‘strnpbrk’
bluez-5.85/src/textfile.c:440:20: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:445:23: branch_false: ...to here
bluez-5.85/src/textfile.c:448:20: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)...
bluez-5.85/src/textfile.c:453:17: branch_false: ...to here
bluez-5.85/src/textfile.c:458:20: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:464:23: branch_false: ...to here
bluez-5.85/src/textfile.c:464:23: call_function: calling ‘strnpbrk’ from ‘textfile_foreach’
bluez-5.85/src/textfile.c:464:23: return_function: returning to ‘textfile_foreach’ from ‘strnpbrk’
bluez-5.85/src/textfile.c:465:20: branch_false: following ‘false’ branch...
bluez-5.85/src/textfile.c:471:23: branch_false: ...to here
bluez-5.85/src/textfile.c:473:25: acquire_memory: allocated here
bluez-5.85/src/textfile.c:474:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/src/textfile.c:480:17: branch_false: ...to here
bluez-5.85/src/textfile.c:483:17: throw: if the called function throws an exception...
bluez-5.85/src/textfile.c:483:17: danger: ‘value’ leaks here; was allocated at [(34)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/33)
#  481|   		memcpy(value, off, len);
#  482|   
#  483|-> 		func(key, value, data);
#  484|   
#  485|   		free(key);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def635]
bluez-5.85/tools/6lowpan-tester.c:212:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 1)’
bluez-5.85/tools/6lowpan-tester.c:200:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/6lowpan-tester.c:203:9: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:208:14: acquire_resource: opened here
bluez-5.85/tools/6lowpan-tester.c:209:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/6lowpan-tester.c:212:15: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:212:15: throw: if ‘write’ throws an exception...
bluez-5.85/tools/6lowpan-tester.c:212:15: danger: ‘open(&path, 1)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  210|   		return -EIO;
#  211|   
#  212|-> 	ret = write(fd, cmd, len);
#  213|   	if (ret == len)
#  214|   		tester_print("%s: OK", filename);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def636]
bluez-5.85/tools/6lowpan-tester.c:443:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/6lowpan-tester.c:426:14: acquire_resource: socket created here
bluez-5.85/tools/6lowpan-tester.c:427:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/6lowpan-tester.c:432:9: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:434:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/6lowpan-tester.c:439:9: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:442:13: acquire_resource: socket created here
bluez-5.85/tools/6lowpan-tester.c:442:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/6lowpan-tester.c:443:17: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:443:17: throw: if ‘tester_print’ throws an exception...
bluez-5.85/tools/6lowpan-tester.c:443:17: danger: ‘sk’ leaks here
#  441|   	sa.sll_protocol = 0;
#  442|   	if (bind(sk, (struct sockaddr *)&sa, sizeof(sa)) < 0) {
#  443|-> 		tester_print("bind: %m");
#  444|   		goto error;
#  445|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def637]
bluez-5.85/tools/6lowpan-tester.c:471:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/6lowpan-tester.c:426:14: acquire_resource: socket created here
bluez-5.85/tools/6lowpan-tester.c:427:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/6lowpan-tester.c:432:9: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:434:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/6lowpan-tester.c:439:9: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:442:13: acquire_resource: socket created here
bluez-5.85/tools/6lowpan-tester.c:442:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/6lowpan-tester.c:443:17: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:470:12: branch_true: following ‘true’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/6lowpan-tester.c:471:17: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:471:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/6lowpan-tester.c:471:17: danger: ‘sk’ leaks here
#  469|   error:
#  470|   	if (sk >= 0)
#  471|-> 		close(sk);
#  472|   	return -EIO;
#  473|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def638]
bluez-5.85/tools/6lowpan-tester.c:650:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/6lowpan-tester.c:650:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:650:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/6lowpan-tester.c:650:9: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:650:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/6lowpan-tester.c:650:9: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  648|   	tester_init(&argc, &argv);
#  649|   
#  650|-> 	test_6lowpan("Basic Framework - Success", NULL, setup_powered_client,
#  651|   							test_framework);
#  652|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def639]
bluez-5.85/tools/6lowpan-tester.c:653:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/6lowpan-tester.c:650:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:650:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/6lowpan-tester.c:653:9: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:653:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:653:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/6lowpan-tester.c:653:9: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:653:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/6lowpan-tester.c:653:9: danger: ‘user’ leaks here; was allocated at [(4)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/3)
#  651|   							test_framework);
#  652|   
#  653|-> 	test_6lowpan("Client Connect - Terminate", &client_connect_terminate,
#  654|   							setup_powered_client,
#  655|   							test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def640]
bluez-5.85/tools/6lowpan-tester.c:657:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/6lowpan-tester.c:650:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:650:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/6lowpan-tester.c:653:9: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:653:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:653:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/6lowpan-tester.c:657:9: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:657:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:657:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/6lowpan-tester.c:657:9: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:657:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/6lowpan-tester.c:657:9: danger: ‘user’ leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  655|   							test_connect);
#  656|   
#  657|-> 	test_6lowpan("Client Connect - Disable", &client_connect_disable,
#  658|   							setup_powered_client,
#  659|   							test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def641]
bluez-5.85/tools/6lowpan-tester.c:661:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/6lowpan-tester.c:650:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:650:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/6lowpan-tester.c:653:9: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:653:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:653:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/6lowpan-tester.c:657:9: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:657:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:657:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/6lowpan-tester.c:661:9: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:661:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:661:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/6lowpan-tester.c:661:9: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:661:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/6lowpan-tester.c:661:9: danger: ‘user’ leaks here; was allocated at [(10)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/9)
#  659|   							test_connect);
#  660|   
#  661|-> 	test_6lowpan("Client Connect - Disconnect", &client_connect_disconnect,
#  662|   							setup_powered_client,
#  663|   							test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def642]
bluez-5.85/tools/6lowpan-tester.c:665:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/6lowpan-tester.c:650:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:650:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/6lowpan-tester.c:653:9: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:653:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:653:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/6lowpan-tester.c:657:9: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:657:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:657:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/6lowpan-tester.c:661:9: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:661:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/6lowpan-tester.c:665:9: branch_true: ...to here
bluez-5.85/tools/6lowpan-tester.c:665:9: acquire_memory: allocated here
bluez-5.85/tools/6lowpan-tester.c:665:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/6lowpan-tester.c:665:9: branch_false: ...to here
bluez-5.85/tools/6lowpan-tester.c:665:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/6lowpan-tester.c:665:9: danger: ‘user’ leaks here; was allocated at [(13)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/12)
#  663|   							test_connect);
#  664|   
#  665|-> 	test_6lowpan("Client Recv Dgram - Success", &client_recv_dgram,
#  666|   							setup_powered_client,
#  667|   							test_connect);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def643]
bluez-5.85/tools/advtest.c:89:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
bluez-5.85/tools/advtest.c:83:14: acquire_resource: opened here
bluez-5.85/tools/advtest.c:84:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/advtest.c:87:15: branch_false: ...to here
bluez-5.85/tools/advtest.c:89:9: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   87|   	len = read(fd, buf, num_bytes);
#   88|   
#   89|-> 	close(fd);
#   90|   
#   91|   	if (len < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def644]
bluez-5.85/tools/avinfo.c:871:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/avinfo.c:862:14: acquire_resource: socket created here
bluez-5.85/tools/avinfo.c:863:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avinfo.c:869:13: branch_false: ...to here
bluez-5.85/tools/avinfo.c:869:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/avinfo.c:870:67: branch_true: ...to here
bluez-5.85/tools/avinfo.c:871:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/avinfo.c:871:17: danger: ‘sk’ leaks here
#  869|   	if (bind(sk, (struct sockaddr *) &l2a, sizeof(l2a)) < 0) {
#  870|   		printf("Bind failed. %s (%d)\n", strerror(errno), errno);
#  871|-> 		close(sk);
#  872|   		return -errno;
#  873|   	}

Error: GCC_ANALYZER_WARNING (CWE-666): [#def645]
bluez-5.85/tools/avinfo.c:880:13: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘sk’ in wrong phase
bluez-5.85/tools/avinfo.c:862:14: acquire_resource: socket created here
bluez-5.85/tools/avinfo.c:863:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avinfo.c:869:13: branch_false: ...to here
bluez-5.85/tools/avinfo.c:869:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avinfo.c:875:9: branch_false: ...to here
bluez-5.85/tools/avinfo.c:880:13: danger: ‘connect’ expects a new socket file descriptor but ‘sk’ is bound
#  878|   	l2a.l2_psm = htobs(AVDTP_PSM);
#  879|   
#  880|-> 	if (connect(sk, (struct sockaddr *) &l2a, sizeof(l2a)) < 0) {
#  881|   		printf("Connect failed. %s(%d)\n", strerror(errno), errno);
#  882|   		close(sk);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def646]
bluez-5.85/tools/avinfo.c:882:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/avinfo.c:862:14: acquire_resource: socket created here
bluez-5.85/tools/avinfo.c:863:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avinfo.c:869:13: branch_false: ...to here
bluez-5.85/tools/avinfo.c:869:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avinfo.c:875:9: branch_false: ...to here
bluez-5.85/tools/avinfo.c:880:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/avinfo.c:881:69: branch_true: ...to here
bluez-5.85/tools/avinfo.c:882:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/avinfo.c:882:17: danger: ‘sk’ leaks here
#  880|   	if (connect(sk, (struct sockaddr *) &l2a, sizeof(l2a)) < 0) {
#  881|   		printf("Connect failed. %s(%d)\n", strerror(errno), errno);
#  882|-> 		close(sk);
#  883|   		return -errno;
#  884|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def647]
bluez-5.85/tools/avtest.c:189: warning[uninitvar]: Uninitialized variable: hdr->transaction
#  187|   static void dump_avctp_header(struct avctp_header *hdr)
#  188|   {
#  189|-> 	printf("TL %d PT %d CR %d IPID %d PID 0x%04x\n", hdr->transaction,
#  190|   			hdr->packet_type, hdr->cr, hdr->ipid, ntohs(hdr->pid));
#  191|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def648]
bluez-5.85/tools/avtest.c:220:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(sk, & addr, & optlen)’
bluez-5.85/tools/avtest.c:466:13: enter_function: entry to ‘do_listen’
bluez-5.85/tools/avtest.c:474:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avtest.c:479:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:484:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:489:12: branch_false: ...to here
bluez-5.85/tools/avtest.c:492:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:492:12: branch_false: ...to here
bluez-5.85/tools/avtest.c:502:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:507:17: branch_false: ...to here
bluez-5.85/tools/avtest.c:507:17: call_function: calling ‘process_avdtp’ from ‘do_listen’
#  218|   		len = read(sk, buf, sizeof(buf));
#  219|   		if (len <= 0) {
#  220|-> 			perror("Read failed");
#  221|   			break;
#  222|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def649]
bluez-5.85/tools/avtest.c:220:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/avtest.c:466:13: enter_function: entry to ‘do_listen’
bluez-5.85/tools/avtest.c:473:14: acquire_resource: socket created here
bluez-5.85/tools/avtest.c:474:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avtest.c:479:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:484:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:489:12: branch_false: ...to here
bluez-5.85/tools/avtest.c:492:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:492:12: branch_false: ...to here
bluez-5.85/tools/avtest.c:502:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:507:17: branch_false: ...to here
bluez-5.85/tools/avtest.c:507:17: call_function: calling ‘process_avdtp’ from ‘do_listen’
#  218|   		len = read(sk, buf, sizeof(buf));
#  219|   		if (len <= 0) {
#  220|-> 			perror("Read failed");
#  221|   			break;
#  222|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def650]
bluez-5.85/tools/avtest.c:485:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/avtest.c:473:14: acquire_resource: socket created here
bluez-5.85/tools/avtest.c:474:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avtest.c:479:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:484:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/avtest.c:485:17: branch_true: ...to here
bluez-5.85/tools/avtest.c:485:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/avtest.c:485:17: danger: ‘sk’ leaks here
#  483|   
#  484|   	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  485|-> 		perror("Can't bind socket");
#  486|   		goto error;
#  487|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def651]
bluez-5.85/tools/avtest.c:493:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/avtest.c:473:14: acquire_resource: socket created here
bluez-5.85/tools/avtest.c:474:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avtest.c:479:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:484:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:489:12: branch_false: ...to here
bluez-5.85/tools/avtest.c:489:12: branch_true: following ‘true’ branch (when ‘fragment != 0’)...
bluez-5.85/tools/avtest.c:490:17: branch_true: ...to here
bluez-5.85/tools/avtest.c:492:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/avtest.c:493:17: branch_true: ...to here
bluez-5.85/tools/avtest.c:493:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/avtest.c:493:17: danger: ‘sk’ leaks here
#  491|   
#  492|   	if (listen(sk, 10)) {
#  493|-> 		perror("Can't listen on the socket");
#  494|   		goto error;
#  495|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def652]
bluez-5.85/tools/avtest.c:503:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/avtest.c:473:14: acquire_resource: socket created here
bluez-5.85/tools/avtest.c:474:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avtest.c:479:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:484:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:489:12: branch_false: ...to here
bluez-5.85/tools/avtest.c:492:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:492:12: branch_false: ...to here
bluez-5.85/tools/avtest.c:502:20: branch_true: following ‘true’ branch...
bluez-5.85/tools/avtest.c:503:25: branch_true: ...to here
bluez-5.85/tools/avtest.c:503:25: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/avtest.c:503:25: danger: ‘sk’ leaks here
#  501|   		nsk = accept(sk, (struct sockaddr *) &addr, &optlen);
#  502|   		if (nsk < 0) {
#  503|-> 			perror("Accept failed");
#  504|   			continue;
#  505|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def653]
bluez-5.85/tools/avtest.c:518:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/avtest.c:473:14: acquire_resource: socket created here
bluez-5.85/tools/avtest.c:474:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avtest.c:479:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:484:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:489:12: branch_false: ...to here
bluez-5.85/tools/avtest.c:489:12: branch_false: following ‘false’ branch (when ‘fragment == 0’)...
bluez-5.85/tools/avtest.c:492:13: branch_false: ...to here
bluez-5.85/tools/avtest.c:492:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/avtest.c:493:17: branch_true: ...to here
bluez-5.85/tools/avtest.c:518:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/avtest.c:518:9: danger: ‘sk’ leaks here
#  516|   
#  517|   error:
#  518|-> 	close(sk);
#  519|   }
#  520|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def654]
bluez-5.85/tools/avtest.c:538:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/avtest.c:527:14: acquire_resource: socket created here
bluez-5.85/tools/avtest.c:528:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avtest.c:533:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:537:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/avtest.c:538:17: branch_true: ...to here
bluez-5.85/tools/avtest.c:538:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/avtest.c:538:17: danger: ‘sk’ leaks here
#  536|   
#  537|   	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  538|-> 		perror("Can't bind socket");
#  539|   		goto error;
#  540|   	}

Error: GCC_ANALYZER_WARNING (CWE-666): [#def655]
bluez-5.85/tools/avtest.c:550:15: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘sk’ in wrong phase
bluez-5.85/tools/avtest.c:527:14: acquire_resource: socket created here
bluez-5.85/tools/avtest.c:528:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avtest.c:533:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:537:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:542:12: branch_false: ...to here
bluez-5.85/tools/avtest.c:542:12: branch_false: following ‘false’ branch (when ‘fragment == 0’)...
bluez-5.85/tools/avtest.c:545:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:550:15: danger: ‘connect’ expects a new socket file descriptor but ‘sk’ is bound
#  548|   	addr.l2_psm = htobs(avctp ? 23 : 25);
#  549|   
#  550|-> 	err = connect(sk, (struct sockaddr *) &addr, sizeof(addr));
#  551|   	if (err < 0) {
#  552|   		perror("Unable to connect");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def656]
bluez-5.85/tools/avtest.c:552:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/avtest.c:527:14: acquire_resource: socket created here
bluez-5.85/tools/avtest.c:528:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avtest.c:533:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:537:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/avtest.c:542:12: branch_false: ...to here
bluez-5.85/tools/avtest.c:542:12: branch_true: following ‘true’ branch (when ‘fragment != 0’)...
bluez-5.85/tools/avtest.c:543:17: branch_true: ...to here
bluez-5.85/tools/avtest.c:550:15: acquire_resource: socket created here
bluez-5.85/tools/avtest.c:551:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/avtest.c:552:17: branch_true: ...to here
bluez-5.85/tools/avtest.c:552:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/avtest.c:552:17: danger: ‘sk’ leaks here
#  550|   	err = connect(sk, (struct sockaddr *) &addr, sizeof(addr));
#  551|   	if (err < 0) {
#  552|-> 		perror("Unable to connect");
#  553|   		goto error;
#  554|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def657]
bluez-5.85/tools/avtest.c:559:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/avtest.c:527:14: acquire_resource: socket created here
bluez-5.85/tools/avtest.c:528:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/avtest.c:533:9: branch_false: ...to here
bluez-5.85/tools/avtest.c:537:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/avtest.c:538:17: branch_true: ...to here
bluez-5.85/tools/avtest.c:559:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/avtest.c:559:9: danger: ‘sk’ leaks here
#  557|   
#  558|   error:
#  559|-> 	close(sk);
#  560|   	return -1;
#  561|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def658]
bluez-5.85/tools/bnep-tester.c:272:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/bnep-tester.c:264:14: acquire_resource: socket created here
bluez-5.85/tools/bnep-tester.c:265:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/bnep-tester.c:272:9: branch_false: ...to here
bluez-5.85/tools/bnep-tester.c:272:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/bnep-tester.c:272:9: danger: ‘sk’ leaks here
#  270|   	}
#  271|   
#  272|-> 	close(sk);
#  273|   
#  274|   	tester_test_passed();

Error: GCC_ANALYZER_WARNING (CWE-479): [#def659]
bluez-5.85/tools/bneptest.c:483:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘printf’ from within signal handler
bluez-5.85/tools/bneptest.c:549:5: enter_function: entry to ‘main’
bluez-5.85/tools/bneptest.c:555:9: branch_false: following ‘false’ branch...
bluez-5.85/tools/bneptest.c:557:9: branch_false: ...to here
bluez-5.85/tools/bneptest.c:481:13: enter_function: entry to ‘exit_handler’
bluez-5.85/tools/bneptest.c:483:9: danger: call to ‘printf’ from within signal handler
#  481|   static void exit_handler(int sig)
#  482|   {
#  483|-> 	printf("got sig = %d, cleaning up...\n", sig);
#  484|   
#  485|   	if (cleanup() < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def660]
bluez-5.85/tools/btgatt-client.c:748:22: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
bluez-5.85/tools/btgatt-client.c:679:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:684:14: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:684:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:690:9: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:710:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:715:18: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:716:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:723:12: branch_true: following ‘true’ branch (when ‘length != 0’)...
bluez-5.85/tools/btgatt-client.c:724:20: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:724:20: branch_false: following ‘false’ branch (when ‘length <= 65535’)...
bluez-5.85/tools/btgatt-client.c:729:25: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:729:25: acquire_memory: allocated here
bluez-5.85/tools/btgatt-client.c:730:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/tools/btgatt-client.c:730:20: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:747:12: branch_true: following ‘true’ branch (when ‘without_response != 0’)...
bluez-5.85/tools/btgatt-client.c:748:22: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:748:22: throw: if ‘bt_gatt_client_write_without_response’ throws an exception...
bluez-5.85/tools/btgatt-client.c:748:22: danger: ‘value’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  746|   
#  747|   	if (without_response) {
#  748|-> 		if (!bt_gatt_client_write_without_response(cli->gatt, handle,
#  749|   						signed_write, value, length)) {
#  750|   			printf("Failed to initiate write without response "

Error: GCC_ANALYZER_WARNING (CWE-401): [#def661]
bluez-5.85/tools/btgatt-client.c:759:14: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
bluez-5.85/tools/btgatt-client.c:679:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:684:14: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:684:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:690:9: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:710:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:715:18: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:716:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:723:12: branch_true: following ‘true’ branch (when ‘length != 0’)...
bluez-5.85/tools/btgatt-client.c:724:20: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:724:20: branch_false: following ‘false’ branch (when ‘length <= 65535’)...
bluez-5.85/tools/btgatt-client.c:729:25: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:729:25: acquire_memory: allocated here
bluez-5.85/tools/btgatt-client.c:730:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/tools/btgatt-client.c:730:20: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:747:12: branch_false: following ‘false’ branch (when ‘without_response == 0’)...
bluez-5.85/tools/btgatt-client.c:759:14: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:759:14: throw: if ‘bt_gatt_client_write_value’ throws an exception...
bluez-5.85/tools/btgatt-client.c:759:14: danger: ‘value’ leaks here; was allocated at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
#  757|   	}
#  758|   
#  759|-> 	id = bt_gatt_client_write_value(cli->gatt, handle, value, length,
#  760|   								write_cb,
#  761|   								NULL, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def662]
bluez-5.85/tools/btgatt-client.c:765:17: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
bluez-5.85/tools/btgatt-client.c:679:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:684:14: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:684:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:690:9: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:710:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:715:18: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:716:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:723:12: branch_true: following ‘true’ branch (when ‘length != 0’)...
bluez-5.85/tools/btgatt-client.c:724:20: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:724:20: branch_false: following ‘false’ branch (when ‘length <= 65535’)...
bluez-5.85/tools/btgatt-client.c:729:25: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:729:25: acquire_memory: allocated here
bluez-5.85/tools/btgatt-client.c:730:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/tools/btgatt-client.c:730:20: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:747:12: branch_false: following ‘false’ branch (when ‘without_response == 0’)...
bluez-5.85/tools/btgatt-client.c:759:14: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:762:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:764:19: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:764:17: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:765:17: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:765:17: throw: if ‘bt_gatt_client_set_retry’ throws an exception...
bluez-5.85/tools/btgatt-client.c:765:17: danger: ‘value’ leaks here; was allocated at [(13)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/12)
#  763|   		printf("Failed to initiate write procedure\n");
#  764|   	else if (!cli->sec_retry)
#  765|-> 		bt_gatt_client_set_retry(cli->gatt, id, false);
#  766|   
#  767|   done:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def663]
bluez-5.85/tools/btgatt-client.c:886:14: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
bluez-5.85/tools/btgatt-client.c:799:13: enter_function: entry to ‘cmd_write_long_value’
bluez-5.85/tools/btgatt-client.c:813:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:818:14: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:818:14: call_function: calling ‘parse_args’ from ‘cmd_write_long_value’
bluez-5.85/tools/btgatt-client.c:818:14: return_function: returning to ‘cmd_write_long_value’ from ‘parse_args’
bluez-5.85/tools/btgatt-client.c:818:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:824:9: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:841:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:846:18: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:847:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:854:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:861:12: branch_true: following ‘true’ branch (when ‘length != 0’)...
bluez-5.85/tools/btgatt-client.c:862:20: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:862:20: branch_false: following ‘false’ branch (when ‘length <= 65535’)...
bluez-5.85/tools/btgatt-client.c:867:25: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:867:25: acquire_memory: allocated here
bluez-5.85/tools/btgatt-client.c:868:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/tools/btgatt-client.c:868:20: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:886:14: throw: if ‘bt_gatt_client_write_long_value’ throws an exception...
bluez-5.85/tools/btgatt-client.c:886:14: danger: ‘value’ leaks here; was allocated at [(23)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/22)
#  884|   	}
#  885|   
#  886|-> 	id = bt_gatt_client_write_long_value(cli->gatt, reliable_writes, handle,
#  887|   							offset, value, length,
#  888|   							write_long_cb,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def664]
bluez-5.85/tools/btgatt-client.c:893:17: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
bluez-5.85/tools/btgatt-client.c:799:13: enter_function: entry to ‘cmd_write_long_value’
bluez-5.85/tools/btgatt-client.c:813:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:818:14: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:818:14: call_function: calling ‘parse_args’ from ‘cmd_write_long_value’
bluez-5.85/tools/btgatt-client.c:818:14: return_function: returning to ‘cmd_write_long_value’ from ‘parse_args’
bluez-5.85/tools/btgatt-client.c:818:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:824:9: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:841:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:846:18: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:847:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:854:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:861:12: branch_true: following ‘true’ branch (when ‘length != 0’)...
bluez-5.85/tools/btgatt-client.c:862:20: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:862:20: branch_false: following ‘false’ branch (when ‘length <= 65535’)...
bluez-5.85/tools/btgatt-client.c:867:25: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:867:25: acquire_memory: allocated here
bluez-5.85/tools/btgatt-client.c:868:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/tools/btgatt-client.c:868:20: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:890:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:892:19: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:892:17: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:893:17: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:893:17: throw: if ‘bt_gatt_client_set_retry’ throws an exception...
bluez-5.85/tools/btgatt-client.c:893:17: danger: ‘value’ leaks here; was allocated at [(23)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/22)
#  891|   		printf("Failed to initiate long write procedure\n");
#  892|   	else if (!cli->sec_retry)
#  893|-> 		bt_gatt_client_set_retry(cli->gatt, id, false);
#  894|   
#  895|   	free(value);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def665]
bluez-5.85/tools/btgatt-client.c:1020:25: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
bluez-5.85/tools/btgatt-client.c:926:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:931:14: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:931:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:938:9: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:963:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:968:13: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:968:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:974:18: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:975:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:982:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:996:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:1001:17: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:1001:17: acquire_memory: allocated here
bluez-5.85/tools/btgatt-client.c:1002:12: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/tools/btgatt-client.c:1002:12: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:1007:21: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:1008:34: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:1009:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:1009:21: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:1015:23: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:1007:21: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:1018:1: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:1020:25: throw: if ‘bt_gatt_client_prepare_write’ throws an exception...
bluez-5.85/tools/btgatt-client.c:1020:25: danger: ‘value’ leaks here; was allocated at [(15)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/14)
# 1018|   done:
# 1019|   	cli->reliable_session_id =
# 1020|-> 			bt_gatt_client_prepare_write(cli->gatt, id,
# 1021|   							handle, offset,
# 1022|   							value, length,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def666]
bluez-5.85/tools/btgatt-client.c:1029:25: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
bluez-5.85/tools/btgatt-client.c:926:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:931:14: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:931:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:938:9: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:963:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:968:13: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:968:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:974:18: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:975:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:982:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:996:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:1001:17: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:1001:17: acquire_memory: allocated here
bluez-5.85/tools/btgatt-client.c:1002:12: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/tools/btgatt-client.c:1002:12: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:1007:21: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-client.c:1008:34: branch_true: ...to here
bluez-5.85/tools/btgatt-client.c:1009:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:1009:21: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:1015:23: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:1007:21: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:1018:1: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:1025:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:1028:22: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:1028:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-client.c:1029:25: branch_false: ...to here
bluez-5.85/tools/btgatt-client.c:1029:25: throw: if ‘bt_gatt_client_set_retry’ throws an exception...
bluez-5.85/tools/btgatt-client.c:1029:25: danger: ‘value’ leaks here; was allocated at [(15)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/14)
# 1027|   	} else {
# 1028|   		if (!cli->sec_retry)
# 1029|-> 			bt_gatt_client_set_retry(cli->gatt,
# 1030|   						cli->reliable_session_id,
# 1031|   						false);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def667]
bluez-5.85/tools/btgatt-server.c:685:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/btgatt-server.c:657:14: acquire_resource: socket created here
bluez-5.85/tools/btgatt-server.c:658:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/btgatt-server.c:664:9: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:670:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:676:9: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:678:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:684:13: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:684:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-server.c:685:17: branch_true: ...to here
bluez-5.85/tools/btgatt-server.c:685:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/btgatt-server.c:685:17: danger: ‘sk’ leaks here
#  683|   
#  684|   	if (listen(sk, 10) < 0) {
#  685|-> 		perror("Listening on socket failed");
#  686|   		goto fail;
#  687|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def668]
bluez-5.85/tools/btgatt-server.c:693:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/btgatt-server.c:657:14: acquire_resource: socket created here
bluez-5.85/tools/btgatt-server.c:658:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/btgatt-server.c:664:9: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:670:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:676:9: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:678:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:684:13: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:684:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:689:9: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:693:15: throw: if ‘accept’ throws an exception...
bluez-5.85/tools/btgatt-server.c:693:15: danger: ‘sk’ leaks here
#  691|   	memset(&addr, 0, sizeof(addr));
#  692|   	optlen = sizeof(addr);
#  693|-> 	nsk = accept(sk, (struct sockaddr *) &addr, &optlen);
#  694|   	if (nsk < 0) {
#  695|   		perror("Accept failed");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def669]
bluez-5.85/tools/btgatt-server.c:706:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/btgatt-server.c:657:14: acquire_resource: socket created here
bluez-5.85/tools/btgatt-server.c:658:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/btgatt-server.c:664:9: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:670:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:676:9: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:678:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:684:13: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:684:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-server.c:685:17: branch_true: ...to here
bluez-5.85/tools/btgatt-server.c:706:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/btgatt-server.c:706:9: danger: ‘sk’ leaks here
#  704|   
#  705|   fail:
#  706|-> 	close(sk);
#  707|   	return -1;
#  708|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def670]
bluez-5.85/tools/btgatt-server.c:825:22: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
bluez-5.85/tools/btgatt-server.c:759:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-server.c:765:9: branch_true: ...to here
bluez-5.85/tools/btgatt-server.c:769:17: branch_true: following ‘true’ branch (when ‘opt == 105’)...
bluez-5.85/tools/btgatt-server.c:769:17: branch_true: ...to here
bluez-5.85/tools/btgatt-server.c:782:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:787:18: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:788:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:795:12: branch_true: following ‘true’ branch (when ‘length != 0’)...
bluez-5.85/tools/btgatt-server.c:796:20: branch_true: ...to here
bluez-5.85/tools/btgatt-server.c:796:20: branch_false: following ‘false’ branch (when ‘length <= 65535’)...
bluez-5.85/tools/btgatt-server.c:801:25: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:801:25: acquire_memory: allocated here
bluez-5.85/tools/btgatt-server.c:802:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/tools/btgatt-server.c:802:20: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:824:12: branch_true: following ‘true’ branch (when ‘indicate != 0’)...
bluez-5.85/tools/btgatt-server.c:825:22: branch_true: ...to here
bluez-5.85/tools/btgatt-server.c:825:22: throw: if ‘bt_gatt_server_send_indication’ throws an exception...
bluez-5.85/tools/btgatt-server.c:825:22: danger: ‘value’ leaks here; was allocated at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  823|   
#  824|   	if (indicate) {
#  825|-> 		if (!bt_gatt_server_send_indication(server->gatt, handle,
#  826|   							value, length,
#  827|   							conf_cb, NULL, NULL))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def671]
bluez-5.85/tools/btgatt-server.c:829:21: warning[-Wanalyzer-malloc-leak]: leak of ‘value’
bluez-5.85/tools/btgatt-server.c:759:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btgatt-server.c:765:9: branch_true: ...to here
bluez-5.85/tools/btgatt-server.c:782:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:787:18: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:788:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btgatt-server.c:795:12: branch_true: following ‘true’ branch (when ‘length != 0’)...
bluez-5.85/tools/btgatt-server.c:796:20: branch_true: ...to here
bluez-5.85/tools/btgatt-server.c:796:20: branch_false: following ‘false’ branch (when ‘length <= 65535’)...
bluez-5.85/tools/btgatt-server.c:801:25: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:801:25: acquire_memory: allocated here
bluez-5.85/tools/btgatt-server.c:802:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
bluez-5.85/tools/btgatt-server.c:802:20: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:824:12: branch_false: following ‘false’ branch (when ‘indicate == 0’)...
bluez-5.85/tools/btgatt-server.c:829:21: branch_false: ...to here
bluez-5.85/tools/btgatt-server.c:829:21: throw: if ‘bt_gatt_server_send_notification’ throws an exception...
bluez-5.85/tools/btgatt-server.c:829:21: danger: ‘value’ leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  827|   							conf_cb, NULL, NULL))
#  828|   			printf("Failed to initiate indication\n");
#  829|-> 	} else if (!bt_gatt_server_send_notification(server->gatt, handle,
#  830|   							value, length, false))
#  831|   		printf("Failed to initiate notification\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def672]
bluez-5.85/tools/btproxy.c:657:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/btproxy.c:633:12: branch_false: following ‘false’ branch (when ‘len <= 107’)...
bluez-5.85/tools/btproxy.c:638:9: branch_false: ...to here
bluez-5.85/tools/btproxy.c:640:14: acquire_resource: socket created here
bluez-5.85/tools/btproxy.c:641:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/btproxy.c:646:9: branch_false: ...to here
bluez-5.85/tools/btproxy.c:650:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:656:13: branch_false: ...to here
bluez-5.85/tools/btproxy.c:656:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btproxy.c:657:17: branch_true: ...to here
bluez-5.85/tools/btproxy.c:657:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/btproxy.c:657:17: danger: ‘fd’ leaks here
#  655|   
#  656|   	if (listen(fd, 1) < 0) {
#  657|-> 		perror("Failed to listen Unix server socket");
#  658|   		close(fd);
#  659|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def673]
bluez-5.85/tools/btproxy.c:658:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/btproxy.c:633:12: branch_false: following ‘false’ branch (when ‘len <= 107’)...
bluez-5.85/tools/btproxy.c:638:9: branch_false: ...to here
bluez-5.85/tools/btproxy.c:640:14: acquire_resource: socket created here
bluez-5.85/tools/btproxy.c:641:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/btproxy.c:646:9: branch_false: ...to here
bluez-5.85/tools/btproxy.c:650:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:656:13: branch_false: ...to here
bluez-5.85/tools/btproxy.c:656:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btproxy.c:657:17: branch_true: ...to here
bluez-5.85/tools/btproxy.c:658:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/btproxy.c:658:17: danger: ‘fd’ leaks here
#  656|   	if (listen(fd, 1) < 0) {
#  657|   		perror("Failed to listen Unix server socket");
#  658|-> 		close(fd);
#  659|   		return -1;
#  660|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def674]
bluez-5.85/tools/btproxy.c:663:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/btproxy.c:633:12: branch_false: following ‘false’ branch (when ‘len <= 107’)...
bluez-5.85/tools/btproxy.c:638:9: branch_false: ...to here
bluez-5.85/tools/btproxy.c:640:14: acquire_resource: socket created here
bluez-5.85/tools/btproxy.c:641:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/btproxy.c:646:9: branch_false: ...to here
bluez-5.85/tools/btproxy.c:650:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:656:13: branch_false: ...to here
bluez-5.85/tools/btproxy.c:656:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:662:13: branch_false: ...to here
bluez-5.85/tools/btproxy.c:662:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btproxy.c:663:17: branch_true: ...to here
bluez-5.85/tools/btproxy.c:663:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/btproxy.c:663:17: danger: ‘fd’ leaks here
#  661|   
#  662|   	if (chmod(path, 0666) < 0)
#  663|-> 		perror("Failed to change mode");
#  664|   
#  665|   	return fd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def675]
bluez-5.85/tools/btproxy.c:693:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/btproxy.c:673:14: acquire_resource: socket created here
bluez-5.85/tools/btproxy.c:674:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/btproxy.c:679:9: branch_false: ...to here
bluez-5.85/tools/btproxy.c:686:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:692:13: branch_false: ...to here
bluez-5.85/tools/btproxy.c:692:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btproxy.c:693:17: branch_true: ...to here
bluez-5.85/tools/btproxy.c:693:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/btproxy.c:693:17: danger: ‘fd’ leaks here
#  691|   
#  692|   	if (listen(fd, 1) < 0) {
#  693|-> 		perror("Failed to listen TCP server socket");
#  694|   		close(fd);
#  695|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def676]
bluez-5.85/tools/btproxy.c:694:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/btproxy.c:673:14: acquire_resource: socket created here
bluez-5.85/tools/btproxy.c:674:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/btproxy.c:679:9: branch_false: ...to here
bluez-5.85/tools/btproxy.c:686:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:692:13: branch_false: ...to here
bluez-5.85/tools/btproxy.c:692:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btproxy.c:693:17: branch_true: ...to here
bluez-5.85/tools/btproxy.c:694:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/btproxy.c:694:17: danger: ‘fd’ leaks here
#  692|   	if (listen(fd, 1) < 0) {
#  693|   		perror("Failed to listen TCP server socket");
#  694|-> 		close(fd);
#  695|   		return -1;
#  696|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def677]
bluez-5.85/tools/btproxy.c:717:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/btproxy.c:706:14: acquire_resource: socket created here
bluez-5.85/tools/btproxy.c:707:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/btproxy.c:712:9: branch_false: ...to here
bluez-5.85/tools/btproxy.c:717:13: throw: if ‘connect’ throws an exception...
bluez-5.85/tools/btproxy.c:717:13: danger: ‘fd’ leaks here
#  715|   	addr.sin_port = htons(port);
#  716|   
#  717|-> 	if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  718|   		perror("Failed to connect TCP client socket");
#  719|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def678]
bluez-5.85/tools/btproxy.c:738:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/vhci", 524290)’
bluez-5.85/tools/btproxy.c:732:14: acquire_resource: opened here
bluez-5.85/tools/btproxy.c:733:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:738:19: branch_false: ...to here
bluez-5.85/tools/btproxy.c:738:19: throw: if ‘write’ throws an exception...
bluez-5.85/tools/btproxy.c:738:19: danger: ‘open("/dev/vhci", 524290)’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  736|   	}
#  737|   
#  738|-> 	written = write(fd, create_req, sizeof(create_req));
#  739|   	if (written < 0) {
#  740|   		perror("Failed to set device type");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def679]
bluez-5.85/tools/btproxy.c:740:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/vhci", 524290)’
bluez-5.85/tools/btproxy.c:732:14: acquire_resource: opened here
bluez-5.85/tools/btproxy.c:733:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:738:19: branch_false: ...to here
bluez-5.85/tools/btproxy.c:739:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btproxy.c:740:17: branch_true: ...to here
bluez-5.85/tools/btproxy.c:740:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/btproxy.c:740:17: danger: ‘open("/dev/vhci", 524290)’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  738|   	written = write(fd, create_req, sizeof(create_req));
#  739|   	if (written < 0) {
#  740|-> 		perror("Failed to set device type");
#  741|   		close(fd);
#  742|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def680]
bluez-5.85/tools/btproxy.c:741:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/vhci", 524290)’
bluez-5.85/tools/btproxy.c:732:14: acquire_resource: opened here
bluez-5.85/tools/btproxy.c:733:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:738:19: branch_false: ...to here
bluez-5.85/tools/btproxy.c:739:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btproxy.c:740:17: branch_true: ...to here
bluez-5.85/tools/btproxy.c:741:17: danger: ‘open("/dev/vhci", 524290)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  739|   	if (written < 0) {
#  740|   		perror("Failed to set device type");
#  741|-> 		close(fd);
#  742|   		return -1;
#  743|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def681]
bluez-5.85/tools/btproxy.c:948:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘server_fd’
bluez-5.85/tools/btproxy.c:790:5: enter_function: entry to ‘main’
bluez-5.85/tools/btproxy.c:806:20: branch_false: following ‘false’ branch (when ‘opt >= 0’)...
bluez-5.85/tools/btproxy.c:809:17: branch_false: ...to here
bluez-5.85/tools/btproxy.c:817:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:817:28: branch_false: ...to here
bluez-5.85/tools/btproxy.c:878:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:883:12: branch_false: ...to here
bluez-5.85/tools/btproxy.c:883:12: branch_false: following ‘false’ branch (when ‘unix_path’ is NULL)...
bluez-5.85/tools/btproxy.c:888:12: branch_false: ...to here
bluez-5.85/tools/btproxy.c:888:12: branch_false: following ‘false’ branch (when ‘connect_address’ is NULL)...
bluez-5.85/tools/btproxy.c:893:13: branch_false: ...to here
bluez-5.85/tools/btproxy.c:893:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btproxy.c:894:17: branch_true: ...to here
bluez-5.85/tools/btproxy.c:898:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btproxy.c:931:20: branch_false: ...to here
bluez-5.85/tools/btproxy.c:931:20: branch_false: following ‘false’ branch (when ‘unix_path’ is NULL)...
bluez-5.85/tools/btproxy.c:935:27: branch_false: ...to here
bluez-5.85/tools/btproxy.c:935:27: branch_true: following ‘true’ branch (when ‘server_address’ is non-NULL)...
bluez-5.85/tools/btproxy.c:936:25: branch_true: ...to here
bluez-5.85/tools/btproxy.c:939:37: call_function: calling ‘open_tcp’ from ‘main’
bluez-5.85/tools/btproxy.c:939:37: return_function: returning to ‘main’ from ‘open_tcp’
bluez-5.85/tools/btproxy.c:945:20: branch_false: following ‘false’ branch (when ‘server_fd != -1’)...
bluez-5.85/tools/btproxy.c:948:17: branch_false: ...to here
bluez-5.85/tools/btproxy.c:948:17: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/tools/btproxy.c:948:17: danger: ‘server_fd’ leaks here
#  946|   			return EXIT_FAILURE;
#  947|   
#  948|-> 		mainloop_add_fd(server_fd, EPOLLIN, server_callback,
#  949|   							NULL, NULL);
#  950|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def682]
bluez-5.85/tools/btsnoop.c:60:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘input_fd[0]’
bluez-5.85/tools/btsnoop.c:119:13: enter_function: entry to ‘command_merge’
bluez-5.85/tools/btsnoop.c:129:12: branch_false: following ‘false’ branch (when ‘argc <= 8’)...
bluez-5.85/tools/btsnoop.c:129:12: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:134:21: branch_true: following ‘true’ branch (when ‘num_input < argc’)...
bluez-5.85/tools/btsnoop.c:138:39: branch_true: ...to here
bluez-5.85/tools/btsnoop.c:138:22: call_function: calling ‘open_btsnoop’ from ‘command_merge’
bluez-5.85/tools/btsnoop.c:138:22: return_function: returning to ‘command_merge’ from ‘open_btsnoop’
bluez-5.85/tools/btsnoop.c:139:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/btsnoop.c:142:21: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:142:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/btsnoop.c:149:26: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:134:21: branch_false: following ‘false’ branch (when ‘num_input >= argc’)...
bluez-5.85/tools/btsnoop.c:152:12: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:152:12: branch_false: following ‘false’ branch (when ‘num_input == argc’)...
bluez-5.85/tools/btsnoop.c:157:21: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:157:21: call_function: calling ‘create_btsnoop’ from ‘command_merge’
#   58|   	int fd;
#   59|   
#   60|-> 	fd = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0644);
#   61|   	if (fd < 0) {
#   62|   		perror("failed to output file");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def683]
bluez-5.85/tools/btsnoop.c:62:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘input_fd[0]’
bluez-5.85/tools/btsnoop.c:119:13: enter_function: entry to ‘command_merge’
bluez-5.85/tools/btsnoop.c:129:12: branch_false: following ‘false’ branch (when ‘argc <= 8’)...
bluez-5.85/tools/btsnoop.c:129:12: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:134:21: branch_true: following ‘true’ branch (when ‘num_input < argc’)...
bluez-5.85/tools/btsnoop.c:138:39: branch_true: ...to here
bluez-5.85/tools/btsnoop.c:138:22: call_function: calling ‘open_btsnoop’ from ‘command_merge’
bluez-5.85/tools/btsnoop.c:138:22: return_function: returning to ‘command_merge’ from ‘open_btsnoop’
bluez-5.85/tools/btsnoop.c:139:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/btsnoop.c:142:21: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:142:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/btsnoop.c:149:26: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:134:21: branch_false: following ‘false’ branch (when ‘num_input >= argc’)...
bluez-5.85/tools/btsnoop.c:152:12: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:152:12: branch_false: following ‘false’ branch (when ‘num_input == argc’)...
bluez-5.85/tools/btsnoop.c:157:21: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:157:21: call_function: calling ‘create_btsnoop’ from ‘command_merge’
#   60|   	fd = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0644);
#   61|   	if (fd < 0) {
#   62|-> 		perror("failed to output file");
#   63|   		return -1;
#   64|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def684]
bluez-5.85/tools/btsnoop.c:94:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524288)’
bluez-5.85/tools/btsnoop.c:86:14: acquire_resource: opened here
bluez-5.85/tools/btsnoop.c:87:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btsnoop.c:92:15: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:93:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btsnoop.c:94:17: branch_true: ...to here
bluez-5.85/tools/btsnoop.c:94:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/btsnoop.c:94:17: danger: ‘open(path, 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   92|   	len = read(fd, &hdr, BTSNOOP_HDR_SIZE);
#   93|   	if (len < 0 || len != BTSNOOP_HDR_SIZE) {
#   94|-> 		perror("failed to read input header");
#   95|   		close(fd);
#   96|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def685]
bluez-5.85/tools/btsnoop.c:95:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524288)’
bluez-5.85/tools/btsnoop.c:86:14: acquire_resource: opened here
bluez-5.85/tools/btsnoop.c:87:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btsnoop.c:92:15: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:93:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btsnoop.c:94:17: branch_true: ...to here
bluez-5.85/tools/btsnoop.c:95:17: danger: ‘open(path, 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   93|   	if (len < 0 || len != BTSNOOP_HDR_SIZE) {
#   94|   		perror("failed to read input header");
#   95|-> 		close(fd);
#   96|   		return -1;
#   97|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def686]
bluez-5.85/tools/btsnoop.c:99:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 524288)’
bluez-5.85/tools/btsnoop.c:86:14: acquire_resource: opened here
bluez-5.85/tools/btsnoop.c:87:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btsnoop.c:92:15: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:93:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btsnoop.c:99:13: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:99:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btsnoop.c:100:17: branch_true: ...to here
bluez-5.85/tools/btsnoop.c:99:13: danger: ‘open(path, 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#   97|   	}
#   98|   
#   99|-> 	if (memcmp(hdr.id, btsnoop_id, sizeof(btsnoop_id))) {
#  100|   		fprintf(stderr, "not a valid btsnoop header\n");
#  101|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def687]
bluez-5.85/tools/btsnoop.c:99:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_btsnoop(*<unknown>, & type)’
bluez-5.85/tools/btsnoop.c:119:13: enter_function: entry to ‘command_merge’
bluez-5.85/tools/btsnoop.c:129:12: branch_false: following ‘false’ branch (when ‘argc <= 8’)...
bluez-5.85/tools/btsnoop.c:129:12: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:134:21: branch_true: following ‘true’ branch (when ‘num_input < argc’)...
bluez-5.85/tools/btsnoop.c:138:39: branch_true: ...to here
bluez-5.85/tools/btsnoop.c:138:22: call_function: calling ‘open_btsnoop’ from ‘command_merge’
bluez-5.85/tools/btsnoop.c:138:22: return_function: returning to ‘command_merge’ from ‘open_btsnoop’
bluez-5.85/tools/btsnoop.c:139:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/btsnoop.c:142:21: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:142:20: branch_true: following ‘true’ branch...
bluez-5.85/tools/btsnoop.c:143:25: branch_true: ...to here
bluez-5.85/tools/btsnoop.c:99:13: danger: ‘open_btsnoop(*<unknown>, & type)’ leaks here; was opened at [(8)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/7)
#   97|   	}
#   98|   
#   99|-> 	if (memcmp(hdr.id, btsnoop_id, sizeof(btsnoop_id))) {
#  100|   		fprintf(stderr, "not a valid btsnoop header\n");
#  101|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def688]
bluez-5.85/tools/btsnoop.c:99:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_btsnoop(input, & type)’
bluez-5.85/tools/btsnoop.c:409:13: enter_function: entry to ‘command_extract_sdp’
bluez-5.85/tools/btsnoop.c:421:14: call_function: calling ‘open_btsnoop’ from ‘command_extract_sdp’
bluez-5.85/tools/btsnoop.c:421:14: return_function: returning to ‘command_extract_sdp’ from ‘open_btsnoop’
bluez-5.85/tools/btsnoop.c:422:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/btsnoop.c:425:13: branch_false: ...to here
bluez-5.85/tools/btsnoop.c:425:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/btsnoop.c:426:17: branch_true: ...to here
bluez-5.85/tools/btsnoop.c:99:13: danger: ‘open_btsnoop(input, & type)’ leaks here; was opened at [(4)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/3)
#   97|   	}
#   98|   
#   99|-> 	if (memcmp(hdr.id, btsnoop_id, sizeof(btsnoop_id))) {
#  100|   		fprintf(stderr, "not a valid btsnoop header\n");
#  101|   		close(fd);

Error: COMPILER_WARNING: [#def689]
bluez-5.85/tools/btsnoop.c: scope_hint: In function ‘command_extract_eir’
bluez-5.85/tools/btsnoop.c:269:17: warning[-Wunused-but-set-variable=]: variable ‘count’ set but not used
#  269 |         int fd, count = 0;
#      |                 ^~~~~
#  267|   	uint32_t type, toread, flags;
#  268|   	uint16_t opcode;
#  269|-> 	int fd, count = 0;
#  270|   
#  271|   	fd = open_btsnoop(input, &type);

Error: COMPILER_WARNING: [#def690]
bluez-5.85/tools/btsnoop.c: scope_hint: In function ‘command_extract_ad’
bluez-5.85/tools/btsnoop.c:342:17: warning[-Wunused-but-set-variable=]: variable ‘count’ set but not used
#  342 |         int fd, count = 0;
#      |                 ^~~~~
#  340|   	uint32_t type, toread, flags;
#  341|   	uint16_t opcode;
#  342|-> 	int fd, count = 0;
#  343|   
#  344|   	fd = open_btsnoop(input, &type);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def691]
bluez-5.85/tools/ciptool.c:472:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ctl’
bluez-5.85/tools/ciptool.c:459:12: branch_false: following ‘false’ branch (when ‘argc > 0’)...
bluez-5.85/tools/ciptool.c:464:20: branch_false: ...to here
bluez-5.85/tools/ciptool.c:464:20: acquire_resource: socket created here
bluez-5.85/tools/ciptool.c:464:12: branch_false: following ‘false’ branch (when ‘ctl >= 0’)...
bluez-5.85/tools/ciptool.c:464:12: branch_false: ...to here
bluez-5.85/tools/ciptool.c:469:21: branch_true: following ‘true’ branch...
bluez-5.85/tools/ciptool.c:470:21: branch_true: ...to here
bluez-5.85/tools/ciptool.c:472:17: throw: if the called function throws an exception...
bluez-5.85/tools/ciptool.c:472:17: danger: ‘ctl’ leaks here
#  470|   		if (strncmp(command[i].cmd, argv[0], 4) && strncmp(command[i].alt, argv[0], 4))
#  471|   			continue;
#  472|-> 		command[i].func(ctl, &bdaddr, argc, argv);
#  473|   		close(ctl);
#  474|   		exit(0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def692]
bluez-5.85/tools/cltest.c:52:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/cltest.c:41:14: acquire_resource: socket created here
bluez-5.85/tools/cltest.c:42:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/cltest.c:47:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:51:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/cltest.c:52:17: branch_true: ...to here
bluez-5.85/tools/cltest.c:52:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/cltest.c:52:17: danger: ‘fd’ leaks here
#   50|   
#   51|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   52|-> 		perror("Failed to bind transmitter socket");
#   53|   		close(fd);
#   54|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def693]
bluez-5.85/tools/cltest.c:53:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/cltest.c:41:14: acquire_resource: socket created here
bluez-5.85/tools/cltest.c:42:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/cltest.c:47:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:51:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/cltest.c:52:17: branch_true: ...to here
bluez-5.85/tools/cltest.c:53:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/cltest.c:53:17: danger: ‘fd’ leaks here
#   51|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   52|   		perror("Failed to bind transmitter socket");
#   53|-> 		close(fd);
#   54|   		return false;
#   55|   	}

Error: GCC_ANALYZER_WARNING (CWE-666): [#def694]
bluez-5.85/tools/cltest.c:62:13: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘fd’ in wrong phase
bluez-5.85/tools/cltest.c:41:14: acquire_resource: socket created here
bluez-5.85/tools/cltest.c:42:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/cltest.c:47:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:51:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/cltest.c:57:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:62:13: danger: ‘connect’ expects a new socket file descriptor but ‘fd’ is bound
#   60|   	addr.l2_psm = htobs(psm);
#   61|   
#   62|-> 	if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   63|   		perror("Failed to connect transmitter socket");
#   64|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def695]
bluez-5.85/tools/cltest.c:63:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/cltest.c:41:14: acquire_resource: socket created here
bluez-5.85/tools/cltest.c:42:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/cltest.c:47:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:51:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/cltest.c:57:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:62:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/cltest.c:63:17: branch_true: ...to here
bluez-5.85/tools/cltest.c:63:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/cltest.c:63:17: danger: ‘fd’ leaks here
#   61|   
#   62|   	if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   63|-> 		perror("Failed to connect transmitter socket");
#   64|   		close(fd);
#   65|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def696]
bluez-5.85/tools/cltest.c:64:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/cltest.c:41:14: acquire_resource: socket created here
bluez-5.85/tools/cltest.c:42:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/cltest.c:47:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:51:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/cltest.c:57:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:62:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/cltest.c:63:17: branch_true: ...to here
bluez-5.85/tools/cltest.c:64:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/cltest.c:64:17: danger: ‘fd’ leaks here
#   62|   	if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   63|   		perror("Failed to connect transmitter socket");
#   64|-> 		close(fd);
#   65|   		return false;
#   66|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def697]
bluez-5.85/tools/cltest.c:129:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/cltest.c:117:14: acquire_resource: socket created here
bluez-5.85/tools/cltest.c:118:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/cltest.c:123:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:128:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/cltest.c:129:17: branch_true: ...to here
bluez-5.85/tools/cltest.c:129:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/cltest.c:129:17: danger: ‘fd’ leaks here
#  127|   
#  128|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  129|-> 		perror("Failed to bind receiver socket");
#  130|   		close(fd);
#  131|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def698]
bluez-5.85/tools/cltest.c:130:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/cltest.c:117:14: acquire_resource: socket created here
bluez-5.85/tools/cltest.c:118:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/cltest.c:123:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:128:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/cltest.c:129:17: branch_true: ...to here
bluez-5.85/tools/cltest.c:130:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/cltest.c:130:17: danger: ‘fd’ leaks here
#  128|   	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  129|   		perror("Failed to bind receiver socket");
#  130|-> 		close(fd);
#  131|   		return false;
#  132|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def699]
bluez-5.85/tools/cltest.c:134:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/cltest.c:117:14: acquire_resource: socket created here
bluez-5.85/tools/cltest.c:118:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/cltest.c:123:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:128:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/cltest.c:134:9: branch_false: ...to here
bluez-5.85/tools/cltest.c:134:9: throw: if ‘mainloop_add_fd’ throws an exception...
bluez-5.85/tools/cltest.c:134:9: danger: ‘fd’ leaks here
#  132|   	}
#  133|   
#  134|-> 	mainloop_add_fd(fd, EPOLLIN, receiver_callback, NULL, NULL);
#  135|   
#  136|   	return true;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def700]
bluez-5.85/tools/cltest.c:195:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/cltest.c:187:14: acquire_resource: socket created here
bluez-5.85/tools/cltest.c:188:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/cltest.c:193:14: branch_false: ...to here
bluez-5.85/tools/cltest.c:194:12: branch_true: following ‘true’ branch (when ‘dl’ is NULL)...
bluez-5.85/tools/cltest.c:195:17: branch_true: ...to here
bluez-5.85/tools/cltest.c:195:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/cltest.c:195:17: danger: ‘fd’ leaks here
#  193|   	dl = malloc(HCI_MAX_DEV * sizeof(struct hci_dev_req) + sizeof(uint16_t));
#  194|   	if (!dl) {
#  195|-> 		perror("Failed allocate HCI device request memory");
#  196|   		close(fd);
#  197|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def701]
bluez-5.85/tools/cltest.c:196:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/cltest.c:187:14: acquire_resource: socket created here
bluez-5.85/tools/cltest.c:188:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/cltest.c:193:14: branch_false: ...to here
bluez-5.85/tools/cltest.c:194:12: branch_true: following ‘true’ branch (when ‘dl’ is NULL)...
bluez-5.85/tools/cltest.c:195:17: branch_true: ...to here
bluez-5.85/tools/cltest.c:196:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/cltest.c:196:17: danger: ‘fd’ leaks here
#  194|   	if (!dl) {
#  195|   		perror("Failed allocate HCI device request memory");
#  196|-> 		close(fd);
#  197|   		return false;
#  198|   	}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def702]
bluez-5.85/tools/create-image.c:108:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fp’ where non-null expected
bluez-5.85/tools/create-image.c:142:5: enter_function: entry to ‘main’
bluez-5.85/tools/create-image.c:152:20: branch_false: following ‘false’ branch (when ‘opt >= 0’)...
bluez-5.85/tools/create-image.c:155:17: branch_false: ...to here
bluez-5.85/tools/create-image.c:170:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/create-image.c:175:12: branch_false: ...to here
bluez-5.85/tools/create-image.c:175:12: branch_false: following ‘false’ branch (when ‘output_pathname’ is non-NULL)...
bluez-5.85/tools/create-image.c:180:14: branch_false: ...to here
bluez-5.85/tools/create-image.c:180:14: acquire_memory: this call could return NULL
bluez-5.85/tools/create-image.c:182:21: branch_true: following ‘true’ branch...
bluez-5.85/tools/create-image.c:184:52: branch_true: ...to here
bluez-5.85/tools/create-image.c:183:17: call_function: calling ‘write_block’ from ‘main’
#  106|   
#  107|   done:
#  108|-> 	fprintf(fp, HDR_FMT, HDR_MAGIC, ino, mode, 0, 0, 1, 0,
#  109|   		(uintmax_t) st.st_size, 0, 0, 0, 0, namelen + 1, 0, name);
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def703]
bluez-5.85/tools/create-image.c:182:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(output_pathname, "we")’
bluez-5.85/tools/create-image.c:142:5: enter_function: entry to ‘main’
bluez-5.85/tools/create-image.c:152:20: branch_false: following ‘false’ branch (when ‘opt >= 0’)...
bluez-5.85/tools/create-image.c:155:17: branch_false: ...to here
bluez-5.85/tools/create-image.c:170:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/create-image.c:175:12: branch_false: ...to here
bluez-5.85/tools/create-image.c:175:12: branch_false: following ‘false’ branch (when ‘output_pathname’ is non-NULL)...
bluez-5.85/tools/create-image.c:180:14: branch_false: ...to here
bluez-5.85/tools/create-image.c:180:14: acquire_resource: opened here
bluez-5.85/tools/create-image.c:182:21: branch_true: following ‘true’ branch...
bluez-5.85/tools/create-image.c:184:52: branch_true: ...to here
bluez-5.85/tools/create-image.c:183:17: call_function: calling ‘write_block’ from ‘main’
#  180|   	fp = fopen(output_pathname, "we");
#  181|   
#  182|-> 	for (i = 0; file_list[i].source; i++)
#  183|   		write_block(fp, file_list[i].source, ino_cnt++,
#  184|   				file_list[i].mode, file_list[i].target);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def704]
bluez-5.85/tools/create-image.c:182:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(output_pathname, "we")’
bluez-5.85/tools/create-image.c:142:5: enter_function: entry to ‘main’
bluez-5.85/tools/create-image.c:152:20: branch_false: following ‘false’ branch (when ‘opt >= 0’)...
bluez-5.85/tools/create-image.c:155:17: branch_false: ...to here
bluez-5.85/tools/create-image.c:170:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/create-image.c:175:12: branch_false: ...to here
bluez-5.85/tools/create-image.c:175:12: branch_false: following ‘false’ branch (when ‘output_pathname’ is non-NULL)...
bluez-5.85/tools/create-image.c:180:14: branch_false: ...to here
bluez-5.85/tools/create-image.c:180:14: acquire_memory: allocated here
bluez-5.85/tools/create-image.c:182:21: branch_true: following ‘true’ branch...
bluez-5.85/tools/create-image.c:184:52: branch_true: ...to here
bluez-5.85/tools/create-image.c:183:17: call_function: calling ‘write_block’ from ‘main’
#  180|   	fp = fopen(output_pathname, "we");
#  181|   
#  182|-> 	for (i = 0; file_list[i].source; i++)
#  183|   		write_block(fp, file_list[i].source, ino_cnt++,
#  184|   				file_list[i].mode, file_list[i].target);

Error: CPPCHECK_WARNING (CWE-476): [#def705]
bluez-5.85/tools/create-image.c:188: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fp
#  186|   	write_block(fp, NULL, ino_cnt++, 0, "TRAILER!!!");
#  187|   
#  188|-> 	fclose(fp);
#  189|   
#  190|   	return EXIT_SUCCESS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def706]
bluez-5.85/tools/hci-tester.c:927:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:927:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:927:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:927:9: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  925|   	tester_init(&argc, &argv);
#  926|   
#  927|-> 	test_hci_local("Reset", NULL, NULL, test_reset);
#  928|   
#  929|   	test_hci_local("Read Local Version Information", NULL, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def707]
bluez-5.85/tools/hci-tester.c:929:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:929:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:929:9: danger: ‘user’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
#  927|   	test_hci_local("Reset", NULL, NULL, test_reset);
#  928|   
#  929|-> 	test_hci_local("Read Local Version Information", NULL, NULL,
#  930|   				test_read_local_version_information);
#  931|   	test_hci_local("Read Local Supported Commands", NULL, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def708]
bluez-5.85/tools/hci-tester.c:931:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:931:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:931:9: danger: ‘user’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  929|   	test_hci_local("Read Local Version Information", NULL, NULL,
#  930|   				test_read_local_version_information);
#  931|-> 	test_hci_local("Read Local Supported Commands", NULL, NULL,
#  932|   				test_read_local_supported_commands);
#  933|   	test_hci_local("Read Local Supported Features", NULL, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def709]
bluez-5.85/tools/hci-tester.c:933:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:933:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:933:9: danger: ‘user’ leaks here; was allocated at [(10)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/9)
#  931|   	test_hci_local("Read Local Supported Commands", NULL, NULL,
#  932|   				test_read_local_supported_commands);
#  933|-> 	test_hci_local("Read Local Supported Features", NULL, NULL,
#  934|   				test_read_local_supported_features);
#  935|   	test_hci_local("Read Local Extended Features", NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def710]
bluez-5.85/tools/hci-tester.c:935:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:935:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:935:9: danger: ‘user’ leaks here; was allocated at [(13)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/12)
#  933|   	test_hci_local("Read Local Supported Features", NULL, NULL,
#  934|   				test_read_local_supported_features);
#  935|-> 	test_hci_local("Read Local Extended Features", NULL,
#  936|   				setup_features,
#  937|   				test_read_local_extended_features);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def711]
bluez-5.85/tools/hci-tester.c:938:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:938:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:938:9: danger: ‘user’ leaks here; was allocated at [(16)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/15)
#  936|   				setup_features,
#  937|   				test_read_local_extended_features);
#  938|-> 	test_hci_local("Read Buffer Size", NULL, NULL,
#  939|   				test_read_buffer_size);
#  940|   	test_hci_local("Read Country Code", NULL, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def712]
bluez-5.85/tools/hci-tester.c:940:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:940:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:940:9: danger: ‘user’ leaks here; was allocated at [(19)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/18)
#  938|   	test_hci_local("Read Buffer Size", NULL, NULL,
#  939|   				test_read_buffer_size);
#  940|-> 	test_hci_local("Read Country Code", NULL, NULL,
#  941|   				test_read_country_code);
#  942|   	test_hci_local("Read BD_ADDR", NULL, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def713]
bluez-5.85/tools/hci-tester.c:942:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:942:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:942:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:942:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:942:9: danger: ‘user’ leaks here; was allocated at [(22)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/21)
#  940|   	test_hci_local("Read Country Code", NULL, NULL,
#  941|   				test_read_country_code);
#  942|-> 	test_hci_local("Read BD_ADDR", NULL, NULL,
#  943|   				test_read_bd_addr);
#  944|   	test_hci_local("Read Local Supported Codecs", NULL, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def714]
bluez-5.85/tools/hci-tester.c:944:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:942:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:942:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:944:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:944:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:944:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:944:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:944:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:944:9: danger: ‘user’ leaks here; was allocated at [(25)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/24)
#  942|   	test_hci_local("Read BD_ADDR", NULL, NULL,
#  943|   				test_read_bd_addr);
#  944|-> 	test_hci_local("Read Local Supported Codecs", NULL, NULL,
#  945|   				test_read_local_supported_codecs);
#  946|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def715]
bluez-5.85/tools/hci-tester.c:947:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:942:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:942:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:944:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:944:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:944:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:947:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:947:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:947:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:947:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:947:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:947:9: danger: ‘user’ leaks here; was allocated at [(28)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/27)
#  945|   				test_read_local_supported_codecs);
#  946|   
#  947|-> 	test_hci_local("LE Read Accept List Size", NULL, NULL,
#  948|   				test_le_read_accept_list_size);
#  949|   	test_hci_local("LE Clear Accept List", NULL, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def716]
bluez-5.85/tools/hci-tester.c:949:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:942:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:942:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:944:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:944:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:944:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:947:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:947:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:947:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:949:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:949:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:949:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:949:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:949:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:949:9: danger: ‘user’ leaks here; was allocated at [(31)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/30)
#  947|   	test_hci_local("LE Read Accept List Size", NULL, NULL,
#  948|   				test_le_read_accept_list_size);
#  949|-> 	test_hci_local("LE Clear Accept List", NULL, NULL,
#  950|   				test_le_clear_accept_list);
#  951|   	test_hci_local("LE Encrypt", NULL, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def717]
bluez-5.85/tools/hci-tester.c:951:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:942:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:942:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:944:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:944:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:944:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:947:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:947:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:947:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:949:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:949:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:949:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:951:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:951:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:951:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:951:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:951:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:951:9: danger: ‘user’ leaks here; was allocated at [(34)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/33)
#  949|   	test_hci_local("LE Clear Accept List", NULL, NULL,
#  950|   				test_le_clear_accept_list);
#  951|-> 	test_hci_local("LE Encrypt", NULL, NULL,
#  952|   				test_le_encrypt);
#  953|   	test_hci_local("LE Rand", NULL, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def718]
bluez-5.85/tools/hci-tester.c:953:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:942:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:942:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:944:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:944:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:944:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:947:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:947:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:947:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:949:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:949:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:949:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:951:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:951:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:951:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:953:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:953:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:953:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:953:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:953:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:953:9: danger: ‘user’ leaks here; was allocated at [(37)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/36)
#  951|   	test_hci_local("LE Encrypt", NULL, NULL,
#  952|   				test_le_encrypt);
#  953|-> 	test_hci_local("LE Rand", NULL, NULL,
#  954|   				test_le_rand);
#  955|   	test_hci_local("LE Read Local PK", &key_test_data, NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def719]
bluez-5.85/tools/hci-tester.c:955:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:942:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:942:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:944:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:944:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:944:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:947:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:947:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:947:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:949:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:949:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:949:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:951:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:951:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:951:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:953:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:953:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:953:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:955:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:955:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:955:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:955:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:955:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:955:9: danger: ‘user’ leaks here; was allocated at [(40)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/39)
#  953|   	test_hci_local("LE Rand", NULL, NULL,
#  954|   				test_le_rand);
#  955|-> 	test_hci_local("LE Read Local PK", &key_test_data, NULL,
#  956|   				test_le_read_local_pk);
#  957|   	test_hci_local("LE Generate DHKey", &key_test_data,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def720]
bluez-5.85/tools/hci-tester.c:957:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:942:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:942:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:944:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:944:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:944:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:947:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:947:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:947:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:949:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:949:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:949:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:951:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:951:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:951:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:953:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:953:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:953:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:955:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:955:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:955:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:957:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:957:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:957:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:957:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:957:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:957:9: danger: ‘user’ leaks here; was allocated at [(43)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/42)
#  955|   	test_hci_local("LE Read Local PK", &key_test_data, NULL,
#  956|   				test_le_read_local_pk);
#  957|-> 	test_hci_local("LE Generate DHKey", &key_test_data,
#  958|   				setup_le_generate_dhkey,
#  959|   				test_le_generate_dhkey);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def721]
bluez-5.85/tools/hci-tester.c:961:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:942:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:942:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:944:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:944:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:944:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:947:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:947:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:947:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:949:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:949:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:949:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:951:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:951:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:951:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:953:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:953:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:953:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:955:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:955:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:955:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:957:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:957:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:957:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:961:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:961:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:961:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:961:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:961:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:961:9: danger: ‘user’ leaks here; was allocated at [(46)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/45)
#  959|   				test_le_generate_dhkey);
#  960|   
#  961|-> 	test_hci_local("Inquiry (LIAC)", NULL, NULL, test_inquiry_liac);
#  962|   
#  963|   	test_hci("Create Connection", NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def722]
bluez-5.85/tools/hci-tester.c:963:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/hci-tester.c:927:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:927:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:929:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:929:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:929:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:931:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:931:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:931:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:933:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:933:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:933:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:935:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:935:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:935:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:938:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:938:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:938:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:940:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:940:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:940:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:942:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:942:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:942:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:944:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:944:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:944:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:947:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:947:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:947:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:949:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:949:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:949:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:951:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:951:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:951:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:953:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:953:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:953:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:955:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:955:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:955:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:957:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:957:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:957:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:961:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:961:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:961:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/hci-tester.c:963:9: branch_true: ...to here
bluez-5.85/tools/hci-tester.c:963:9: acquire_memory: allocated here
bluez-5.85/tools/hci-tester.c:963:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/hci-tester.c:963:9: branch_false: ...to here
bluez-5.85/tools/hci-tester.c:963:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/hci-tester.c:963:9: danger: ‘user’ leaks here; was allocated at [(49)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/48)
#  961|   	test_hci_local("Inquiry (LIAC)", NULL, NULL, test_inquiry_liac);
#  962|   
#  963|-> 	test_hci("Create Connection", NULL,
#  964|   				setup_lt_connectable,
#  965|   				test_create_connection,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def723]
bluez-5.85/tools/hciattach_ath3k.c:94:15: warning[-Wanalyzer-malloc-leak]: leak of ‘hci_event’
bluez-5.85/tools/hciattach_ath3k.c:90:32: acquire_memory: allocated here
bluez-5.85/tools/hciattach_ath3k.c:91:12: branch_false: following ‘false’ branch (when ‘hci_event’ is non-NULL)...
bluez-5.85/tools/hciattach_ath3k.c:94:15: branch_false: ...to here
bluez-5.85/tools/hciattach_ath3k.c:94:15: throw: if ‘read_hci_event’ throws an exception...
bluez-5.85/tools/hciattach_ath3k.c:94:15: danger: ‘hci_event’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   92|   		return -ENOMEM;
#   93|   
#   94|-> 	err = read_hci_event(dev, (unsigned char *)hci_event, PS_EVENT_LEN);
#   95|   	if (err > 0) {
#   96|   		*event = hci_event;

Error: COMPILER_WARNING (CWE-704): [#def724]
bluez-5.85/tools/hciattach_ath3k.c: scope_hint: In function ‘update_char_count’
bluez-5.85/tools/hciattach_ath3k.c:309:25: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  309 |                 end_ptr = strstr(buf, "]");
#      |                         ^
#  307|   
#  308|   	if (strstr(buf, "[") == buf) {
#  309|-> 		end_ptr = strstr(buf, "]");
#  310|   		if (!end_ptr)
#  311|   			return 0;

Error: COMPILER_WARNING (CWE-704): [#def725]
bluez-5.85/tools/hciattach_ath3k.c:309:25: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  307|   
#  308|   	if (strstr(buf, "[") == buf) {
#  309|-> 		end_ptr = strstr(buf, "]");
#  310|   		if (!end_ptr)
#  311|   			return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def726]
bluez-5.85/tools/hciattach_bcm43xx.c:56:13: warning[-Wanalyzer-malloc-leak]: leak of ‘resp’
bluez-5.85/tools/hciattach_bcm43xx.c:50:16: acquire_memory: allocated here
bluez-5.85/tools/hciattach_bcm43xx.c:51:12: branch_false: following ‘false’ branch (when ‘resp’ is non-NULL)...
bluez-5.85/tools/hciattach_bcm43xx.c:54:9: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:56:13: throw: if ‘write’ throws an exception...
bluez-5.85/tools/hciattach_bcm43xx.c:56:13: danger: ‘resp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   54|   	tcflush(fd, TCIOFLUSH);
#   55|   
#   56|-> 	if (write(fd, cmd, sizeof(cmd)) != sizeof(cmd)) {
#   57|   		fprintf(stderr, "Failed to write read local name command\n");
#   58|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def727]
bluez-5.85/tools/hciattach_bcm43xx.c:61:13: warning[-Wanalyzer-malloc-leak]: leak of ‘resp’
bluez-5.85/tools/hciattach_bcm43xx.c:50:16: acquire_memory: allocated here
bluez-5.85/tools/hciattach_bcm43xx.c:51:12: branch_false: following ‘false’ branch (when ‘resp’ is non-NULL)...
bluez-5.85/tools/hciattach_bcm43xx.c:54:9: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:56:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_bcm43xx.c:61:13: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:61:13: throw: if ‘read_hci_event’ throws an exception...
bluez-5.85/tools/hciattach_bcm43xx.c:61:13: danger: ‘resp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   59|   	}
#   60|   
#   61|-> 	if (read_hci_event(fd, resp, size) < CC_MIN_SIZE) {
#   62|   		fprintf(stderr, "Failed to read local name, invalid HCI event\n");
#   63|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def728]
bluez-5.85/tools/hciattach_bcm43xx.c:231:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fw, 0)’
bluez-5.85/tools/hciattach_bcm43xx.c:223:17: acquire_resource: opened here
bluez-5.85/tools/hciattach_bcm43xx.c:224:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_bcm43xx.c:229:9: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:231:13: throw: if ‘write’ throws an exception...
bluez-5.85/tools/hciattach_bcm43xx.c:231:13: danger: ‘open(fw, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  229|   	tcflush(fd, TCIOFLUSH);
#  230|   
#  231|-> 	if (write(fd, cmd, sizeof(cmd)) != sizeof(cmd)) {
#  232|   		fprintf(stderr, "Failed to write download mode command\n");
#  233|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def729]
bluez-5.85/tools/hciattach_bcm43xx.c:232:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fw, 0)’
bluez-5.85/tools/hciattach_bcm43xx.c:223:17: acquire_resource: opened here
bluez-5.85/tools/hciattach_bcm43xx.c:224:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_bcm43xx.c:229:9: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:232:17: danger: ‘open(fw, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  230|   
#  231|   	if (write(fd, cmd, sizeof(cmd)) != sizeof(cmd)) {
#  232|-> 		fprintf(stderr, "Failed to write download mode command\n");
#  233|   		goto fail;
#  234|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def730]
bluez-5.85/tools/hciattach_bcm43xx.c:236:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fw, 0)’
bluez-5.85/tools/hciattach_bcm43xx.c:223:17: acquire_resource: opened here
bluez-5.85/tools/hciattach_bcm43xx.c:224:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_bcm43xx.c:229:9: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:231:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_bcm43xx.c:236:13: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:236:13: throw: if ‘read_hci_event’ throws an exception...
bluez-5.85/tools/hciattach_bcm43xx.c:236:13: danger: ‘open(fw, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  234|   	}
#  235|   
#  236|-> 	if (read_hci_event(fd, resp, sizeof(resp)) < CC_MIN_SIZE) {
#  237|   		fprintf(stderr, "Failed to load firmware, invalid HCI event\n");
#  238|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def731]
bluez-5.85/tools/hciattach_bcm43xx.c:241:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fw, 0)’
bluez-5.85/tools/hciattach_bcm43xx.c:223:17: acquire_resource: opened here
bluez-5.85/tools/hciattach_bcm43xx.c:224:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_bcm43xx.c:229:9: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:231:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_bcm43xx.c:236:13: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:236:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_bcm43xx.c:241:13: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:241:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_bcm43xx.c:247:9: throw: if ‘nanosleep’ throws an exception...
bluez-5.85/tools/hciattach_bcm43xx.c:241:13: danger: ‘open(fw, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  239|   	}
#  240|   
#  241|-> 	if (resp[4] != cmd[1] || resp[5] != cmd[2] || resp[6] != CMD_SUCCESS) {
#  242|   		fprintf(stderr, "Failed to load firmware, command failure\n");
#  243|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def732]
bluez-5.85/tools/hciattach_bcm43xx.c:301:40: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dir_name)’
bluez-5.85/tools/hciattach_bcm43xx.c:292:15: acquire_memory: allocated here
bluez-5.85/tools/hciattach_bcm43xx.c:293:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_bcm43xx.c:293:12: branch_false: ...to here
bluez-5.85/tools/hciattach_bcm43xx.c:301:40: throw: if ‘readdir’ throws an exception...
bluez-5.85/tools/hciattach_bcm43xx.c:301:40: danger: ‘opendir(dir_name)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  299|   	/* Recursively look for a BCM43XX*.hcd */
#  300|   	while (1) {
#  301|-> 		struct dirent *entry = readdir(dir);
#  302|   		if (!entry)
#  303|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def733]
bluez-5.85/tools/hciattach_qualcomm.c:93:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(firmware, 0)’
bluez-5.85/tools/hciattach_qualcomm.c:91:18: acquire_resource: opened here
bluez-5.85/tools/hciattach_qualcomm.c:95:9: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_qualcomm.c:99:9: branch_false: ...to here
bluez-5.85/tools/hciattach_qualcomm.c:108:20: branch_false: following ‘false’ branch (when ‘nr != 0’)...
bluez-5.85/tools/hciattach_qualcomm.c:111:17: branch_false: ...to here
bluez-5.85/tools/hciattach_qualcomm.c:93:9: danger: ‘open(firmware, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   91|   	int fw = open(firmware, O_RDONLY);
#   92|   
#   93|-> 	fprintf(stdout, "Opening firmware file: %s\n", firmware);
#   94|   
#   95|   	FAILIF(fw < 0,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def734]
bluez-5.85/tools/hciattach_ti.c:113:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file_name, "rb")’
bluez-5.85/tools/hciattach_ti.c:374:12: enter_function: entry to ‘brf_do_script’
bluez-5.85/tools/hciattach_ti.c:384:12: branch_true: following ‘true’ branch (when ‘bts_file’ is non-NULL)...
bluez-5.85/tools/hciattach_ti.c:386:35: branch_true: ...to here
bluez-5.85/tools/hciattach_ti.c:386:35: call_function: calling ‘bts_load_script’ from ‘brf_do_script’
#  111|   
#  112|   	if (1 != fread(&header, sizeof(struct bts_header), 1, fp)) {
#  113|-> 		perror("can't read firmware file");
#  114|   		goto errclose;
#  115|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def735]
bluez-5.85/tools/hciattach_ti.c:113:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file_name, "rb")’
bluez-5.85/tools/hciattach_ti.c:374:12: enter_function: entry to ‘brf_do_script’
bluez-5.85/tools/hciattach_ti.c:384:12: branch_true: following ‘true’ branch (when ‘bts_file’ is non-NULL)...
bluez-5.85/tools/hciattach_ti.c:386:35: branch_true: ...to here
bluez-5.85/tools/hciattach_ti.c:386:35: call_function: calling ‘bts_load_script’ from ‘brf_do_script’
#  111|   
#  112|   	if (1 != fread(&header, sizeof(struct bts_header), 1, fp)) {
#  113|-> 		perror("can't read firmware file");
#  114|   		goto errclose;
#  115|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def736]
bluez-5.85/tools/hciattach_tialt.c:95:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(firmware, 0)’
bluez-5.85/tools/hciattach_tialt.c:93:18: acquire_resource: opened here
bluez-5.85/tools/hciattach_tialt.c:97:9: branch_false: following ‘false’ branch...
bluez-5.85/tools/hciattach_tialt.c:101:9: branch_false: ...to here
bluez-5.85/tools/hciattach_tialt.c:109:20: branch_false: following ‘false’ branch (when ‘nr != 0’)...
bluez-5.85/tools/hciattach_tialt.c:111:17: branch_false: ...to here
bluez-5.85/tools/hciattach_tialt.c:95:9: danger: ‘open(firmware, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   93|   	int fw = open(firmware, O_RDONLY);
#   94|   
#   95|-> 	fprintf(stdout, "Opening firmware file: %s\n", firmware);
#   96|   
#   97|   	FAILIF(fw < 0,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def737]
bluez-5.85/tools/hciconfig.c:51:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ctl’
bluez-5.85/tools/hciconfig.c:2003:5: enter_function: entry to ‘main’
bluez-5.85/tools/hciconfig.c:2025:20: acquire_resource: socket created here
bluez-5.85/tools/hciconfig.c:2025:12: branch_false: following ‘false’ branch (when ‘ctl >= 0’)...
bluez-5.85/tools/hciconfig.c:2030:12: branch_false: ...to here
bluez-5.85/tools/hciconfig.c:2030:12: branch_true: following ‘true’ branch (when ‘argc <= 0’)...
bluez-5.85/tools/hciconfig.c:2031:17: branch_true: ...to here
bluez-5.85/tools/hciconfig.c:2031:17: call_function: calling ‘print_dev_list’ from ‘main’
#   49|   	if (!(dl = malloc(HCI_MAX_DEV * sizeof(struct hci_dev_req) +
#   50|   		sizeof(uint16_t)))) {
#   51|-> 		perror("Can't allocate memory");
#   52|   		exit(1);
#   53|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def738]
bluez-5.85/tools/hcidump.c:174:28: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/tools/hcidump.c:140:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/tools/hcidump.c:143:13: branch_false: ...to here
bluez-5.85/tools/hcidump.c:149:15: acquire_memory: allocated here
bluez-5.85/tools/hcidump.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/tools/hcidump.c:157:20: branch_false: ...to here
bluez-5.85/tools/hcidump.c:174:28: throw: if ‘poll’ throws an exception...
bluez-5.85/tools/hcidump.c:174:28: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  172|   
#  173|   	while (1) {
#  174|-> 		int i, n = poll(fds, nfds, -1);
#  175|   		if (n <= 0)
#  176|   			continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def739]
bluez-5.85/tools/hcidump.c:196:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/tools/hcidump.c:140:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/tools/hcidump.c:143:13: branch_false: ...to here
bluez-5.85/tools/hcidump.c:149:15: acquire_memory: allocated here
bluez-5.85/tools/hcidump.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/tools/hcidump.c:157:20: branch_false: ...to here
bluez-5.85/tools/hcidump.c:178:29: branch_true: following ‘true’ branch (when ‘i == 0’)...
bluez-5.85/tools/hcidump.c:179:29: branch_true: ...to here
bluez-5.85/tools/hcidump.c:179:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/hcidump.c:179:28: branch_false: ...to here
bluez-5.85/tools/hcidump.c:196:23: throw: if ‘recvmsg’ throws an exception...
bluez-5.85/tools/hcidump.c:196:23: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  194|   		msg.msg_controllen = 100;
#  195|   
#  196|-> 		len = recvmsg(sock, &msg, MSG_DONTWAIT);
#  197|   		if (len < 0) {
#  198|   			if (errno == EAGAIN || errno == EINTR)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def740]
bluez-5.85/tools/hcidump.c:240:39: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘frm.ts.tv_sec’
bluez-5.85/tools/hcidump.c:140:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/tools/hcidump.c:143:13: branch_false: ...to here
bluez-5.85/tools/hcidump.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/tools/hcidump.c:157:20: branch_false: ...to here
bluez-5.85/tools/hcidump.c:178:29: branch_true: following ‘true’ branch (when ‘i == 0’)...
bluez-5.85/tools/hcidump.c:179:29: branch_true: ...to here
bluez-5.85/tools/hcidump.c:179:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/hcidump.c:179:28: branch_false: ...to here
bluez-5.85/tools/hcidump.c:197:20: branch_false: following ‘false’ branch (when ‘len >= 0’)...
bluez-5.85/tools/hcidump.c:205:17: branch_false: ...to here
bluez-5.85/tools/hcidump.c:212:24: branch_false: following ‘false’ branch (when ‘cmsg’ is NULL)...
bluez-5.85/tools/hcidump.c:227:27: branch_false: ...to here
bluez-5.85/tools/hcidump.c:230:17: branch_true: following ‘true’ branch...
bluez-5.85/tools/hcidump.c:231:17: branch_true: ...to here
bluez-5.85/tools/hcidump.c:233:28: branch_true: following ‘true’ branch...
bluez-5.85/tools/hcidump.c:235:41: branch_true: ...to here
bluez-5.85/tools/hcidump.c:240:39: danger: use of uninitialized value ‘frm.ts.tv_sec’ here
#  238|   				dp->flags = be32toh(frm.in & 0x01);
#  239|   				dp->drops = 0;
#  240|-> 				ts = (frm.ts.tv_sec - 946684800ll) * 1000000ll + frm.ts.tv_usec;
#  241|   				dp->ts = htobe64(ts + 0x00E03AB44A676000ll);
#  242|   				if (pkt_type == HCI_COMMAND_PKT ||

Error: GCC_ANALYZER_WARNING (CWE-457): [#def741]
bluez-5.85/tools/hcidump.c:248:47: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘frm.ts.tv_sec’
bluez-5.85/tools/hcidump.c:140:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/tools/hcidump.c:143:13: branch_false: ...to here
bluez-5.85/tools/hcidump.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/tools/hcidump.c:157:20: branch_false: ...to here
bluez-5.85/tools/hcidump.c:178:29: branch_true: following ‘true’ branch (when ‘i == 0’)...
bluez-5.85/tools/hcidump.c:179:29: branch_true: ...to here
bluez-5.85/tools/hcidump.c:179:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/hcidump.c:179:28: branch_false: ...to here
bluez-5.85/tools/hcidump.c:197:20: branch_false: following ‘false’ branch (when ‘len >= 0’)...
bluez-5.85/tools/hcidump.c:205:17: branch_false: ...to here
bluez-5.85/tools/hcidump.c:212:24: branch_false: following ‘false’ branch (when ‘cmsg’ is NULL)...
bluez-5.85/tools/hcidump.c:227:27: branch_false: ...to here
bluez-5.85/tools/hcidump.c:230:17: branch_true: following ‘true’ branch...
bluez-5.85/tools/hcidump.c:231:17: branch_true: ...to here
bluez-5.85/tools/hcidump.c:233:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/hcidump.c:246:33: branch_false: ...to here
bluez-5.85/tools/hcidump.c:248:47: danger: use of uninitialized value ‘frm.ts.tv_sec’ here
#  246|   				dh->len = htobs(frm.data_len);
#  247|   				dh->in  = frm.in;
#  248|-> 				dh->ts_sec  = htobl(frm.ts.tv_sec);
#  249|   				dh->ts_usec = htobl(frm.ts.tv_usec);
#  250|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def742]
bluez-5.85/tools/hcidump.c:266:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
bluez-5.85/tools/hcidump.c:140:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
bluez-5.85/tools/hcidump.c:143:13: branch_false: ...to here
bluez-5.85/tools/hcidump.c:149:15: acquire_memory: allocated here
bluez-5.85/tools/hcidump.c:150:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
bluez-5.85/tools/hcidump.c:157:20: branch_false: ...to here
bluez-5.85/tools/hcidump.c:178:29: branch_true: following ‘true’ branch (when ‘i == 0’)...
bluez-5.85/tools/hcidump.c:179:29: branch_true: ...to here
bluez-5.85/tools/hcidump.c:266:1: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  264|   
#  265|   	return 0;
#  266|-> }
#  267|   
#  268|   static void read_dump(int fd)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def743]
bluez-5.85/tools/hcidump.c:421:9: warning[-Wanalyzer-malloc-leak]: leak of ‘frm.data’
bluez-5.85/tools/hcidump.c:268:13: enter_function: entry to ‘read_dump’
bluez-5.85/tools/hcidump.c:276:20: acquire_memory: allocated here
bluez-5.85/tools/hcidump.c:277:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hcidump.c:277:12: branch_false: ...to here
bluez-5.85/tools/hcidump.c:284:31: call_function: calling ‘read_n’ from ‘read_dump’
bluez-5.85/tools/hcidump.c:284:31: return_function: returning to ‘read_dump’ from ‘read_n’
bluez-5.85/tools/hcidump.c:421:9: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/hcidump.c:421:9: danger: ‘frm.data’ leaks here; was allocated at [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
#  419|   
#  420|   failed:
#  421|-> 	perror("Read failed");
#  422|   	free(frm.data);
#  423|   	exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def744]
bluez-5.85/tools/hex2hcd.c:170:14: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
bluez-5.85/tools/hex2hcd.c:385:5: enter_function: entry to ‘main’
bluez-5.85/tools/hex2hcd.c:395:20: branch_false: following ‘false’ branch (when ‘opt >= 0’)...
bluez-5.85/tools/hex2hcd.c:398:17: branch_false: ...to here
bluez-5.85/tools/hex2hcd.c:416:12: branch_false: following ‘false’ branch (when ‘print_table == 0’)...
bluez-5.85/tools/hex2hcd.c:421:13: branch_false: ...to here
bluez-5.85/tools/hex2hcd.c:421:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/hex2hcd.c:426:12: branch_false: ...to here
bluez-5.85/tools/hex2hcd.c:426:13: branch_false: following ‘false’ branch...
bluez-5.85/tools/hex2hcd.c:426:13: branch_false: ...to here
bluez-5.85/tools/hex2hcd.c:431:26: branch_true: following ‘true’ branch (when ‘i < argc’)...
bluez-5.85/tools/hex2hcd.c:432:34: branch_true: ...to here
bluez-5.85/tools/hex2hcd.c:432:17: call_function: calling ‘convert_file’ from ‘main’
#  168|   	printf("Converting %s to %s\n", input_path, path);
#  169|   
#  170|-> 	fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
#  171|   
#  172|   	free(path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def745]
bluez-5.85/tools/hex2hcd.c:320:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopendir(open(pathname, 0))’
bluez-5.85/tools/hex2hcd.c:335:13: enter_function: entry to ‘ver_print_table’
bluez-5.85/tools/hex2hcd.c:344:12: branch_false: following ‘false’ branch (when ‘argc <= 0’)...
bluez-5.85/tools/hex2hcd.c:350:17: branch_false: ...to here
bluez-5.85/tools/hex2hcd.c:350:17: call_function: calling ‘ver_parse_entry’ from ‘ver_print_table’
#  318|   			struct dirent *d;
#  319|   
#  320|-> 			d = readdir(dir);
#  321|   			if (!d)
#  322|   				break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def746]
bluez-5.85/tools/iso-tester.c:2030:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3692:13: enter_function: entry to ‘test_connect_close’
bluez-5.85/tools/iso-tester.c:3704:14: call_function: calling ‘setup_sock’ from ‘test_connect_close’
# 2028|   	}
# 2029|   
# 2030|-> 	master_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
# 2031|   	if (!master_bdaddr) {
# 2032|   		tester_warn("No master bdaddr");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def747]
bluez-5.85/tools/iso-tester.c:2032:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3692:13: enter_function: entry to ‘test_connect_close’
bluez-5.85/tools/iso-tester.c:3704:14: call_function: calling ‘setup_sock’ from ‘test_connect_close’
# 2030|   	master_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
# 2031|   	if (!master_bdaddr) {
# 2032|-> 		tester_warn("No master bdaddr");
# 2033|   		close(sk);
# 2034|   		return -ENODEV;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def748]
bluez-5.85/tools/iso-tester.c:2033:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3692:13: enter_function: entry to ‘test_connect_close’
bluez-5.85/tools/iso-tester.c:3704:14: call_function: calling ‘setup_sock’ from ‘test_connect_close’
# 2031|   	if (!master_bdaddr) {
# 2032|   		tester_warn("No master bdaddr");
# 2033|-> 		close(sk);
# 2034|   		return -ENODEV;
# 2035|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def749]
bluez-5.85/tools/iso-tester.c:2039: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 2037|   	if (isodata->bcast && isodata->sid) {
# 2038|   		addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
# 2039|-> 		memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
# 2040|   		addr->iso_family = AF_BLUETOOTH;
# 2041|   		bacpy(&addr->iso_bdaddr, (void *) master_bdaddr);

Error: CPPCHECK_WARNING (CWE-476): [#def750]
bluez-5.85/tools/iso-tester.c:2040: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 2038|   		addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
# 2039|   		memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
# 2040|-> 		addr->iso_family = AF_BLUETOOTH;
# 2041|   		bacpy(&addr->iso_bdaddr, (void *) master_bdaddr);
# 2042|   		addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def751]
bluez-5.85/tools/iso-tester.c:2040:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘addr’
bluez-5.85/tools/iso-tester.c:3692:13: enter_function: entry to ‘test_connect_close’
bluez-5.85/tools/iso-tester.c:3704:14: call_function: calling ‘setup_sock’ from ‘test_connect_close’
# 2038|   		addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
# 2039|   		memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
# 2040|-> 		addr->iso_family = AF_BLUETOOTH;
# 2041|   		bacpy(&addr->iso_bdaddr, (void *) master_bdaddr);
# 2042|   		addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;

Error: CPPCHECK_WARNING (CWE-476): [#def752]
bluez-5.85/tools/iso-tester.c:2042: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 2040|   		addr->iso_family = AF_BLUETOOTH;
# 2041|   		bacpy(&addr->iso_bdaddr, (void *) master_bdaddr);
# 2042|-> 		addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;
# 2043|   		addr->iso_bc->bc_bdaddr_type = BDADDR_LE_PUBLIC;
# 2044|   		addr->iso_bc->bc_sid = isodata->sid;

Error: CPPCHECK_WARNING (CWE-476): [#def753]
bluez-5.85/tools/iso-tester.c:2043: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 2041|   		bacpy(&addr->iso_bdaddr, (void *) master_bdaddr);
# 2042|   		addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;
# 2043|-> 		addr->iso_bc->bc_bdaddr_type = BDADDR_LE_PUBLIC;
# 2044|   		addr->iso_bc->bc_sid = isodata->sid;
# 2045|   		err = bind(sk, (struct sockaddr *) addr, sizeof(*addr) +

Error: CPPCHECK_WARNING (CWE-476): [#def754]
bluez-5.85/tools/iso-tester.c:2044: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 2042|   		addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;
# 2043|   		addr->iso_bc->bc_bdaddr_type = BDADDR_LE_PUBLIC;
# 2044|-> 		addr->iso_bc->bc_sid = isodata->sid;
# 2045|   		err = bind(sk, (struct sockaddr *) addr, sizeof(*addr) +
# 2046|   						sizeof(*addr->iso_bc));

Error: CPPCHECK_WARNING (CWE-476): [#def755]
bluez-5.85/tools/iso-tester.c:2050: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 2048|   	} else {
# 2049|   		addr = malloc(sizeof(*addr));
# 2050|-> 		memset(addr, 0, sizeof(*addr));
# 2051|   		addr->iso_family = AF_BLUETOOTH;
# 2052|   		bacpy(&addr->iso_bdaddr, (void *) master_bdaddr);

Error: CPPCHECK_WARNING (CWE-476): [#def756]
bluez-5.85/tools/iso-tester.c:2051: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 2049|   		addr = malloc(sizeof(*addr));
# 2050|   		memset(addr, 0, sizeof(*addr));
# 2051|-> 		addr->iso_family = AF_BLUETOOTH;
# 2052|   		bacpy(&addr->iso_bdaddr, (void *) master_bdaddr);
# 2053|   		addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def757]
bluez-5.85/tools/iso-tester.c:2051:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘addr’
bluez-5.85/tools/iso-tester.c:3692:13: enter_function: entry to ‘test_connect_close’
bluez-5.85/tools/iso-tester.c:3704:14: call_function: calling ‘setup_sock’ from ‘test_connect_close’
# 2049|   		addr = malloc(sizeof(*addr));
# 2050|   		memset(addr, 0, sizeof(*addr));
# 2051|-> 		addr->iso_family = AF_BLUETOOTH;
# 2052|   		bacpy(&addr->iso_bdaddr, (void *) master_bdaddr);
# 2053|   		addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;

Error: CPPCHECK_WARNING (CWE-476): [#def758]
bluez-5.85/tools/iso-tester.c:2053: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 2051|   		addr->iso_family = AF_BLUETOOTH;
# 2052|   		bacpy(&addr->iso_bdaddr, (void *) master_bdaddr);
# 2053|-> 		addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;
# 2054|   		err = bind(sk, (struct sockaddr *) addr, sizeof(*addr));
# 2055|   		free(addr);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def759]
bluez-5.85/tools/iso-tester.c:2060:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3692:13: enter_function: entry to ‘test_connect_close’
bluez-5.85/tools/iso-tester.c:3704:14: call_function: calling ‘setup_sock’ from ‘test_connect_close’
# 2058|   	if (err < 0) {
# 2059|   		err = -errno;
# 2060|-> 		tester_warn("Can't bind socket: %s (%d)", strerror(errno),
# 2061|   									errno);
# 2062|   		close(sk);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def760]
bluez-5.85/tools/iso-tester.c:2062:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3692:13: enter_function: entry to ‘test_connect_close’
bluez-5.85/tools/iso-tester.c:3704:14: call_function: calling ‘setup_sock’ from ‘test_connect_close’
# 2060|   		tester_warn("Can't bind socket: %s (%d)", strerror(errno),
# 2061|   									errno);
# 2062|-> 		close(sk);
# 2063|   		return err;
# 2064|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def761]
bluez-5.85/tools/iso-tester.c:2765: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 2763|   	/* Bind to local address */
# 2764|   	addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
# 2765|-> 	memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
# 2766|   	addr->iso_family = AF_BLUETOOTH;
# 2767|   

Error: CPPCHECK_WARNING (CWE-476): [#def762]
bluez-5.85/tools/iso-tester.c:2766: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 2764|   	addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
# 2765|   	memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
# 2766|-> 	addr->iso_family = AF_BLUETOOTH;
# 2767|   
# 2768|   	/* Bind to destination address in case of broadcast */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def763]
bluez-5.85/tools/iso-tester.c:3195:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3193|   	}
# 3194|   
# 3195|-> 	src = hciemu_get_central_bdaddr(data->hciemu);
# 3196|   	if (!src) {
# 3197|   		tester_warn("No source bdaddr");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def764]
bluez-5.85/tools/iso-tester.c:3197:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3195|   	src = hciemu_get_central_bdaddr(data->hciemu);
# 3196|   	if (!src) {
# 3197|-> 		tester_warn("No source bdaddr");
# 3198|   		err = -ENODEV;
# 3199|   		goto fail;

Error: CPPCHECK_WARNING (CWE-476): [#def765]
bluez-5.85/tools/iso-tester.c:3204: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 3202|   	/* Bind to local address */
# 3203|   	addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
# 3204|-> 	memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
# 3205|   	addr->iso_family = AF_BLUETOOTH;
# 3206|   	bacpy(&addr->iso_bdaddr, (void *) src);

Error: CPPCHECK_WARNING (CWE-476): [#def766]
bluez-5.85/tools/iso-tester.c:3205: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 3203|   	addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
# 3204|   	memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
# 3205|-> 	addr->iso_family = AF_BLUETOOTH;
# 3206|   	bacpy(&addr->iso_bdaddr, (void *) src);
# 3207|   	addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def767]
bluez-5.85/tools/iso-tester.c:3205:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘addr’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3203|   	addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
# 3204|   	memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
# 3205|-> 	addr->iso_family = AF_BLUETOOTH;
# 3206|   	bacpy(&addr->iso_bdaddr, (void *) src);
# 3207|   	addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;

Error: CPPCHECK_WARNING (CWE-476): [#def768]
bluez-5.85/tools/iso-tester.c:3207: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 3205|   	addr->iso_family = AF_BLUETOOTH;
# 3206|   	bacpy(&addr->iso_bdaddr, (void *) src);
# 3207|-> 	addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;
# 3208|   
# 3209|   	if (isodata->bcast) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def769]
bluez-5.85/tools/iso-tester.c:3212:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3210|   		struct hciemu_client *client;
# 3211|   
# 3212|-> 		client = hciemu_get_client(data->hciemu, num);
# 3213|   
# 3214|   		/* Bind to destination address in case of broadcast */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def770]
bluez-5.85/tools/iso-tester.c:3212:26: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3210|   		struct hciemu_client *client;
# 3211|   
# 3212|-> 		client = hciemu_get_client(data->hciemu, num);
# 3213|   
# 3214|   		/* Bind to destination address in case of broadcast */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def771]
bluez-5.85/tools/iso-tester.c:3215:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3213|   
# 3214|   		/* Bind to destination address in case of broadcast */
# 3215|-> 		dst = hciemu_client_bdaddr(client);
# 3216|   		if (!dst) {
# 3217|   			tester_warn("No source bdaddr");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def772]
bluez-5.85/tools/iso-tester.c:3215:23: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3213|   
# 3214|   		/* Bind to destination address in case of broadcast */
# 3215|-> 		dst = hciemu_client_bdaddr(client);
# 3216|   		if (!dst) {
# 3217|   			tester_warn("No source bdaddr");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def773]
bluez-5.85/tools/iso-tester.c:3217:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3215|   		dst = hciemu_client_bdaddr(client);
# 3216|   		if (!dst) {
# 3217|-> 			tester_warn("No source bdaddr");
# 3218|   			err = -ENODEV;
# 3219|   			goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def774]
bluez-5.85/tools/iso-tester.c:3217:25: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3215|   		dst = hciemu_client_bdaddr(client);
# 3216|   		if (!dst) {
# 3217|-> 			tester_warn("No source bdaddr");
# 3218|   			err = -ENODEV;
# 3219|   			goto fail;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def775]
bluez-5.85/tools/iso-tester.c:3239:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3237|   	if (err < 0) {
# 3238|   		err = -errno;
# 3239|-> 		tester_warn("Can't bind socket: %s (%d)", strerror(errno),
# 3240|   									errno);
# 3241|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def776]
bluez-5.85/tools/iso-tester.c:3239:17: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3237|   	if (err < 0) {
# 3238|   		err = -errno;
# 3239|-> 		tester_warn("Can't bind socket: %s (%d)", strerror(errno),
# 3240|   									errno);
# 3241|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def777]
bluez-5.85/tools/iso-tester.c:3249:25: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3247|   		if (setsockopt(sk, SOL_BLUETOOTH, BT_DEFER_SETUP, &opt,
# 3248|   							sizeof(opt)) < 0) {
# 3249|-> 			tester_print("Can't enable deferred setup: %s (%d)",
# 3250|   						strerror(errno), errno);
# 3251|   			goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def778]
bluez-5.85/tools/iso-tester.c:3257:17: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/tools/iso-tester.c:3851:13: enter_function: entry to ‘test_bcast_recv_defer’
bluez-5.85/tools/iso-tester.c:3857:9: call_function: inlined call to ‘setup_listen’ from ‘test_bcast_recv_defer’
# 3255|   	if (setsockopt(sk, SOL_BLUETOOTH, BT_ISO_QOS, &isodata->qos,
# 3256|   						sizeof(isodata->qos)) < 0) {
# 3257|-> 		tester_print("Can't set socket BT_ISO_QOS option: %s (%d)",
# 3258|   					strerror(errno), errno);
# 3259|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def779]
bluez-5.85/tools/iso-tester.c:3264:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3851:13: enter_function: entry to ‘test_bcast_recv_defer’
bluez-5.85/tools/iso-tester.c:3857:9: call_function: inlined call to ‘setup_listen’ from ‘test_bcast_recv_defer’
# 3262|   	if (listen(sk, 10)) {
# 3263|   		err = -errno;
# 3264|-> 		tester_warn("Can't listen socket: %s (%d)", strerror(errno),
# 3265|   									errno);
# 3266|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def780]
bluez-5.85/tools/iso-tester.c:3264:17: warning[-Wanalyzer-malloc-leak]: leak of ‘addr’
bluez-5.85/tools/iso-tester.c:3851:13: enter_function: entry to ‘test_bcast_recv_defer’
bluez-5.85/tools/iso-tester.c:3857:9: call_function: inlined call to ‘setup_listen’ from ‘test_bcast_recv_defer’
# 3262|   	if (listen(sk, 10)) {
# 3263|   		err = -errno;
# 3264|-> 		tester_warn("Can't listen socket: %s (%d)", strerror(errno),
# 3265|   									errno);
# 3266|   		goto fail;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def781]
bluez-5.85/tools/iso-tester.c:3275:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/iso-tester.c:3881:13: enter_function: entry to ‘test_past_recv’
bluez-5.85/tools/iso-tester.c:3885:9: call_function: inlined call to ‘setup_listen’ from ‘test_past_recv’
# 3273|   fail:
# 3274|   	free(addr);
# 3275|-> 	close(sk);
# 3276|   	return err;
# 3277|   }

Error: CPPCHECK_WARNING (CWE-476): [#def782]
bluez-5.85/tools/iso-tester.c:3367: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 3365|   	if (isodata->pa_bind) {
# 3366|   		addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
# 3367|-> 		memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
# 3368|   		addr->iso_family = AF_BLUETOOTH;
# 3369|   

Error: CPPCHECK_WARNING (CWE-476): [#def783]
bluez-5.85/tools/iso-tester.c:3368: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 3366|   		addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
# 3367|   		memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
# 3368|-> 		addr->iso_family = AF_BLUETOOTH;
# 3369|   
# 3370|   		addr->iso_bc->bc_num_bis = 1;

Error: CPPCHECK_WARNING (CWE-476): [#def784]
bluez-5.85/tools/iso-tester.c:3370: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 3368|   		addr->iso_family = AF_BLUETOOTH;
# 3369|   
# 3370|-> 		addr->iso_bc->bc_num_bis = 1;
# 3371|   		addr->iso_bc->bc_bis[0] = 1;
# 3372|   

Error: CPPCHECK_WARNING (CWE-476): [#def785]
bluez-5.85/tools/iso-tester.c:3371: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
# 3369|   
# 3370|   		addr->iso_bc->bc_num_bis = 1;
# 3371|-> 		addr->iso_bc->bc_bis[0] = 1;
# 3372|   
# 3373|   		if (bind(sk, (struct sockaddr *) addr, sizeof(*addr) +

Error: GCC_ANALYZER_WARNING (CWE-775): [#def786]
bluez-5.85/tools/iso-tester.c:3453:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘g_io_channel_unix_get_fd(io)’
bluez-5.85/tools/iso-tester.c:3523:17: enter_function: entry to ‘iso_accept_cb’
bluez-5.85/tools/iso-tester.c:3532:24: call_function: calling ‘iso_accept’ from ‘iso_accept_cb’
# 3451|   	sk = g_io_channel_unix_get_fd(io);
# 3452|   
# 3453|-> 	new_sk = accept(sk, NULL, NULL);
# 3454|   	if (new_sk < 0) {
# 3455|   		tester_test_failed();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def787]
bluez-5.85/tools/iso-tester.c:3459:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’
bluez-5.85/tools/iso-tester.c:3523:17: enter_function: entry to ‘iso_accept_cb’
bluez-5.85/tools/iso-tester.c:3532:24: call_function: calling ‘iso_accept’ from ‘iso_accept_cb’
# 3457|   	}
# 3458|   
# 3459|-> 	new_io = g_io_channel_unix_new(new_sk);
# 3460|   	g_io_channel_set_close_on_unref(new_io, TRUE);
# 3461|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def788]
bluez-5.85/tools/isotest.c:181:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/isotest.c:173:14: acquire_resource: socket created here
bluez-5.85/tools/isotest.c:175:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
bluez-5.85/tools/isotest.c:181:9: branch_false: ...to here
bluez-5.85/tools/isotest.c:181:9: throw: if ‘syslog’ throws an exception...
bluez-5.85/tools/isotest.c:181:9: danger: ‘fd’ leaks here
#  179|   	}
#  180|   
#  181|-> 	syslog(LOG_ERR, "mgmt socket: fd %d", fd);
#  182|   
#  183|   	memset(&addr, 0, sizeof(addr));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def789]
bluez-5.85/tools/isotest.c:332:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sk’
bluez-5.85/tools/isotest.c:401:13: enter_function: entry to ‘bcast_do_connect_mbis’
bluez-5.85/tools/isotest.c:406:14: acquire_memory: allocated here
bluez-5.85/tools/isotest.c:407:12: branch_false: following ‘false’ branch (when ‘sk’ is non-NULL)...
bluez-5.85/tools/isotest.c:412:9: branch_false: ...to here
bluez-5.85/tools/isotest.c:414:25: branch_true: following ‘true’ branch...
bluez-5.85/tools/isotest.c:415:26: branch_true: ...to here
bluez-5.85/tools/isotest.c:418:25: call_function: calling ‘do_connect’ from ‘bcast_do_connect_mbis’
#  330|   	sk = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_ISO);
#  331|   	if (sk < 0) {
#  332|-> 		syslog(LOG_ERR, "Can't create socket: %s (%d)",
#  333|   							strerror(errno), errno);
#  334|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def790]
bluez-5.85/tools/isotest.c:345:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sk’
bluez-5.85/tools/isotest.c:401:13: enter_function: entry to ‘bcast_do_connect_mbis’
bluez-5.85/tools/isotest.c:406:14: acquire_memory: allocated here
bluez-5.85/tools/isotest.c:407:12: branch_false: following ‘false’ branch (when ‘sk’ is non-NULL)...
bluez-5.85/tools/isotest.c:412:9: branch_false: ...to here
bluez-5.85/tools/isotest.c:414:25: branch_true: following ‘true’ branch...
bluez-5.85/tools/isotest.c:415:26: branch_true: ...to here
bluez-5.85/tools/isotest.c:418:25: call_function: calling ‘do_connect’ from ‘bcast_do_connect_mbis’
#  343|   
#  344|   	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  345|-> 		syslog(LOG_ERR, "Can't bind socket: %s (%d)",
#  346|   							strerror(errno), errno);
#  347|   		goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def791]
bluez-5.85/tools/isotest.c:359:25: warning[-Wanalyzer-malloc-leak]: leak of ‘sk’
bluez-5.85/tools/isotest.c:401:13: enter_function: entry to ‘bcast_do_connect_mbis’
bluez-5.85/tools/isotest.c:406:14: acquire_memory: allocated here
bluez-5.85/tools/isotest.c:407:12: branch_false: following ‘false’ branch (when ‘sk’ is non-NULL)...
bluez-5.85/tools/isotest.c:412:9: branch_false: ...to here
bluez-5.85/tools/isotest.c:414:25: branch_true: following ‘true’ branch...
bluez-5.85/tools/isotest.c:415:26: branch_true: ...to here
bluez-5.85/tools/isotest.c:418:25: call_function: calling ‘do_connect’ from ‘bcast_do_connect_mbis’
#  357|   		if (setsockopt(sk, SOL_BLUETOOTH, BT_ISO_QOS, iso_qos,
#  358|   					sizeof(*iso_qos)) < 0) {
#  359|-> 			syslog(LOG_ERR, "Can't set QoS socket option: "
#  360|   					"%s (%d)", strerror(errno), errno);
#  361|   			goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def792]
bluez-5.85/tools/isotest.c:368:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sk’
bluez-5.85/tools/isotest.c:401:13: enter_function: entry to ‘bcast_do_connect_mbis’
bluez-5.85/tools/isotest.c:406:14: acquire_memory: allocated here
bluez-5.85/tools/isotest.c:407:12: branch_false: following ‘false’ branch (when ‘sk’ is non-NULL)...
bluez-5.85/tools/isotest.c:412:9: branch_false: ...to here
bluez-5.85/tools/isotest.c:414:25: branch_true: following ‘true’ branch...
bluez-5.85/tools/isotest.c:415:26: branch_true: ...to here
bluez-5.85/tools/isotest.c:418:25: call_function: calling ‘do_connect’ from ‘bcast_do_connect_mbis’
#  366|   	if (defer_setup && setsockopt(sk, SOL_BLUETOOTH, BT_DEFER_SETUP,
#  367|   				&defer_setup, sizeof(defer_setup)) < 0) {
#  368|-> 		syslog(LOG_ERR, "Can't enable deferred setup : %s (%d)",
#  369|   							strerror(errno), errno);
#  370|   		goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def793]
bluez-5.85/tools/isotest.c:376:9: warning[-Wanalyzer-malloc-leak]: leak of ‘sk’
bluez-5.85/tools/isotest.c:401:13: enter_function: entry to ‘bcast_do_connect_mbis’
bluez-5.85/tools/isotest.c:406:14: acquire_memory: allocated here
bluez-5.85/tools/isotest.c:407:12: branch_false: following ‘false’ branch (when ‘sk’ is non-NULL)...
bluez-5.85/tools/isotest.c:412:9: branch_false: ...to here
bluez-5.85/tools/isotest.c:414:25: branch_true: following ‘true’ branch...
bluez-5.85/tools/isotest.c:415:26: branch_true: ...to here
bluez-5.85/tools/isotest.c:418:25: call_function: calling ‘do_connect’ from ‘bcast_do_connect_mbis’
#  374|   	memset(&addr, 0, sizeof(addr));
#  375|   	addr.iso_family = AF_BLUETOOTH;
#  376|-> 	str2ba(peer, &addr.iso_bdaddr);
#  377|   	addr.iso_bdaddr_type = bdaddr_type;
#  378|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def794]
bluez-5.85/tools/isotest.c:379:9: warning[-Wanalyzer-malloc-leak]: leak of ‘sk’
bluez-5.85/tools/isotest.c:401:13: enter_function: entry to ‘bcast_do_connect_mbis’
bluez-5.85/tools/isotest.c:406:14: acquire_memory: allocated here
bluez-5.85/tools/isotest.c:407:12: branch_false: following ‘false’ branch (when ‘sk’ is non-NULL)...
bluez-5.85/tools/isotest.c:412:9: branch_false: ...to here
bluez-5.85/tools/isotest.c:414:25: branch_true: following ‘true’ branch...
bluez-5.85/tools/isotest.c:415:26: branch_true: ...to here
bluez-5.85/tools/isotest.c:418:25: call_function: calling ‘do_connect’ from ‘bcast_do_connect_mbis’
#  377|   	addr.iso_bdaddr_type = bdaddr_type;
#  378|   
#  379|-> 	syslog(LOG_INFO, "Connecting %s ...", peer);
#  380|   
#  381|   	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def795]
bluez-5.85/tools/isotest.c:381:13: warning[-Wanalyzer-malloc-leak]: leak of ‘sk’
bluez-5.85/tools/isotest.c:401:13: enter_function: entry to ‘bcast_do_connect_mbis’
bluez-5.85/tools/isotest.c:406:14: acquire_memory: allocated here
bluez-5.85/tools/isotest.c:407:12: branch_false: following ‘false’ branch (when ‘sk’ is non-NULL)...
bluez-5.85/tools/isotest.c:412:9: branch_false: ...to here
bluez-5.85/tools/isotest.c:414:25: branch_true: following ‘true’ branch...
bluez-5.85/tools/isotest.c:415:26: branch_true: ...to here
bluez-5.85/tools/isotest.c:418:25: call_function: calling ‘do_connect’ from ‘bcast_do_connect_mbis’
#  379|   	syslog(LOG_INFO, "Connecting %s ...", peer);
#  380|   
#  381|-> 	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  382|   		syslog(LOG_ERR, "Can't connect: %s (%d)", strerror(errno),
#  383|   								errno);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def796]
bluez-5.85/tools/isotest.c:382:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sk’
bluez-5.85/tools/isotest.c:401:13: enter_function: entry to ‘bcast_do_connect_mbis’
bluez-5.85/tools/isotest.c:406:14: acquire_memory: allocated here
bluez-5.85/tools/isotest.c:407:12: branch_false: following ‘false’ branch (when ‘sk’ is non-NULL)...
bluez-5.85/tools/isotest.c:412:9: branch_false: ...to here
bluez-5.85/tools/isotest.c:414:25: branch_true: following ‘true’ branch...
bluez-5.85/tools/isotest.c:415:26: branch_true: ...to here
bluez-5.85/tools/isotest.c:418:25: call_function: calling ‘do_connect’ from ‘bcast_do_connect_mbis’
#  380|   
#  381|   	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  382|-> 		syslog(LOG_ERR, "Can't connect: %s (%d)", strerror(errno),
#  383|   								errno);
#  384|   		goto error;

Error: CPPCHECK_WARNING (CWE-476): [#def797]
bluez-5.85/tools/isotest.c:518: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
#  516|   	/* Bind to local address */
#  517|   	addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
#  518|-> 	memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
#  519|   	addr->iso_family = AF_BLUETOOTH;
#  520|   	bacpy(&addr->iso_bdaddr, mgmt_index != MGMT_INDEX_NONE ?

Error: CPPCHECK_WARNING (CWE-476): [#def798]
bluez-5.85/tools/isotest.c:519: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
#  517|   	addr = malloc(sizeof(*addr) + sizeof(*addr->iso_bc));
#  518|   	memset(addr, 0, sizeof(*addr) + sizeof(*addr->iso_bc));
#  519|-> 	addr->iso_family = AF_BLUETOOTH;
#  520|   	bacpy(&addr->iso_bdaddr, mgmt_index != MGMT_INDEX_NONE ?
#  521|   					&bdaddr : BDADDR_ANY);

Error: CPPCHECK_WARNING (CWE-476): [#def799]
bluez-5.85/tools/isotest.c:522: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
#  520|   	bacpy(&addr->iso_bdaddr, mgmt_index != MGMT_INDEX_NONE ?
#  521|   					&bdaddr : BDADDR_ANY);
#  522|-> 	addr->iso_bdaddr_type = BDADDR_LE_PUBLIC;
#  523|   	optlen = sizeof(*addr);
#  524|   

Error: CPPCHECK_WARNING (CWE-476): [#def800]
bluez-5.85/tools/isotest.c:527: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
#  525|   	if (peer) {
#  526|   		str2ba(peer, &addr->iso_bc->bc_bdaddr);
#  527|-> 		addr->iso_bc->bc_bdaddr_type = bdaddr_type;
#  528|   		addr->iso_bc->bc_num_bis = num_bis;
#  529|   

Error: CPPCHECK_WARNING (CWE-476): [#def801]
bluez-5.85/tools/isotest.c:528: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
#  526|   		str2ba(peer, &addr->iso_bc->bc_bdaddr);
#  527|   		addr->iso_bc->bc_bdaddr_type = bdaddr_type;
#  528|-> 		addr->iso_bc->bc_num_bis = num_bis;
#  529|   
#  530|   		for (int i = 0; i < num_bis; i++)

Error: CPPCHECK_WARNING (CWE-476): [#def802]
bluez-5.85/tools/isotest.c:531: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: addr
#  529|   
#  530|   		for (int i = 0; i < num_bis; i++)
#  531|-> 			addr->iso_bc->bc_bis[i] = i + 1;
#  532|   
#  533|   		optlen += sizeof(*addr->iso_bc);

Error: CPPCHECK_WARNING (CWE-476): [#def803]
bluez-5.85/tools/isotest.c:1214: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iso_qos
# 1212|   	iso_qos = malloc(sizeof(*iso_qos));
# 1213|   	/* Default to 16_2_1 */
# 1214|-> 	*iso_qos = presets[3].qos;
# 1215|   	inout = true;
# 1216|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def804]
bluez-5.85/tools/isotest.c:1214:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘iso_qos’
bluez-5.85/tools/isotest.c:1212:19: acquire_memory: this call could return NULL
bluez-5.85/tools/isotest.c:1214:9: danger: ‘malloc(60)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 1212|   	iso_qos = malloc(sizeof(*iso_qos));
# 1213|   	/* Default to 16_2_1 */
# 1214|-> 	*iso_qos = presets[3].qos;
# 1215|   	inout = true;
# 1216|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def805]
bluez-5.85/tools/isotest.c:1268:33: warning[-Wanalyzer-malloc-leak]: leak of ‘filename’
bluez-5.85/tools/isotest.c:1223:20: branch_false: following ‘false’ branch (when ‘opt >= 0’)...
bluez-5.85/tools/isotest.c:1226:17: branch_false: ...to here
bluez-5.85/tools/isotest.c:1230:44: acquire_memory: allocated here
bluez-5.85/tools/isotest.c:1223:20: branch_false: following ‘false’ branch (when ‘opt >= 0’)...
bluez-5.85/tools/isotest.c:1226:17: branch_false: ...to here
bluez-5.85/tools/isotest.c:1263:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/isotest.c:1266:30: branch_false: ...to here
bluez-5.85/tools/isotest.c:1266:28: branch_true: following ‘true’ branch...
bluez-5.85/tools/isotest.c:1267:51: branch_true: ...to here
bluez-5.85/tools/isotest.c:1268:33: throw: if ‘hci_devba’ throws an exception...
bluez-5.85/tools/isotest.c:1268:33: danger: ‘filename’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 1266|   			if (!strncasecmp(optarg, "hci", 3)) {
# 1267|   				mgmt_index = atoi(optarg + 3);
# 1268|-> 				hci_devba(mgmt_index, &bdaddr);
# 1269|   			} else
# 1270|   				str2ba(optarg, &bdaddr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def806]
bluez-5.85/tools/isotest.c:1270:33: warning[-Wanalyzer-malloc-leak]: leak of ‘filename’
bluez-5.85/tools/isotest.c:1223:20: branch_false: following ‘false’ branch (when ‘opt >= 0’)...
bluez-5.85/tools/isotest.c:1226:17: branch_false: ...to here
bluez-5.85/tools/isotest.c:1230:44: acquire_memory: allocated here
bluez-5.85/tools/isotest.c:1223:20: branch_false: following ‘false’ branch (when ‘opt >= 0’)...
bluez-5.85/tools/isotest.c:1226:17: branch_false: ...to here
bluez-5.85/tools/isotest.c:1263:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/isotest.c:1266:30: branch_false: ...to here
bluez-5.85/tools/isotest.c:1266:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/isotest.c:1270:33: branch_false: ...to here
bluez-5.85/tools/isotest.c:1270:33: throw: if ‘str2ba’ throws an exception...
bluez-5.85/tools/isotest.c:1270:33: danger: ‘filename’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
# 1268|   				hci_devba(mgmt_index, &bdaddr);
# 1269|   			} else
# 1270|-> 				str2ba(optarg, &bdaddr);
# 1271|   			break;
# 1272|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def807]
bluez-5.85/tools/l2cap-tester.c:1233:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/l2cap-tester.c:1225:14: acquire_resource: socket created here
bluez-5.85/tools/l2cap-tester.c:1226:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2cap-tester.c:1233:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:1233:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:1233:9: danger: ‘sk’ leaks here
# 1231|   	}
# 1232|   
# 1233|-> 	close(sk);
# 1234|   
# 1235|   	tester_test_passed();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def808]
bluez-5.85/tools/l2cap-tester.c:1604:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/l2cap-tester.c:1596:14: acquire_resource: socket created here
bluez-5.85/tools/l2cap-tester.c:1597:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2cap-tester.c:1604:26: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:1604:26: throw: if ‘hciemu_get_central_bdaddr’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:1604:26: danger: ‘sk’ leaks here
# 1602|   	}
# 1603|   
# 1604|-> 	central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
# 1605|   	if (!central_bdaddr) {
# 1606|   		tester_warn("No central bdaddr");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def809]
bluez-5.85/tools/l2cap-tester.c:1606:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/l2cap-tester.c:1596:14: acquire_resource: socket created here
bluez-5.85/tools/l2cap-tester.c:1597:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2cap-tester.c:1604:26: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:1605:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2cap-tester.c:1606:17: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:1606:17: throw: if ‘tester_warn’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:1606:17: danger: ‘sk’ leaks here
# 1604|   	central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
# 1605|   	if (!central_bdaddr) {
# 1606|-> 		tester_warn("No central bdaddr");
# 1607|   		close(sk);
# 1608|   		return -ENODEV;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def810]
bluez-5.85/tools/l2cap-tester.c:1607:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/l2cap-tester.c:1596:14: acquire_resource: socket created here
bluez-5.85/tools/l2cap-tester.c:1597:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2cap-tester.c:1604:26: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:1605:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2cap-tester.c:1606:17: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:1607:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:1607:17: danger: ‘sk’ leaks here
# 1605|   	if (!central_bdaddr) {
# 1606|   		tester_warn("No central bdaddr");
# 1607|-> 		close(sk);
# 1608|   		return -ENODEV;
# 1609|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def811]
bluez-5.85/tools/l2cap-tester.c:1626:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/l2cap-tester.c:1596:14: acquire_resource: socket created here
bluez-5.85/tools/l2cap-tester.c:1597:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2cap-tester.c:1604:26: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:1605:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2cap-tester.c:1611:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:1619:17: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2cap-tester.c:1624:13: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:1624:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2cap-tester.c:1625:24: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:1626:17: throw: if ‘tester_warn’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:1626:17: danger: ‘sk’ leaks here
# 1624|   	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
# 1625|   		err = -errno;
# 1626|-> 		tester_warn("Can't bind socket: %s (%d)", strerror(errno),
# 1627|   									errno);
# 1628|   		close(sk);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def812]
bluez-5.85/tools/l2cap-tester.c:1628:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/l2cap-tester.c:1596:14: acquire_resource: socket created here
bluez-5.85/tools/l2cap-tester.c:1597:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2cap-tester.c:1604:26: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:1605:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2cap-tester.c:1611:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:1619:17: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2cap-tester.c:1624:13: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:1624:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2cap-tester.c:1625:24: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:1628:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:1628:17: danger: ‘sk’ leaks here
# 1626|   		tester_warn("Can't bind socket: %s (%d)", strerror(errno),
# 1627|   									errno);
# 1628|-> 		close(sk);
# 1629|   		return err;
# 1630|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def813]
bluez-5.85/tools/l2cap-tester.c:2341:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘g_io_channel_unix_get_fd(io)’
# 2339|   	sk = g_io_channel_unix_get_fd(io);
# 2340|   
# 2341|-> 	new_sk = accept(sk, NULL, NULL);
# 2342|   	if (new_sk < 0) {
# 2343|   		tester_warn("accept failed: %s (%u)", strerror(errno), errno);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def814]
bluez-5.85/tools/l2cap-tester.c:2348:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’
bluez-5.85/tools/l2cap-tester.c:2342:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2cap-tester.c:2348:14: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2348:14: danger: ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’ leaks here
# 2346|   	}
# 2347|   
# 2348|-> 	io = g_io_channel_unix_new(new_sk);
# 2349|   	g_io_channel_set_close_on_unref(io, TRUE);
# 2350|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def815]
bluez-5.85/tools/l2cap-tester.c:2554:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2554:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2554:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2554:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2554:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2554:9: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 2552|   	tester_init(&argc, &argv);
# 2553|   
# 2554|-> 	test_l2cap_bredr("Basic L2CAP Socket - Success", NULL,
# 2555|   					setup_powered_client, test_basic);
# 2556|   	test_l2cap_bredr("Non-connected getpeername - Failure", NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def816]
bluez-5.85/tools/l2cap-tester.c:2556:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2556:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2556:9: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 2554|   	test_l2cap_bredr("Basic L2CAP Socket - Success", NULL,
# 2555|   					setup_powered_client, test_basic);
# 2556|-> 	test_l2cap_bredr("Non-connected getpeername - Failure", NULL,
# 2557|   					setup_powered_client,
# 2558|   					test_getpeername_not_connected);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def817]
bluez-5.85/tools/l2cap-tester.c:2560:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2560:9: danger: ‘user’ leaks here; was allocated at [(4)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/3)
# 2558|   					test_getpeername_not_connected);
# 2559|   
# 2560|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Success",
# 2561|   					&client_connect_success_test,
# 2562|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def818]
bluez-5.85/tools/l2cap-tester.c:2564:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2564:9: danger: ‘user’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
# 2562|   					setup_powered_client, test_connect);
# 2563|   
# 2564|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Close",
# 2565|   					&client_connect_close_test,
# 2566|   					setup_powered_client,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def819]
bluez-5.85/tools/l2cap-tester.c:2568:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2568:9: danger: ‘user’ leaks here; was allocated at [(10)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/9)
# 2566|   					setup_powered_client,
# 2567|   					test_connect_close);
# 2568|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Timeout",
# 2569|   					&client_connect_timeout_test,
# 2570|   					setup_powered_client,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def820]
bluez-5.85/tools/l2cap-tester.c:2573:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2573:9: danger: ‘user’ leaks here; was allocated at [(13)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/12)
# 2571|   					test_connect_timeout);
# 2572|   
# 2573|-> 	test_l2cap_bredr("L2CAP BR/EDR Client SSP - Success 1",
# 2574|   					&client_connect_ssp_success_test_1,
# 2575|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def821]
bluez-5.85/tools/l2cap-tester.c:2576:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2576:9: danger: ‘user’ leaks here; was allocated at [(16)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/15)
# 2574|   					&client_connect_ssp_success_test_1,
# 2575|   					setup_powered_client, test_connect);
# 2576|-> 	test_l2cap_bredr("L2CAP BR/EDR Client SSP - Success 2",
# 2577|   					&client_connect_ssp_success_test_2,
# 2578|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def822]
bluez-5.85/tools/l2cap-tester.c:2579:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2579:9: danger: ‘user’ leaks here; was allocated at [(19)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/18)
# 2577|   					&client_connect_ssp_success_test_2,
# 2578|   					setup_powered_client, test_connect);
# 2579|-> 	test_l2cap_bredr("L2CAP BR/EDR Client PIN Code - Success",
# 2580|   					&client_connect_pin_success_test,
# 2581|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def823]
bluez-5.85/tools/l2cap-tester.c:2583:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2583:9: danger: ‘user’ leaks here; was allocated at [(22)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/21)
# 2581|   					setup_powered_client, test_connect);
# 2582|   
# 2583|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Read Success",
# 2584|   					&client_connect_read_success_test,
# 2585|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def824]
bluez-5.85/tools/l2cap-tester.c:2587:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2587:9: danger: ‘user’ leaks here; was allocated at [(25)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/24)
# 2585|   					setup_powered_client, test_connect);
# 2586|   
# 2587|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Read 32k Success",
# 2588|   					&client_connect_read_32k_success_test,
# 2589|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def825]
bluez-5.85/tools/l2cap-tester.c:2591:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2591:9: danger: ‘user’ leaks here; was allocated at [(28)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/27)
# 2589|   					setup_powered_client, test_connect);
# 2590|   
# 2591|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - RX Timestamping",
# 2592|   					&client_connect_rx_timestamping_test,
# 2593|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def826]
bluez-5.85/tools/l2cap-tester.c:2595:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2595:9: danger: ‘user’ leaks here; was allocated at [(31)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/30)
# 2593|   					setup_powered_client, test_connect);
# 2594|   
# 2595|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - RX Timestamping 32k",
# 2596|   				&client_connect_rx_timestamping_32k_test,
# 2597|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def827]
bluez-5.85/tools/l2cap-tester.c:2599:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2599:9: danger: ‘user’ leaks here; was allocated at [(34)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/33)
# 2597|   				setup_powered_client, test_connect);
# 2598|   
# 2599|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Write Success",
# 2600|   					&client_connect_write_success_test,
# 2601|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def828]
bluez-5.85/tools/l2cap-tester.c:2603:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2603:9: danger: ‘user’ leaks here; was allocated at [(37)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/36)
# 2601|   					setup_powered_client, test_connect);
# 2602|   
# 2603|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Write 32k Success",
# 2604|   					&client_connect_write_32k_success_test,
# 2605|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def829]
bluez-5.85/tools/l2cap-tester.c:2607:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2607:9: danger: ‘user’ leaks here; was allocated at [(40)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/39)
# 2605|   					setup_powered_client, test_connect);
# 2606|   
# 2607|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - TX Timestamping",
# 2608|   					&client_connect_tx_timestamping_test,
# 2609|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def830]
bluez-5.85/tools/l2cap-tester.c:2611:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2611:9: danger: ‘user’ leaks here; was allocated at [(43)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/42)
# 2609|   					setup_powered_client, test_connect);
# 2610|   
# 2611|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Stream TX Timestamping",
# 2612|   				&client_connect_stream_tx_timestamping_test,
# 2613|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def831]
bluez-5.85/tools/l2cap-tester.c:2615:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2615:9: danger: ‘user’ leaks here; was allocated at [(46)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/45)
# 2613|   				setup_powered_client, test_connect);
# 2614|   
# 2615|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Invalid PSM 1",
# 2616|   					&client_connect_nval_psm_test_1,
# 2617|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def832]
bluez-5.85/tools/l2cap-tester.c:2619:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2619:9: danger: ‘user’ leaks here; was allocated at [(49)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/48)
# 2617|   					setup_powered_client, test_connect);
# 2618|   
# 2619|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Invalid PSM 2",
# 2620|   					&client_connect_nval_psm_test_2,
# 2621|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def833]
bluez-5.85/tools/l2cap-tester.c:2623:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2623:9: danger: ‘user’ leaks here; was allocated at [(52)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/51)
# 2621|   					setup_powered_client, test_connect);
# 2622|   
# 2623|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Invalid PSM 3",
# 2624|   					&client_connect_nval_psm_test_3,
# 2625|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def834]
bluez-5.85/tools/l2cap-tester.c:2627:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2627:9: danger: ‘user’ leaks here; was allocated at [(55)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/54)
# 2625|   					setup_powered_client, test_connect);
# 2626|   
# 2627|-> 	test_l2cap_bredr("L2CAP BR/EDR Client - Socket Shut WR Success",
# 2628|   					&client_connect_shut_wr_success_test,
# 2629|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def835]
bluez-5.85/tools/l2cap-tester.c:2631:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2631:9: danger: ‘user’ leaks here; was allocated at [(58)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/57)
# 2629|   					setup_powered_client, test_connect);
# 2630|   
# 2631|-> 	test_l2cap_bredr("L2CAP BR/EDR Server - Success",
# 2632|   					&l2cap_server_success_test,
# 2633|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def836]
bluez-5.85/tools/l2cap-tester.c:2635:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2635:9: danger: ‘user’ leaks here; was allocated at [(61)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/60)
# 2633|   					setup_powered_server, test_server);
# 2634|   
# 2635|-> 	test_l2cap_bredr("L2CAP BR/EDR Server - Read Success",
# 2636|   					&l2cap_server_read_success_test,
# 2637|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def837]
bluez-5.85/tools/l2cap-tester.c:2639:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2639:9: danger: ‘user’ leaks here; was allocated at [(64)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/63)
# 2637|   					setup_powered_server, test_server);
# 2638|   
# 2639|-> 	test_l2cap_bredr("L2CAP BR/EDR Server - Read 32k Success",
# 2640|   					&l2cap_server_read_32k_success_test,
# 2641|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def838]
bluez-5.85/tools/l2cap-tester.c:2643:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2643:9: danger: ‘user’ leaks here; was allocated at [(67)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/66)
# 2641|   					setup_powered_server, test_server);
# 2642|   
# 2643|-> 	test_l2cap_bredr("L2CAP BR/EDR Server - Write Success",
# 2644|   					&l2cap_server_write_success_test,
# 2645|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def839]
bluez-5.85/tools/l2cap-tester.c:2647:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2647:9: danger: ‘user’ leaks here; was allocated at [(70)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/69)
# 2645|   					setup_powered_server, test_server);
# 2646|   
# 2647|-> 	test_l2cap_bredr("L2CAP BR/EDR Server - Write 32k Success",
# 2648|   					&l2cap_server_write_32k_success_test,
# 2649|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def840]
bluez-5.85/tools/l2cap-tester.c:2651:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2651:9: danger: ‘user’ leaks here; was allocated at [(73)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/72)
# 2649|   					setup_powered_server, test_server);
# 2650|   
# 2651|-> 	test_l2cap_bredr("L2CAP BR/EDR Server - Security Block",
# 2652|   					&l2cap_server_sec_block_test,
# 2653|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def841]
bluez-5.85/tools/l2cap-tester.c:2655:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2655:9: danger: ‘user’ leaks here; was allocated at [(76)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/75)
# 2653|   					setup_powered_server, test_server);
# 2654|   
# 2655|-> 	test_l2cap_bredr("L2CAP BR/EDR Server - Invalid PSM",
# 2656|   					&l2cap_server_nval_psm_test,
# 2657|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def842]
bluez-5.85/tools/l2cap-tester.c:2658:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2658:9: danger: ‘user’ leaks here; was allocated at [(79)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/78)
# 2656|   					&l2cap_server_nval_psm_test,
# 2657|   					setup_powered_server, test_server);
# 2658|-> 	test_l2cap_bredr("L2CAP BR/EDR Server - Invalid PDU",
# 2659|   				&l2cap_server_nval_pdu_test1,
# 2660|   				setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def843]
bluez-5.85/tools/l2cap-tester.c:2661:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2661:9: danger: ‘user’ leaks here; was allocated at [(82)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/81)
# 2659|   				&l2cap_server_nval_pdu_test1,
# 2660|   				setup_powered_server, test_server);
# 2661|-> 	test_l2cap_bredr("L2CAP BR/EDR Server - Invalid Disconnect CID",
# 2662|   				&l2cap_server_nval_cid_test1,
# 2663|   				setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def844]
bluez-5.85/tools/l2cap-tester.c:2664:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2664:9: danger: ‘user’ leaks here; was allocated at [(85)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/84)
# 2662|   				&l2cap_server_nval_cid_test1,
# 2663|   				setup_powered_server, test_server);
# 2664|-> 	test_l2cap_bredr("L2CAP BR/EDR Server - Invalid Config CID",
# 2665|   				&l2cap_server_nval_cid_test2,
# 2666|   				setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def845]
bluez-5.85/tools/l2cap-tester.c:2668:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2668:9: danger: ‘user’ leaks here; was allocated at [(88)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/87)
# 2666|   				setup_powered_server, test_server);
# 2667|   
# 2668|-> 	test_l2cap_bredr("L2CAP BR/EDR Ethtool Get Ts Info - Success", NULL,
# 2669|   			setup_powered_server, test_l2cap_ethtool_get_ts_info);
# 2670|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def846]
bluez-5.85/tools/l2cap-tester.c:2671:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2671:9: danger: ‘user’ leaks here; was allocated at [(91)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/90)
# 2669|   			setup_powered_server, test_l2cap_ethtool_get_ts_info);
# 2670|   
# 2671|-> 	test_l2cap_le("L2CAP LE Client - Success",
# 2672|   				&le_client_connect_success_test_1,
# 2673|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def847]
bluez-5.85/tools/l2cap-tester.c:2674:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2674:9: danger: ‘user’ leaks here; was allocated at [(94)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/93)
# 2672|   				&le_client_connect_success_test_1,
# 2673|   				setup_powered_client, test_connect);
# 2674|-> 	test_l2cap_le("L2CAP LE Client - Close",
# 2675|   				&le_client_connect_close_test_1,
# 2676|   				setup_powered_client, test_connect_close);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def848]
bluez-5.85/tools/l2cap-tester.c:2677:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2677:9: danger: ‘user’ leaks here; was allocated at [(97)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/96)
# 2675|   				&le_client_connect_close_test_1,
# 2676|   				setup_powered_client, test_connect_close);
# 2677|-> 	test_l2cap_le("L2CAP LE Client - Timeout",
# 2678|   				&le_client_connect_timeout_test_1,
# 2679|   				setup_powered_client, test_connect_timeout);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def849]
bluez-5.85/tools/l2cap-tester.c:2680:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2680:9: danger: ‘user’ leaks here; was allocated at [(100)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/99)
# 2678|   				&le_client_connect_timeout_test_1,
# 2679|   				setup_powered_client, test_connect_timeout);
# 2680|-> 	test_l2cap_le("L2CAP LE Client - Read Success",
# 2681|   				&le_client_connect_read_success_test,
# 2682|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def850]
bluez-5.85/tools/l2cap-tester.c:2683:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2683:9: danger: ‘user’ leaks here; was allocated at [(103)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/102)
# 2681|   				&le_client_connect_read_success_test,
# 2682|   				setup_powered_client, test_connect);
# 2683|-> 	test_l2cap_le("L2CAP LE Client - Read 32k Success",
# 2684|   				&le_client_connect_read_32k_success_test,
# 2685|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def851]
bluez-5.85/tools/l2cap-tester.c:2686:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2686:9: danger: ‘user’ leaks here; was allocated at [(106)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/105)
# 2684|   				&le_client_connect_read_32k_success_test,
# 2685|   				setup_powered_client, test_connect);
# 2686|-> 	test_l2cap_le("L2CAP LE Client - RX Timestamping",
# 2687|   				&le_client_connect_rx_timestamping_test,
# 2688|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def852]
bluez-5.85/tools/l2cap-tester.c:2689:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2689:9: danger: ‘user’ leaks here; was allocated at [(109)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/108)
# 2687|   				&le_client_connect_rx_timestamping_test,
# 2688|   				setup_powered_client, test_connect);
# 2689|-> 	test_l2cap_le("L2CAP LE Client - RX Timestamping 32k",
# 2690|   				&le_client_connect_rx_timestamping_32k_test,
# 2691|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def853]
bluez-5.85/tools/l2cap-tester.c:2692:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2692:9: danger: ‘user’ leaks here; was allocated at [(112)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/111)
# 2690|   				&le_client_connect_rx_timestamping_32k_test,
# 2691|   				setup_powered_client, test_connect);
# 2692|-> 	test_l2cap_le("L2CAP LE Client - Write Success",
# 2693|   				&le_client_connect_write_success_test,
# 2694|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def854]
bluez-5.85/tools/l2cap-tester.c:2695:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2695:9: danger: ‘user’ leaks here; was allocated at [(115)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/114)
# 2693|   				&le_client_connect_write_success_test,
# 2694|   				setup_powered_client, test_connect);
# 2695|-> 	test_l2cap_le("L2CAP LE Client - Write 32k Success",
# 2696|   				&le_client_connect_write_32k_success_test,
# 2697|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def855]
bluez-5.85/tools/l2cap-tester.c:2698:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2698:9: danger: ‘user’ leaks here; was allocated at [(118)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/117)
# 2696|   				&le_client_connect_write_32k_success_test,
# 2697|   				setup_powered_client, test_connect);
# 2698|-> 	test_l2cap_le("L2CAP LE Client - TX Timestamping",
# 2699|   				&le_client_connect_tx_timestamping_test,
# 2700|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def856]
bluez-5.85/tools/l2cap-tester.c:2701:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2701:9: danger: ‘user’ leaks here; was allocated at [(121)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/120)
# 2699|   				&le_client_connect_tx_timestamping_test,
# 2700|   				setup_powered_client, test_connect);
# 2701|-> 	test_l2cap_le("L2CAP LE Client, Direct Advertising - Success",
# 2702|   				&le_client_connect_adv_success_test_1,
# 2703|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def857]
bluez-5.85/tools/l2cap-tester.c:2704:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2704:9: danger: ‘user’ leaks here; was allocated at [(124)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/123)
# 2702|   				&le_client_connect_adv_success_test_1,
# 2703|   				setup_powered_client, test_connect);
# 2704|-> 	test_l2cap_le("L2CAP LE Client SMP - Success",
# 2705|   				&le_client_connect_success_test_2,
# 2706|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def858]
bluez-5.85/tools/l2cap-tester.c:2707:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2707:9: danger: ‘user’ leaks here; was allocated at [(127)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/126)
# 2705|   				&le_client_connect_success_test_2,
# 2706|   				setup_powered_client, test_connect);
# 2707|-> 	test_l2cap_le("L2CAP LE Client - Command Reject",
# 2708|   					&le_client_connect_reject_test_1,
# 2709|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def859]
bluez-5.85/tools/l2cap-tester.c:2710:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2710:9: danger: ‘user’ leaks here; was allocated at [(130)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/129)
# 2708|   					&le_client_connect_reject_test_1,
# 2709|   					setup_powered_client, test_connect);
# 2710|-> 	test_l2cap_bredr("L2CAP LE Client - Connection Reject",
# 2711|   				&le_client_connect_reject_test_2,
# 2712|   				setup_powered_client, test_connect_reject);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def860]
bluez-5.85/tools/l2cap-tester.c:2714:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2714:9: danger: ‘user’ leaks here; was allocated at [(133)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/132)
# 2712|   				setup_powered_client, test_connect_reject);
# 2713|   
# 2714|-> 	test_l2cap_le("L2CAP LE Client - Close socket 1",
# 2715|   				&le_client_close_socket_test_1,
# 2716|   				setup_powered_client,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def861]
bluez-5.85/tools/l2cap-tester.c:2719:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2719:9: danger: ‘user’ leaks here; was allocated at [(136)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/135)
# 2717|   				test_close_socket);
# 2718|   
# 2719|-> 	test_l2cap_le("L2CAP LE Client - Close socket 2",
# 2720|   				&le_client_close_socket_test_2,
# 2721|   				setup_powered_client,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def862]
bluez-5.85/tools/l2cap-tester.c:2724:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2724:9: danger: ‘user’ leaks here; was allocated at [(139)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/138)
# 2722|   				test_close_socket);
# 2723|   
# 2724|-> 	test_l2cap_le("L2CAP LE Client - Open two sockets",
# 2725|   				&le_client_2_same_client,
# 2726|   				setup_powered_client,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def863]
bluez-5.85/tools/l2cap-tester.c:2729:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2729:9: danger: ‘user’ leaks here; was allocated at [(142)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/141)
# 2727|   				test_connect_2);
# 2728|   
# 2729|-> 	test_l2cap_le("L2CAP LE Client - Open two sockets close one",
# 2730|   				&le_client_2_close_1,
# 2731|   				setup_powered_client,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def864]
bluez-5.85/tools/l2cap-tester.c:2734:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2734:9: danger: ‘user’ leaks here; was allocated at [(145)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/144)
# 2732|   				test_connect_2);
# 2733|   
# 2734|-> 	test_l2cap_le("L2CAP LE Client - Invalid PSM",
# 2735|   					&le_client_connect_nval_psm_test,
# 2736|   					setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def865]
bluez-5.85/tools/l2cap-tester.c:2737:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2737:9: danger: ‘user’ leaks here; was allocated at [(148)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/147)
# 2735|   					&le_client_connect_nval_psm_test,
# 2736|   					setup_powered_client, test_connect);
# 2737|-> 	test_l2cap_le("L2CAP LE Server - Success", &le_server_success_test,
# 2738|   					setup_powered_server, test_server);
# 2739|   	test_l2cap_le("L2CAP LE Server - Nval SCID", &le_server_nval_scid_test,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def866]
bluez-5.85/tools/l2cap-tester.c:2739:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2739:9: danger: ‘user’ leaks here; was allocated at [(151)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/150)
# 2737|   	test_l2cap_le("L2CAP LE Server - Success", &le_server_success_test,
# 2738|   					setup_powered_server, test_server);
# 2739|-> 	test_l2cap_le("L2CAP LE Server - Nval SCID", &le_server_nval_scid_test,
# 2740|   					setup_powered_server, test_server);
# 2741|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def867]
bluez-5.85/tools/l2cap-tester.c:2743:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2743:9: danger: ‘user’ leaks here; was allocated at [(154)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/153)
# 2741|   
# 2742|   
# 2743|-> 	test_l2cap_le("L2CAP Ext-Flowctl Client - Success",
# 2744|   				&ext_flowctl_client_connect_success_test_1,
# 2745|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def868]
bluez-5.85/tools/l2cap-tester.c:2746:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2746:9: danger: ‘user’ leaks here; was allocated at [(157)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/156)
# 2744|   				&ext_flowctl_client_connect_success_test_1,
# 2745|   				setup_powered_client, test_connect);
# 2746|-> 	test_l2cap_le("L2CAP Ext-Flowctl Client - Close",
# 2747|   				&ext_flowctl_client_connect_close_test_1,
# 2748|   				setup_powered_client, test_connect_close);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def869]
bluez-5.85/tools/l2cap-tester.c:2749:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2749:9: danger: ‘user’ leaks here; was allocated at [(160)](sarif:/runs/0/results/62/codeFlows/0/threadFlows/0/locations/159)
# 2747|   				&ext_flowctl_client_connect_close_test_1,
# 2748|   				setup_powered_client, test_connect_close);
# 2749|-> 	test_l2cap_le("L2CAP Ext-Flowctl Client - Timeout",
# 2750|   				&ext_flowctl_client_connect_timeout_test_1,
# 2751|   				setup_powered_client, test_connect_timeout);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def870]
bluez-5.85/tools/l2cap-tester.c:2752:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2752:9: danger: ‘user’ leaks here; was allocated at [(163)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/162)
# 2750|   				&ext_flowctl_client_connect_timeout_test_1,
# 2751|   				setup_powered_client, test_connect_timeout);
# 2752|-> 	test_l2cap_le("L2CAP Ext-Flowctl Client, Direct Advertising - Success",
# 2753|   				&ext_flowctl_client_connect_adv_success_test_1,
# 2754|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def871]
bluez-5.85/tools/l2cap-tester.c:2755:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2755:9: danger: ‘user’ leaks here; was allocated at [(166)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/165)
# 2753|   				&ext_flowctl_client_connect_adv_success_test_1,
# 2754|   				setup_powered_client, test_connect);
# 2755|-> 	test_l2cap_le("L2CAP Ext-Flowctl Client SMP - Success",
# 2756|   				&ext_flowctl_client_connect_success_test_2,
# 2757|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def872]
bluez-5.85/tools/l2cap-tester.c:2758:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2758:9: danger: ‘user’ leaks here; was allocated at [(169)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/168)
# 2756|   				&ext_flowctl_client_connect_success_test_2,
# 2757|   				setup_powered_client, test_connect);
# 2758|-> 	test_l2cap_le("L2CAP Ext-Flowctl Client - Command Reject",
# 2759|   				&ext_flowctl_client_connect_reject_test_1,
# 2760|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def873]
bluez-5.85/tools/l2cap-tester.c:2762:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2762:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2762:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2762:9: danger: ‘user’ leaks here; was allocated at [(172)](sarif:/runs/0/results/66/codeFlows/0/threadFlows/0/locations/171)
# 2760|   				setup_powered_client, test_connect);
# 2761|   
# 2762|-> 	test_l2cap_le("L2CAP Ext-Flowctl Client - Open two sockets",
# 2763|   				&ext_flowctl_client_2,
# 2764|   				setup_powered_client,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def874]
bluez-5.85/tools/l2cap-tester.c:2767:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2762:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2767:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2767:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2767:9: danger: ‘user’ leaks here; was allocated at [(175)](sarif:/runs/0/results/67/codeFlows/0/threadFlows/0/locations/174)
# 2765|   				test_connect_2);
# 2766|   
# 2767|-> 	test_l2cap_le("L2CAP Ext-Flowctl Client - Open two sockets close one",
# 2768|   				&ext_flowctl_client_2_close_1,
# 2769|   				setup_powered_client,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def875]
bluez-5.85/tools/l2cap-tester.c:2772:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2762:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2767:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2772:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2772:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2772:9: danger: ‘user’ leaks here; was allocated at [(178)](sarif:/runs/0/results/68/codeFlows/0/threadFlows/0/locations/177)
# 2770|   				test_connect_2);
# 2771|   
# 2772|-> 	test_l2cap_le("L2CAP Ext-Flowctl Server - Success",
# 2773|   				&ext_flowctl_server_success_test,
# 2774|   				setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def876]
bluez-5.85/tools/l2cap-tester.c:2775:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2762:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2767:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2772:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2775:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2775:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2775:9: danger: ‘user’ leaks here; was allocated at [(181)](sarif:/runs/0/results/69/codeFlows/0/threadFlows/0/locations/180)
# 2773|   				&ext_flowctl_server_success_test,
# 2774|   				setup_powered_server, test_server);
# 2775|-> 	test_l2cap_le("L2CAP Ext-Flowctl Server - Nval SCID",
# 2776|   				&ext_flowctl_server_nval_scid_test,
# 2777|   				setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def877]
bluez-5.85/tools/l2cap-tester.c:2779:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2762:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2767:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2772:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2775:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2779:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2779:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2779:9: danger: ‘user’ leaks here; was allocated at [(184)](sarif:/runs/0/results/70/codeFlows/0/threadFlows/0/locations/183)
# 2777|   				setup_powered_server, test_server);
# 2778|   
# 2779|-> 	test_l2cap_le("L2CAP LE ATT Client - Success",
# 2780|   				&le_att_client_connect_success_test_1,
# 2781|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def878]
bluez-5.85/tools/l2cap-tester.c:2782:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2762:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2767:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2772:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2775:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2779:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2782:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2782:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2782:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2782:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2782:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2782:9: danger: ‘user’ leaks here; was allocated at [(187)](sarif:/runs/0/results/71/codeFlows/0/threadFlows/0/locations/186)
# 2780|   				&le_att_client_connect_success_test_1,
# 2781|   				setup_powered_client, test_connect);
# 2782|-> 	test_l2cap_le("L2CAP LE ATT Server - Success",
# 2783|   				&le_att_server_success_test_1,
# 2784|   				setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def879]
bluez-5.85/tools/l2cap-tester.c:2786:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2762:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2767:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2772:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2775:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2779:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2782:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2782:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2782:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2786:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2786:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2786:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2786:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2786:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2786:9: danger: ‘user’ leaks here; was allocated at [(190)](sarif:/runs/0/results/72/codeFlows/0/threadFlows/0/locations/189)
# 2784|   				setup_powered_server, test_server);
# 2785|   
# 2786|-> 	test_l2cap_le("L2CAP LE EATT Client - Success",
# 2787|   				&le_eatt_client_connect_success_test_1,
# 2788|   				setup_powered_client, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def880]
bluez-5.85/tools/l2cap-tester.c:2789:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2762:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2767:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2772:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2775:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2779:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2782:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2782:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2782:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2786:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2786:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2786:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2789:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2789:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2789:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2789:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2789:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2789:9: danger: ‘user’ leaks here; was allocated at [(193)](sarif:/runs/0/results/73/codeFlows/0/threadFlows/0/locations/192)
# 2787|   				&le_eatt_client_connect_success_test_1,
# 2788|   				setup_powered_client, test_connect);
# 2789|-> 	test_l2cap_le("L2CAP LE EATT Server - Success",
# 2790|   				&le_eatt_server_success_test_1,
# 2791|   				setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def881]
bluez-5.85/tools/l2cap-tester.c:2792:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/l2cap-tester.c:2556:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2556:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2560:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2560:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2564:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2564:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2568:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2568:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2573:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2573:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2576:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2576:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2579:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2579:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2583:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2583:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2587:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2587:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2591:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2591:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2595:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2595:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2599:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2599:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2603:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2603:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2607:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2607:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2611:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2611:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2615:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2615:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2619:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2619:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2623:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2623:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2627:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2627:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2631:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2631:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2635:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2635:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2639:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2639:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2643:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2643:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2647:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2647:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2651:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2651:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2655:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2655:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2658:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2658:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2661:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2661:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2664:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2664:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2668:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2668:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2671:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2671:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2674:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2674:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2677:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2677:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2680:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2680:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2683:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2683:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2686:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2686:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2689:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2689:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2692:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2692:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2695:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2695:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2698:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2698:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2701:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2701:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2704:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2704:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2707:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2707:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2710:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2710:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2714:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2714:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2719:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2719:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2724:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2724:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2729:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2729:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2734:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2734:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2737:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2737:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2739:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2739:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2743:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2743:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2746:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2746:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2749:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2749:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2752:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2752:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2755:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2755:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2758:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2758:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2762:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2762:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2767:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2767:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2772:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2772:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2775:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2775:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2779:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2779:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2782:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2782:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2782:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2786:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2786:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2786:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2789:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2789:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2789:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/l2cap-tester.c:2792:9: branch_true: ...to here
bluez-5.85/tools/l2cap-tester.c:2792:9: acquire_memory: allocated here
bluez-5.85/tools/l2cap-tester.c:2792:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/l2cap-tester.c:2792:9: branch_false: ...to here
bluez-5.85/tools/l2cap-tester.c:2792:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/l2cap-tester.c:2792:9: danger: ‘user’ leaks here; was allocated at [(196)](sarif:/runs/0/results/74/codeFlows/0/threadFlows/0/locations/195)
# 2790|   				&le_eatt_server_success_test_1,
# 2791|   				setup_powered_server, test_server);
# 2792|-> 	test_l2cap_le("L2CAP LE EATT Server - Reject",
# 2793|   				&le_eatt_server_reject_test_1,
# 2794|   				setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def882]
bluez-5.85/tools/l2ping.c:78:17: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:78:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:78:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:78:17: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   76|   	recv_buf = malloc(L2CAP_CMD_HDR_SIZE + size);
#   77|   	if (!send_buf || !recv_buf) {
#   78|-> 		perror("Can't allocate buffer");
#   79|   		exit(1);
#   80|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def883]
bluez-5.85/tools/l2ping.c:78:17: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:78:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:78:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:78:17: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   76|   	recv_buf = malloc(L2CAP_CMD_HDR_SIZE + size);
#   77|   	if (!send_buf || !recv_buf) {
#   78|-> 		perror("Can't allocate buffer");
#   79|   		exit(1);
#   80|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def884]
bluez-5.85/tools/l2ping.c:85:17: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_true: following ‘true’ branch (when ‘sk < 0’)...
bluez-5.85/tools/l2ping.c:85:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:85:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:85:17: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   83|   	sk = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_L2CAP);
#   84|   	if (sk < 0) {
#   85|-> 		perror("Can't create socket");
#   86|   		goto error;
#   87|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def885]
bluez-5.85/tools/l2ping.c:85:17: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_true: following ‘true’ branch (when ‘sk < 0’)...
bluez-5.85/tools/l2ping.c:85:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:85:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:85:17: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   83|   	sk = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_L2CAP);
#   84|   	if (sk < 0) {
#   85|-> 		perror("Can't create socket");
#   86|   		goto error;
#   87|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def886]
bluez-5.85/tools/l2ping.c:95:17: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:95:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:95:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:95:17: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   93|   
#   94|   	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   95|-> 		perror("Can't bind socket");
#   96|   		goto error;
#   97|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def887]
bluez-5.85/tools/l2ping.c:95:17: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:95:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:95:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:95:17: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   93|   
#   94|   	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#   95|-> 		perror("Can't bind socket");
#   96|   		goto error;
#   97|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def888]
bluez-5.85/tools/l2ping.c:102:9: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:102:9: throw: if ‘str2ba’ throws an exception...
bluez-5.85/tools/l2ping.c:102:9: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  100|   	memset(&addr, 0, sizeof(addr));
#  101|   	addr.l2_family = AF_BLUETOOTH;
#  102|-> 	str2ba(svr, &addr.l2_bdaddr);
#  103|   
#  104|   	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def889]
bluez-5.85/tools/l2ping.c:102:9: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:102:9: throw: if ‘str2ba’ throws an exception...
bluez-5.85/tools/l2ping.c:102:9: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  100|   	memset(&addr, 0, sizeof(addr));
#  101|   	addr.l2_family = AF_BLUETOOTH;
#  102|-> 	str2ba(svr, &addr.l2_bdaddr);
#  103|   
#  104|   	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def890]
bluez-5.85/tools/l2ping.c:104:13: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:13: throw: if ‘connect’ throws an exception...
bluez-5.85/tools/l2ping.c:104:13: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  102|   	str2ba(svr, &addr.l2_bdaddr);
#  103|   
#  104|-> 	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  105|   		perror("Can't connect");
#  106|   		goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def891]
bluez-5.85/tools/l2ping.c:104:13: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:13: throw: if ‘connect’ throws an exception...
bluez-5.85/tools/l2ping.c:104:13: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  102|   	str2ba(svr, &addr.l2_bdaddr);
#  103|   
#  104|-> 	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  105|   		perror("Can't connect");
#  106|   		goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def892]
bluez-5.85/tools/l2ping.c:105:17: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:105:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:105:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:105:17: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  103|   
#  104|   	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  105|-> 		perror("Can't connect");
#  106|   		goto error;
#  107|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def893]
bluez-5.85/tools/l2ping.c:105:17: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:105:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:105:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:105:17: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  103|   
#  104|   	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  105|-> 		perror("Can't connect");
#  106|   		goto error;
#  107|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def894]
bluez-5.85/tools/l2ping.c:114:17: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:114:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:114:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:114:17: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  112|   
#  113|   	if (getsockname(sk, (struct sockaddr *) &addr, &optlen) < 0) {
#  114|-> 		perror("Can't get local address");
#  115|   		goto error;
#  116|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def895]
bluez-5.85/tools/l2ping.c:114:17: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:114:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:114:17: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:114:17: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  112|   
#  113|   	if (getsockname(sk, (struct sockaddr *) &addr, &optlen) < 0) {
#  114|-> 		perror("Can't get local address");
#  115|   		goto error;
#  116|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def896]
bluez-5.85/tools/l2ping.c:118:9: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:118:9: throw: if ‘ba2str’ throws an exception...
bluez-5.85/tools/l2ping.c:118:9: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  116|   	}
#  117|   
#  118|-> 	ba2str(&addr.l2_bdaddr, str);
#  119|   	printf("Ping: %s from %s (data size %d) ...\n", svr, str, size);
#  120|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def897]
bluez-5.85/tools/l2ping.c:118:9: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:118:9: throw: if ‘ba2str’ throws an exception...
bluez-5.85/tools/l2ping.c:118:9: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  116|   	}
#  117|   
#  118|-> 	ba2str(&addr.l2_bdaddr, str);
#  119|   	printf("Ping: %s from %s (data size %d) ...\n", svr, str, size);
#  120|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def898]
bluez-5.85/tools/l2ping.c:144:21: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:127:16: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:133:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:136:20: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:136:20: branch_true: ...to here
bluez-5.85/tools/l2ping.c:144:21: throw: if ‘send’ throws an exception...
bluez-5.85/tools/l2ping.c:144:21: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  142|   
#  143|   		/* Send Echo Command */
#  144|-> 		if (send(sk, send_buf, L2CAP_CMD_HDR_SIZE + size, 0) <= 0) {
#  145|   			perror("Send failed");
#  146|   			goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def899]
bluez-5.85/tools/l2ping.c:144:21: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:127:16: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:133:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:136:20: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:136:20: branch_true: ...to here
bluez-5.85/tools/l2ping.c:144:21: throw: if ‘send’ throws an exception...
bluez-5.85/tools/l2ping.c:144:21: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  142|   
#  143|   		/* Send Echo Command */
#  144|-> 		if (send(sk, send_buf, L2CAP_CMD_HDR_SIZE + size, 0) <= 0) {
#  145|   			perror("Send failed");
#  146|   			goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def900]
bluez-5.85/tools/l2ping.c:145:25: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:144:20: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:145:25: branch_true: ...to here
bluez-5.85/tools/l2ping.c:145:25: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:145:25: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  143|   		/* Send Echo Command */
#  144|   		if (send(sk, send_buf, L2CAP_CMD_HDR_SIZE + size, 0) <= 0) {
#  145|-> 			perror("Send failed");
#  146|   			goto error;
#  147|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def901]
bluez-5.85/tools/l2ping.c:145:25: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:144:20: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:145:25: branch_true: ...to here
bluez-5.85/tools/l2ping.c:145:25: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:145:25: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  143|   		/* Send Echo Command */
#  144|   		if (send(sk, send_buf, L2CAP_CMD_HDR_SIZE + size, 0) <= 0) {
#  145|-> 			perror("Send failed");
#  146|   			goto error;
#  147|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def902]
bluez-5.85/tools/l2ping.c:158:36: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:127:16: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:133:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:136:20: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:136:20: branch_true: ...to here
bluez-5.85/tools/l2ping.c:144:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:144:20: branch_false: ...to here
bluez-5.85/tools/l2ping.c:158:36: throw: if ‘poll’ throws an exception...
bluez-5.85/tools/l2ping.c:158:36: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  156|   			pf[0].events = POLLIN;
#  157|   
#  158|-> 			if ((err = poll(pf, 1, timeout * 1000)) < 0) {
#  159|   				perror("Poll failed");
#  160|   				goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def903]
bluez-5.85/tools/l2ping.c:158:36: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:127:16: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:133:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:136:20: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:136:20: branch_true: ...to here
bluez-5.85/tools/l2ping.c:144:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:144:20: branch_false: ...to here
bluez-5.85/tools/l2ping.c:158:36: throw: if ‘poll’ throws an exception...
bluez-5.85/tools/l2ping.c:158:36: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
#  156|   			pf[0].events = POLLIN;
#  157|   
#  158|-> 			if ((err = poll(pf, 1, timeout * 1000)) < 0) {
#  159|   				perror("Poll failed");
#  160|   				goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def904]
bluez-5.85/tools/l2ping.c:159:33: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:144:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:144:20: branch_false: ...to here
bluez-5.85/tools/l2ping.c:158:28: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:159:33: branch_true: ...to here
bluez-5.85/tools/l2ping.c:159:33: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:159:33: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  157|   
#  158|   			if ((err = poll(pf, 1, timeout * 1000)) < 0) {
#  159|-> 				perror("Poll failed");
#  160|   				goto error;
#  161|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def905]
bluez-5.85/tools/l2ping.c:159:33: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:144:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:144:20: branch_false: ...to here
bluez-5.85/tools/l2ping.c:158:28: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:159:33: branch_true: ...to here
bluez-5.85/tools/l2ping.c:159:33: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:159:33: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  157|   
#  158|   			if ((err = poll(pf, 1, timeout * 1000)) < 0) {
#  159|-> 				perror("Poll failed");
#  160|   				goto error;
#  161|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def906]
bluez-5.85/tools/l2ping.c:168:36: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:144:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:144:20: branch_false: ...to here
bluez-5.85/tools/l2ping.c:158:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:163:28: branch_false: ...to here
bluez-5.85/tools/l2ping.c:163:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:168:55: branch_false: ...to here
bluez-5.85/tools/l2ping.c:168:36: throw: if ‘recv’ throws an exception...
bluez-5.85/tools/l2ping.c:168:36: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
#  166|   			}
#  167|   
#  168|-> 			if ((err = recv(sk, recv_buf, L2CAP_CMD_HDR_SIZE + size, 0)) < 0) {
#  169|   				perror("Recv failed");
#  170|   				goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def907]
bluez-5.85/tools/l2ping.c:168:36: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:144:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:144:20: branch_false: ...to here
bluez-5.85/tools/l2ping.c:158:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:163:28: branch_false: ...to here
bluez-5.85/tools/l2ping.c:163:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:168:55: branch_false: ...to here
bluez-5.85/tools/l2ping.c:168:36: throw: if ‘recv’ throws an exception...
bluez-5.85/tools/l2ping.c:168:36: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
#  166|   			}
#  167|   
#  168|-> 			if ((err = recv(sk, recv_buf, L2CAP_CMD_HDR_SIZE + size, 0)) < 0) {
#  169|   				perror("Recv failed");
#  170|   				goto error;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def908]
bluez-5.85/tools/l2ping.c:169:33: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:144:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:144:20: branch_false: ...to here
bluez-5.85/tools/l2ping.c:158:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:163:28: branch_false: ...to here
bluez-5.85/tools/l2ping.c:163:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:168:55: branch_false: ...to here
bluez-5.85/tools/l2ping.c:169:33: throw: if ‘perror’ throws an exception...
bluez-5.85/tools/l2ping.c:169:33: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
#  167|   
#  168|   			if ((err = recv(sk, recv_buf, L2CAP_CMD_HDR_SIZE + size, 0)) < 0) {
#  169|-> 				perror("Recv failed");
#  170|   				goto error;
#  171|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def909]
bluez-5.85/tools/l2ping.c:222:33: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:60:13: enter_function: entry to ‘ping’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/l2ping.c:90:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:94:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:100:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:104:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:110:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:118:9: branch_false: ...to here
bluez-5.85/tools/l2ping.c:144:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:144:20: branch_false: ...to here
bluez-5.85/tools/l2ping.c:158:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:163:28: branch_false: ...to here
bluez-5.85/tools/l2ping.c:163:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:168:55: branch_false: ...to here
bluez-5.85/tools/l2ping.c:168:28: branch_false: following ‘false’ branch (when ‘err >= 0’)...
bluez-5.85/tools/l2ping.c:173:28: branch_false: ...to here
bluez-5.85/tools/l2ping.c:173:28: branch_false: following ‘false’ branch (when ‘err != 0’)...
bluez-5.85/tools/l2ping.c:181:29: branch_false: ...to here
bluez-5.85/tools/l2ping.c:196:20: branch_true: following ‘true’ branch (when ‘lost == 0’)...
bluez-5.85/tools/l2ping.c:197:25: branch_true: ...to here
bluez-5.85/tools/l2ping.c:202:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:219:48: call_function: inlined call to ‘tv2fl’ from ‘ping’
bluez-5.85/tools/l2ping.c:221:28: branch_true: following ‘true’ branch...
bluez-5.85/tools/l2ping.c:222:33: branch_true: ...to here
bluez-5.85/tools/l2ping.c:222:33: throw: if ‘sleep’ throws an exception...
bluez-5.85/tools/l2ping.c:222:33: danger: ‘send_buf’ leaks here; was allocated at [(2)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/1)
#  220|   
#  221|   			if (delay)
#  222|-> 				sleep(delay);
#  223|   		} else {
#  224|   			printf("no response from %s: id %d\n", svr, id - ident);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def910]
bluez-5.85/tools/l2ping.c:236:9: warning[-Wanalyzer-malloc-leak]: leak of ‘recv_buf’
bluez-5.85/tools/l2ping.c:76:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_true: following ‘true’ branch (when ‘sk < 0’)...
bluez-5.85/tools/l2ping.c:85:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:236:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/l2ping.c:236:9: danger: ‘recv_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
#  234|   
#  235|   error:
#  236|-> 	close(sk);
#  237|   	free(send_buf);
#  238|   	free(recv_buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def911]
bluez-5.85/tools/l2ping.c:236:9: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
bluez-5.85/tools/l2ping.c:75:20: acquire_memory: allocated here
bluez-5.85/tools/l2ping.c:77:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/l2ping.c:83:14: branch_false: ...to here
bluez-5.85/tools/l2ping.c:84:12: branch_true: following ‘true’ branch (when ‘sk < 0’)...
bluez-5.85/tools/l2ping.c:85:17: branch_true: ...to here
bluez-5.85/tools/l2ping.c:236:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/l2ping.c:236:9: danger: ‘send_buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
#  234|   
#  235|   error:
#  236|-> 	close(sk);
#  237|   	free(send_buf);
#  238|   	free(recv_buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def912]
bluez-5.85/tools/mesh-gatt/crypto.c:84:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘aes_ecb_setup(key)’
bluez-5.85/tools/mesh-gatt/crypto.c:232:6: enter_function: entry to ‘mesh_crypto_aes_ccm_encrypt’
bluez-5.85/tools/mesh-gatt/crypto.c:250:14: call_function: calling ‘aes_ecb_setup’ from ‘mesh_crypto_aes_ccm_encrypt’
bluez-5.85/tools/mesh-gatt/crypto.c:250:14: return_function: returning to ‘mesh_crypto_aes_ccm_encrypt’ from ‘aes_ecb_setup’
bluez-5.85/tools/mesh-gatt/crypto.c:251:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh-gatt/crypto.c:255:9: branch_false: ...to here
bluez-5.85/tools/mesh-gatt/crypto.c:259:18: call_function: inlined call to ‘aes_ecb’ from ‘mesh_crypto_aes_ccm_encrypt’
#   82|   	msg.msg_iovlen = 1;
#   83|   
#   84|-> 	len = sendmsg(fd, &msg, 0);
#   85|   	if (len < 0)
#   86|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def913]
bluez-5.85/tools/mesh-gatt/crypto.c:110:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/mesh-gatt/crypto.c:232:6: enter_function: entry to ‘mesh_crypto_aes_ccm_encrypt’
bluez-5.85/tools/mesh-gatt/crypto.c:250:14: call_function: calling ‘aes_ecb_setup’ from ‘mesh_crypto_aes_ccm_encrypt’
#  108|   
#  109|   	if (bind(fd, (struct sockaddr *) &salg, sizeof(salg)) < 0) {
#  110|-> 		close(fd);
#  111|   		return -1;
#  112|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def914]
bluez-5.85/tools/mesh-gatt/crypto.c:116:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘alg_new(fd,  key, 16, 0)’
bluez-5.85/tools/mesh-gatt/crypto.c:232:6: enter_function: entry to ‘mesh_crypto_aes_ccm_encrypt’
bluez-5.85/tools/mesh-gatt/crypto.c:250:14: call_function: calling ‘aes_ecb_setup’ from ‘mesh_crypto_aes_ccm_encrypt’
#  114|   	nfd = alg_new(fd, key, 16, 0);
#  115|   
#  116|-> 	close(fd);
#  117|   
#  118|   	return nfd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def915]
bluez-5.85/tools/mesh-gatt/crypto.c:116:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/mesh-gatt/crypto.c:232:6: enter_function: entry to ‘mesh_crypto_aes_ccm_encrypt’
bluez-5.85/tools/mesh-gatt/crypto.c:250:14: call_function: calling ‘aes_ecb_setup’ from ‘mesh_crypto_aes_ccm_encrypt’
#  114|   	nfd = alg_new(fd, key, 16, 0);
#  115|   
#  116|-> 	close(fd);
#  117|   
#  118|   	return nfd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def916]
bluez-5.85/tools/mesh-gatt/crypto.c:166:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/mesh-gatt/crypto.c:978:6: enter_function: entry to ‘mesh_crypto_virtual_addr’
bluez-5.85/tools/mesh-gatt/crypto.c:983:14: call_function: inlined call to ‘mesh_crypto_s1’ from ‘mesh_crypto_virtual_addr’
#  164|   
#  165|   	if (bind(fd, (struct sockaddr *) &salg, sizeof(salg)) < 0) {
#  166|-> 		close(fd);
#  167|   		return -1;
#  168|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def917]
bluez-5.85/tools/mesh-gatt/crypto.c:172:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘alg_new(fd,  key, 16, 0)’
bluez-5.85/tools/mesh-gatt/crypto.c:978:6: enter_function: entry to ‘mesh_crypto_virtual_addr’
bluez-5.85/tools/mesh-gatt/crypto.c:983:14: call_function: inlined call to ‘mesh_crypto_s1’ from ‘mesh_crypto_virtual_addr’
#  170|   	nfd = alg_new(fd, key, 16, 0);
#  171|   
#  172|-> 	close(fd);
#  173|   
#  174|   	return nfd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def918]
bluez-5.85/tools/mesh-gatt/crypto.c:172:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
bluez-5.85/tools/mesh-gatt/crypto.c:978:6: enter_function: entry to ‘mesh_crypto_virtual_addr’
bluez-5.85/tools/mesh-gatt/crypto.c:983:14: call_function: inlined call to ‘mesh_crypto_s1’ from ‘mesh_crypto_virtual_addr’
#  170|   	nfd = alg_new(fd, key, 16, 0);
#  171|   
#  172|-> 	close(fd);
#  173|   
#  174|   	return nfd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def919]
bluez-5.85/tools/mesh-gatt/crypto.c:185:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘aes_cmac_setup(key)’
bluez-5.85/tools/mesh-gatt/crypto.c:978:6: enter_function: entry to ‘mesh_crypto_virtual_addr’
bluez-5.85/tools/mesh-gatt/crypto.c:983:14: call_function: inlined call to ‘mesh_crypto_s1’ from ‘mesh_crypto_virtual_addr’
#  183|   		return false;
#  184|   
#  185|-> 	len = send(fd, msg, msg_len, 0);
#  186|   	if (len < 0)
#  187|   		return false;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def920]
bluez-5.85/tools/mesh-gatt/crypto.c:198:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘aes_cmac_setup(key)’
bluez-5.85/tools/mesh-gatt/crypto.c:932:6: enter_function: entry to ‘mesh_crypto_s1’
bluez-5.85/tools/mesh-gatt/crypto.c:936:16: call_function: calling ‘aes_cmac_one’ from ‘mesh_crypto_s1’
#  196|   static void aes_cmac_destroy(int fd)
#  197|   {
#  198|-> 	close(fd);
#  199|   }
#  200|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def921]
bluez-5.85/tools/mesh-gatt/crypto.c:376:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&mic’
bluez-5.85/tools/mesh-gatt/crypto.c:994:6: enter_function: entry to ‘mesh_crypto_packet_encode’
bluez-5.85/tools/mesh-gatt/crypto.c:1005:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/mesh-gatt/crypto.c:1005:34: call_function: inlined call to ‘get_be16’ from ‘mesh_crypto_packet_encode’
bluez-5.85/tools/mesh-gatt/crypto.c:1005:13: branch_true: following ‘true’ branch...
bluez-5.85/tools/mesh-gatt/crypto.c:1006:17: branch_true: ...to here
bluez-5.85/tools/mesh-gatt/crypto.c:1028:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/mesh-gatt/crypto.c:1029:22: branch_true: ...to here
bluez-5.85/tools/mesh-gatt/crypto.c:1029:22: call_function: inlined call to ‘mesh_crypto_aes_ccm_encrypt’ from ‘mesh_crypto_packet_encode’
#  374|   
#  375|   	if (out_msg)
#  376|-> 		memcpy(out_msg + msg_len, mic, mic_size);
#  377|   
#  378|   	if (out_mic) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def922]
bluez-5.85/tools/mesh-gatt/crypto.c:1150:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
bluez-5.85/tools/mesh-gatt/crypto.c:1144:14: acquire_resource: opened here
bluez-5.85/tools/mesh-gatt/crypto.c:1145:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh-gatt/crypto.c:1148:15: branch_false: ...to here
bluez-5.85/tools/mesh-gatt/crypto.c:1150:9: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 1148|   	len = read(fd, buf, num_bytes);
# 1149|   
# 1150|-> 	close(fd);
# 1151|   
# 1152|   	if (len < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def923]
bluez-5.85/tools/mesh-gatt/prov-db.c:56:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
bluez-5.85/tools/mesh-gatt/prov-db.c:1472:13: enter_function: entry to ‘read_json_db’
bluez-5.85/tools/mesh-gatt/prov-db.c:1489:15: call_function: calling ‘prov_file_read’ from ‘read_json_db’
#   54|   
#   55|   	fd = open(filename,O_RDONLY);
#   56|-> 	if (!fd)
#   57|   		return NULL;
#   58|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def924]
bluez-5.85/tools/mesh-gatt/prov-db.c:97:19: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(out_filename, "wr")’
bluez-5.85/tools/mesh-gatt/prov-db.c:877:6: enter_function: entry to ‘prov_db_local_set_seq_num’
bluez-5.85/tools/mesh-gatt/prov-db.c:885:18: call_function: calling ‘prov_file_read’ from ‘prov_db_local_set_seq_num’
bluez-5.85/tools/mesh-gatt/prov-db.c:885:18: return_function: returning to ‘prov_db_local_set_seq_num’ from ‘prov_file_read’
bluez-5.85/tools/mesh-gatt/prov-db.c:886:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh-gatt/prov-db.c:889:17: branch_false: ...to here
bluez-5.85/tools/mesh-gatt/prov-db.c:890:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh-gatt/prov-db.c:893:9: branch_false: ...to here
bluez-5.85/tools/mesh-gatt/prov-db.c:899:9: call_function: calling ‘prov_file_write’ from ‘prov_db_local_set_seq_num’
#   95|   	}
#   96|   
#   97|-> 	out_str = json_object_to_json_string_ext(jmain,
#   98|   						JSON_C_TO_STRING_PRETTY);
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def925]
bluez-5.85/tools/mesh-gatt/prov-db.c:97:19: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(out_filename, "wr")’
bluez-5.85/tools/mesh-gatt/prov-db.c:877:6: enter_function: entry to ‘prov_db_local_set_seq_num’
bluez-5.85/tools/mesh-gatt/prov-db.c:885:18: call_function: calling ‘prov_file_read’ from ‘prov_db_local_set_seq_num’
bluez-5.85/tools/mesh-gatt/prov-db.c:885:18: return_function: returning to ‘prov_db_local_set_seq_num’ from ‘prov_file_read’
bluez-5.85/tools/mesh-gatt/prov-db.c:886:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh-gatt/prov-db.c:889:17: branch_false: ...to here
bluez-5.85/tools/mesh-gatt/prov-db.c:890:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh-gatt/prov-db.c:893:9: branch_false: ...to here
bluez-5.85/tools/mesh-gatt/prov-db.c:899:9: call_function: calling ‘prov_file_write’ from ‘prov_db_local_set_seq_num’
#   95|   	}
#   96|   
#   97|-> 	out_str = json_object_to_json_string_ext(jmain,
#   98|   						JSON_C_TO_STRING_PRETTY);
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def926]
bluez-5.85/tools/mesh/mesh-db.c:98:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "w")’
bluez-5.85/tools/mesh/mesh-db.c:2166:6: enter_function: entry to ‘mesh_db_set_iv_index’
bluez-5.85/tools/mesh/mesh-db.c:2168:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh/mesh-db.c:2173:16: call_function: calling ‘save_config’ from ‘mesh_db_set_iv_index’
#   96|   	}
#   97|   
#   98|-> 	set_timestamp(cfg->jcfg);
#   99|   
#  100|   	str = json_object_to_json_string_ext(cfg->jcfg,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def927]
bluez-5.85/tools/mesh/mesh-db.c:98:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "w")’
bluez-5.85/tools/mesh/mesh-db.c:2166:6: enter_function: entry to ‘mesh_db_set_iv_index’
bluez-5.85/tools/mesh/mesh-db.c:2168:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh/mesh-db.c:2173:16: call_function: calling ‘save_config’ from ‘mesh_db_set_iv_index’
#   96|   	}
#   97|   
#   98|-> 	set_timestamp(cfg->jcfg);
#   99|   
#  100|   	str = json_object_to_json_string_ext(cfg->jcfg,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def928]
bluez-5.85/tools/mesh/mesh-db.c:2574:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "w")’
bluez-5.85/tools/mesh/mesh-db.c:2557:12: branch_false: following ‘false’ branch (when ‘expt_cfg’ is non-NULL)...
bluez-5.85/tools/mesh/mesh-db.c:2560:12: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2560:12: branch_false: following ‘false’ branch (when ‘is_error == 0’)...
bluez-5.85/tools/mesh/mesh-db.c:2565:12: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2565:12: branch_false: following ‘false’ branch (when ‘fname’ is non-NULL)...
bluez-5.85/tools/mesh/mesh-db.c:2568:19: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2568:19: acquire_resource: opened here
bluez-5.85/tools/mesh/mesh-db.c:2569:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh/mesh-db.c:2574:16: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2574:16: throw: if ‘json_object_new_object’ throws an exception...
bluez-5.85/tools/mesh/mesh-db.c:2574:16: danger: ‘fopen(fname, "w")’ leaks here; was opened at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
# 2572|   	}
# 2573|   
# 2574|-> 	jhdr = json_object_new_object();
# 2575|   	if (!add_string(jhdr, "$schema", js_schema))
# 2576|   		goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def929]
bluez-5.85/tools/mesh/mesh-db.c:2574:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "w")’
bluez-5.85/tools/mesh/mesh-db.c:2557:12: branch_false: following ‘false’ branch (when ‘expt_cfg’ is non-NULL)...
bluez-5.85/tools/mesh/mesh-db.c:2560:12: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2560:12: branch_false: following ‘false’ branch (when ‘is_error == 0’)...
bluez-5.85/tools/mesh/mesh-db.c:2565:12: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2565:12: branch_false: following ‘false’ branch (when ‘fname’ is non-NULL)...
bluez-5.85/tools/mesh/mesh-db.c:2568:19: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2568:19: acquire_memory: allocated here
bluez-5.85/tools/mesh/mesh-db.c:2569:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh/mesh-db.c:2574:16: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2574:16: throw: if ‘json_object_new_object’ throws an exception...
bluez-5.85/tools/mesh/mesh-db.c:2574:16: danger: ‘fopen(fname, "w")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
# 2572|   	}
# 2573|   
# 2574|-> 	jhdr = json_object_new_object();
# 2575|   	if (!add_string(jhdr, "$schema", js_schema))
# 2576|   		goto done;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def930]
bluez-5.85/tools/mesh/mesh-db.c:2575:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "w")’
bluez-5.85/tools/mesh/mesh-db.c:2547:6: enter_function: entry to ‘mesh_db_finish_export’
bluez-5.85/tools/mesh/mesh-db.c:2557:12: branch_false: following ‘false’ branch (when ‘expt_cfg’ is non-NULL)...
bluez-5.85/tools/mesh/mesh-db.c:2560:12: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2560:12: branch_false: following ‘false’ branch (when ‘is_error == 0’)...
bluez-5.85/tools/mesh/mesh-db.c:2565:12: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2565:12: branch_false: following ‘false’ branch (when ‘fname’ is non-NULL)...
bluez-5.85/tools/mesh/mesh-db.c:2568:19: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2568:19: acquire_resource: opened here
bluez-5.85/tools/mesh/mesh-db.c:2569:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh/mesh-db.c:2574:16: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2575:14: call_function: calling ‘add_string’ from ‘mesh_db_finish_export’
# 2573|   
# 2574|   	jhdr = json_object_new_object();
# 2575|-> 	if (!add_string(jhdr, "$schema", js_schema))
# 2576|   		goto done;
# 2577|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def931]
bluez-5.85/tools/mesh/mesh-db.c:2575:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "w")’
bluez-5.85/tools/mesh/mesh-db.c:2547:6: enter_function: entry to ‘mesh_db_finish_export’
bluez-5.85/tools/mesh/mesh-db.c:2557:12: branch_false: following ‘false’ branch (when ‘expt_cfg’ is non-NULL)...
bluez-5.85/tools/mesh/mesh-db.c:2560:12: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2560:12: branch_false: following ‘false’ branch (when ‘is_error == 0’)...
bluez-5.85/tools/mesh/mesh-db.c:2565:12: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2565:12: branch_false: following ‘false’ branch (when ‘fname’ is non-NULL)...
bluez-5.85/tools/mesh/mesh-db.c:2568:19: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2568:19: acquire_memory: allocated here
bluez-5.85/tools/mesh/mesh-db.c:2569:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mesh/mesh-db.c:2574:16: branch_false: ...to here
bluez-5.85/tools/mesh/mesh-db.c:2575:14: call_function: calling ‘add_string’ from ‘mesh_db_finish_export’
# 2573|   
# 2574|   	jhdr = json_object_new_object();
# 2575|-> 	if (!add_string(jhdr, "$schema", js_schema))
# 2576|   		goto done;
# 2577|   

Error: COMPILER_WARNING (CWE-704): [#def932]
bluez-5.85/tools/mesh/mesh-db.c: scope_hint: In function ‘mesh_db_finish_export’
bluez-5.85/tools/mesh/mesh-db.c:2598:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2598 |         pos = strrchr(hdr, '}');
#      |             ^
# 2596|   	 */
# 2597|   
# 2598|-> 	pos = strrchr(hdr, '}');
# 2599|   	if (!pos)
# 2600|   		goto done;

Error: COMPILER_WARNING (CWE-704): [#def933]
bluez-5.85/tools/mesh/mesh-db.c:2598:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2596|   	 */
# 2597|   
# 2598|-> 	pos = strrchr(hdr, '}');
# 2599|   	if (!pos)
# 2600|   		goto done;

Error: COMPILER_WARNING (CWE-704): [#def934]
bluez-5.85/tools/mesh/mesh-db.c:2604:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2604 |         pos = strrchr(hdr, '"');
#      |             ^
# 2602|   	*pos = '\0';
# 2603|   
# 2604|-> 	pos = strrchr(hdr, '"');
# 2605|   	if (!pos)
# 2606|   		goto done;

Error: COMPILER_WARNING (CWE-704): [#def935]
bluez-5.85/tools/mesh/mesh-db.c:2604:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2602|   	*pos = '\0';
# 2603|   
# 2604|-> 	pos = strrchr(hdr, '"');
# 2605|   	if (!pos)
# 2606|   		goto done;

Error: COMPILER_WARNING (CWE-704): [#def936]
bluez-5.85/tools/mesh/mesh-db.c:2613:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2613 |         pos = strchr(str, '{');
#      |             ^
# 2611|   		goto done;
# 2612|   
# 2613|-> 	pos = strchr(str, '{');
# 2614|   	if (!pos || pos[1] == '\0')
# 2615|   		goto done;

Error: COMPILER_WARNING (CWE-704): [#def937]
bluez-5.85/tools/mesh/mesh-db.c:2613:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2611|   		goto done;
# 2612|   
# 2613|-> 	pos = strchr(str, '{');
# 2614|   	if (!pos || pos[1] == '\0')
# 2615|   		goto done;

Error: CPPCHECK_WARNING (CWE-457): [#def938]
bluez-5.85/tools/meshctl.c:762: warning[uninitvar]: Uninitialized variable: addr
#  760|   			dbus_message_iter_get_basic(&iter, &addr);
#  761|   
#  762|-> 	bt_shell_printf("Attempting to disconnect from %s\n", addr);
#  763|   }
#  764|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def939]
bluez-5.85/tools/mpris-proxy.c:1915:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘name’
bluez-5.85/tools/mpris-proxy.c:2078:13: enter_function: entry to ‘register_player’
bluez-5.85/tools/mpris-proxy.c:2086:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mpris-proxy.c:2089:9: branch_false: ...to here
bluez-5.85/tools/mpris-proxy.c:2092:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mpris-proxy.c:2095:14: branch_false: ...to here
bluez-5.85/tools/mpris-proxy.c:2095:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mpris-proxy.c:2098:9: branch_false: ...to here
bluez-5.85/tools/mpris-proxy.c:2100:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mpris-proxy.c:2103:9: branch_false: ...to here
bluez-5.85/tools/mpris-proxy.c:2105:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/mpris-proxy.c:2109:27: branch_false: ...to here
bluez-5.85/tools/mpris-proxy.c:2112:28: call_function: calling ‘mpris_busname’ from ‘register_player’
# 1913|   static char *mpris_busname(char *name)
# 1914|   {
# 1915|-> 	if (g_ascii_isdigit(name[0]))
# 1916|   		return g_strconcat(MPRIS_BUS_NAME, "bt_",
# 1917|   				g_strcanon(name, A_Z a_z _0_9, '_'), NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def940]
bluez-5.85/tools/obex-client-tool.c:312:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/obex-client-tool.c:304:14: acquire_resource: socket created here
bluez-5.85/tools/obex-client-tool.c:305:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/obex-client-tool.c:312:13: branch_false: ...to here
bluez-5.85/tools/obex-client-tool.c:312:13: throw: if ‘connect’ throws an exception...
bluez-5.85/tools/obex-client-tool.c:312:13: danger: ‘sk’ leaks here
#  310|   	}
#  311|   
#  312|-> 	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  313|   		err = errno;
#  314|   		g_printerr("connect: %s (%d)\n", strerror(err), err);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def941]
bluez-5.85/tools/obex-server-tool.c:133:20: warning[-Wanalyzer-null-argument]: use of NULL ‘name’ where non-null expected
bluez-5.85/tools/obex-server-tool.c:120:17: release_memory: ‘type’ is NULL
bluez-5.85/tools/obex-server-tool.c:123:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/obex-server-tool.c:126:17: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:126:17: release_memory: ‘name’ is NULL
bluez-5.85/tools/obex-server-tool.c:129:62: release_memory: ‘name’ is NULL
bluez-5.85/tools/obex-server-tool.c:128:9: branch_false: following ‘false’ branch...
bluez-5.85/tools/obex-server-tool.c:128:55: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:133:20: release_memory: ‘name’ is NULL
bluez-5.85/tools/obex-server-tool.c:133:20: danger: argument 1 (‘name’) NULL where non-null expected
#  131|   	data = g_new0(struct transfer_data, 1);
#  132|   
#  133|-> 	data->fd = open(name, O_WRONLY | O_CREAT | O_NOCTTY, 0600);
#  134|   	if (data->fd < 0) {
#  135|   		g_printerr("open(%s): %s\n", name, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def942]
bluez-5.85/tools/obex-server-tool.c:192:20: warning[-Wanalyzer-null-argument]: use of NULL ‘name’ where non-null expected
bluez-5.85/tools/obex-server-tool.c:179:17: release_memory: ‘type’ is NULL
bluez-5.85/tools/obex-server-tool.c:182:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/obex-server-tool.c:185:17: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:185:17: release_memory: ‘name’ is NULL
bluez-5.85/tools/obex-server-tool.c:188:62: release_memory: ‘name’ is NULL
bluez-5.85/tools/obex-server-tool.c:187:9: branch_false: following ‘false’ branch...
bluez-5.85/tools/obex-server-tool.c:187:55: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:192:20: release_memory: ‘name’ is NULL
bluez-5.85/tools/obex-server-tool.c:192:20: danger: argument 1 (‘name’) NULL where non-null expected
#  190|   	data = g_new0(struct transfer_data, 1);
#  191|   
#  192|-> 	data->fd = open(name, O_RDONLY | O_NOCTTY, 0);
#  193|   	if (data->fd < 0) {
#  194|   		g_printerr("open(%s): %s\n", name, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def943]
bluez-5.85/tools/obex-server-tool.c:383:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/obex-server-tool.c:367:14: acquire_resource: socket created here
bluez-5.85/tools/obex-server-tool.c:368:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/obex-server-tool.c:375:13: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:375:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/obex-server-tool.c:382:13: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:382:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/obex-server-tool.c:384:66: branch_true: ...to here
bluez-5.85/tools/obex-server-tool.c:383:17: throw: if ‘g_printerr’ throws an exception...
bluez-5.85/tools/obex-server-tool.c:383:17: danger: ‘sk’ leaks here
#  381|   
#  382|   	if (listen(sk, 1) < 0) {
#  383|-> 		g_printerr("Can't listen on unix socket: %s (%d)\n",
#  384|   						strerror(errno), errno);
#  385|   		close(sk);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def944]
bluez-5.85/tools/obex-server-tool.c:385:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/obex-server-tool.c:367:14: acquire_resource: socket created here
bluez-5.85/tools/obex-server-tool.c:368:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/obex-server-tool.c:375:13: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:375:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/obex-server-tool.c:382:13: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:382:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/obex-server-tool.c:384:66: branch_true: ...to here
bluez-5.85/tools/obex-server-tool.c:385:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/obex-server-tool.c:385:17: danger: ‘sk’ leaks here
#  383|   		g_printerr("Can't listen on unix socket: %s (%d)\n",
#  384|   						strerror(errno), errno);
#  385|-> 		close(sk);
#  386|   		return 0;
#  387|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def945]
bluez-5.85/tools/obex-server-tool.c:389:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/obex-server-tool.c:367:14: acquire_resource: socket created here
bluez-5.85/tools/obex-server-tool.c:368:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/obex-server-tool.c:375:13: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:375:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/obex-server-tool.c:382:13: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:382:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/obex-server-tool.c:389:9: branch_false: ...to here
bluez-5.85/tools/obex-server-tool.c:389:9: throw: if ‘g_print’ throws an exception...
bluez-5.85/tools/obex-server-tool.c:389:9: danger: ‘sk’ leaks here
#  387|   	}
#  388|   
#  389|-> 	g_print("Unix socket created: %d\n", sk);
#  390|   
#  391|   	io = g_io_channel_unix_new(sk);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def946]
bluez-5.85/tools/parser/parser.h:132:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘f’
bluez-5.85/tools/parser/l2cap.c:1199:6: enter_function: entry to ‘l2cap_dump’
bluez-5.85/tools/parser/l2cap.c:1209:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/parser/l2cap.c:1215:20: branch_false: ...to here
bluez-5.85/tools/parser/l2cap.c:1215:20: branch_true: following ‘true’ branch...
bluez-5.85/tools/parser/l2cap.c:1217:25: branch_true: ...to here
bluez-5.85/tools/parser/l2cap.c:1217:25: call_function: calling ‘l2cap_parse’ from ‘l2cap_dump’
#  130|   						(long long)f->ts.tv_usec);
#  131|   		}
#  132|-> 		printf("%c ", (f->in ? '>' : '<'));
#  133|   		parser.state = 1;
#  134|   	} else 

Error: GCC_ANALYZER_WARNING (CWE-401): [#def947]
bluez-5.85/tools/parser/ppp.c:116:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
bluez-5.85/tools/parser/ppp.c:154:6: enter_function: entry to ‘ppp_dump’
bluez-5.85/tools/parser/ppp.c:201:16: branch_true: following ‘true’ branch...
bluez-5.85/tools/parser/ppp.c:202:23: branch_true: ...to here
bluez-5.85/tools/parser/ppp.c:203:20: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
bluez-5.85/tools/parser/ppp.c:206:20: branch_false: ...to here
bluez-5.85/tools/parser/ppp.c:212:20: branch_false: following ‘false’ branch (when ‘end’ is non-NULL)...
bluez-5.85/tools/parser/ppp.c:215:23: branch_false: ...to here
bluez-5.85/tools/parser/ppp.c:221:25: call_function: calling ‘unslip_frame’ from ‘ppp_dump’
#  114|   	printf("PPP: %s (0x%04x): len %d\n", proto2str(proto), proto, frm->len);
#  115|   
#  116|-> 	raw_dump(level + 1, frm);
#  117|   }
#  118|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def948]
bluez-5.85/tools/rctest.c:325:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/rctest.c:700:5: enter_function: entry to ‘main’
bluez-5.85/tools/rctest.c:861:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rctest.c:866:9: branch_false: ...to here
bluez-5.85/tools/rctest.c:878:25: call_function: calling ‘do_listen’ from ‘main’
#  323|   	/* Listen for connections */
#  324|   	if (listen(sk, 10)) {
#  325|-> 		syslog(LOG_ERR,"Can not listen on the socket: %s (%d)",
#  326|   							strerror(errno), errno);
#  327|   		goto error;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def949]
bluez-5.85/tools/rfcomm-tester.c:387:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/rfcomm-tester.c:379:14: acquire_resource: stream socket created here
bluez-5.85/tools/rfcomm-tester.c:380:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm-tester.c:387:9: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:387:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/rfcomm-tester.c:387:9: danger: ‘sk’ leaks here
#  385|   	}
#  386|   
#  387|-> 	close(sk);
#  388|   
#  389|   	tester_test_passed();

Error: GCC_ANALYZER_WARNING: [#def950]
bluez-5.85/tools/rfcomm-tester.c:404:13: warning[-Wanalyzer-fd-use-without-check]: ‘bind’ on possibly invalid file descriptor ‘sk’
#  402|   	bacpy(&addr.rc_bdaddr, address);
#  403|   
#  404|-> 	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  405|   		close(sk);
#  406|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def951]
bluez-5.85/tools/rfcomm-tester.c:405:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/rfcomm-tester.c:397:14: acquire_resource: socket created here
bluez-5.85/tools/rfcomm-tester.c:404:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm-tester.c:405:17: branch_true: ...to here
bluez-5.85/tools/rfcomm-tester.c:405:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/rfcomm-tester.c:405:17: danger: ‘sk’ leaks here
#  403|   
#  404|   	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  405|-> 		close(sk);
#  406|   		return -1;
#  407|   	}

Error: GCC_ANALYZER_WARNING (CWE-666): [#def952]
bluez-5.85/tools/rfcomm-tester.c:422:15: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘sk’ in wrong phase
bluez-5.85/tools/rfcomm-tester.c:628:13: enter_function: entry to ‘test_connect’
bluez-5.85/tools/rfcomm-tester.c:644:14: call_function: calling ‘create_rfcomm_sock’ from ‘test_connect’
bluez-5.85/tools/rfcomm-tester.c:644:14: return_function: returning to ‘test_connect’ from ‘create_rfcomm_sock’
bluez-5.85/tools/rfcomm-tester.c:646:13: call_function: calling ‘connect_rfcomm_sock’ from ‘test_connect’
#  420|   	addr.rc_channel = htobs(channel);
#  421|   
#  422|-> 	err = connect(sk, (struct sockaddr *) &addr, sizeof(addr));
#  423|   	if (err < 0 && !(errno == EAGAIN || errno == EINPROGRESS))
#  424|   		return err;

Error: GCC_ANALYZER_WARNING: [#def953]
bluez-5.85/tools/rfcomm-tester.c:422:15: warning[-Wanalyzer-fd-use-without-check]: ‘connect’ on possibly invalid file descriptor ‘sk’
bluez-5.85/tools/rfcomm-tester.c:628:13: enter_function: entry to ‘test_connect’
bluez-5.85/tools/rfcomm-tester.c:644:14: call_function: calling ‘create_rfcomm_sock’ from ‘test_connect’
bluez-5.85/tools/rfcomm-tester.c:644:14: return_function: returning to ‘test_connect’ from ‘create_rfcomm_sock’
bluez-5.85/tools/rfcomm-tester.c:646:13: call_function: calling ‘connect_rfcomm_sock’ from ‘test_connect’
#  420|   	addr.rc_channel = htobs(channel);
#  421|   
#  422|-> 	err = connect(sk, (struct sockaddr *) &addr, sizeof(addr));
#  423|   	if (err < 0 && !(errno == EAGAIN || errno == EINPROGRESS))
#  424|   		return err;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def954]
bluez-5.85/tools/rfcomm-tester.c:647:41: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘create_rfcomm_sock(hciemu_get_central_bdaddr(*<unknown>.hciemu), 0)’
bluez-5.85/tools/rfcomm-tester.c:628:13: enter_function: entry to ‘test_connect’
bluez-5.85/tools/rfcomm-tester.c:644:14: call_function: calling ‘create_rfcomm_sock’ from ‘test_connect’
bluez-5.85/tools/rfcomm-tester.c:644:14: return_function: returning to ‘test_connect’ from ‘create_rfcomm_sock’
bluez-5.85/tools/rfcomm-tester.c:646:13: call_function: calling ‘connect_rfcomm_sock’ from ‘test_connect’
bluez-5.85/tools/rfcomm-tester.c:646:13: return_function: returning to ‘test_connect’ from ‘connect_rfcomm_sock’
bluez-5.85/tools/rfcomm-tester.c:646:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm-tester.c:648:17: branch_true: ...to here
bluez-5.85/tools/rfcomm-tester.c:647:41: danger: ‘create_rfcomm_sock(hciemu_get_central_bdaddr(*<unknown>.hciemu), 0)’ leaks here
#  645|   
#  646|   	if (connect_rfcomm_sock(sk, (const bdaddr_t *) client_addr,
#  647|-> 					cli->client_channel) < 0) {
#  648|   		close(sk);
#  649|   		tester_test_failed();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def955]
bluez-5.85/tools/rfcomm-tester.c:706:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘g_io_channel_unix_get_fd(io)’
#  704|   	sk = g_io_channel_unix_get_fd(io);
#  705|   
#  706|-> 	new_sk = accept(sk, NULL, NULL);
#  707|   	if (new_sk < 0) {
#  708|   		tester_test_failed();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def956]
bluez-5.85/tools/rfcomm-tester.c:715:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’
bluez-5.85/tools/rfcomm-tester.c:707:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:712:13: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:712:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm-tester.c:715:53: branch_true: ...to here
bluez-5.85/tools/rfcomm-tester.c:715:23: throw: if ‘write’ throws an exception...
bluez-5.85/tools/rfcomm-tester.c:715:23: danger: ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’ leaks here
#  713|   		ssize_t ret;
#  714|   
#  715|-> 		ret = write(new_sk, srv->send_data, srv->data_len);
#  716|   		if (ret != srv->data_len)
#  717|   			tester_test_failed();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def957]
bluez-5.85/tools/rfcomm-tester.c:717:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’
bluez-5.85/tools/rfcomm-tester.c:707:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:712:13: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:712:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm-tester.c:715:53: branch_true: ...to here
bluez-5.85/tools/rfcomm-tester.c:716:20: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm-tester.c:717:25: branch_true: ...to here
bluez-5.85/tools/rfcomm-tester.c:717:25: throw: if ‘tester_test_failed’ throws an exception...
bluez-5.85/tools/rfcomm-tester.c:717:25: danger: ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’ leaks here
#  715|   		ret = write(new_sk, srv->send_data, srv->data_len);
#  716|   		if (ret != srv->data_len)
#  717|-> 			tester_test_failed();
#  718|   
#  719|   		close(new_sk);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def958]
bluez-5.85/tools/rfcomm-tester.c:719:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’
bluez-5.85/tools/rfcomm-tester.c:707:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:712:13: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:712:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm-tester.c:715:53: branch_true: ...to here
bluez-5.85/tools/rfcomm-tester.c:719:17: danger: ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’ leaks here
#  717|   			tester_test_failed();
#  718|   
#  719|-> 		close(new_sk);
#  720|   		return false;
#  721|   	} else if (srv->read_data) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def959]
bluez-5.85/tools/rfcomm-tester.c:724:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’
bluez-5.85/tools/rfcomm-tester.c:707:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:712:13: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:712:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:721:20: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:721:19: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm-tester.c:724:26: branch_true: ...to here
bluez-5.85/tools/rfcomm-tester.c:724:26: danger: ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’ leaks here
#  722|   		GIOChannel *new_io;
#  723|   
#  724|-> 		new_io = g_io_channel_unix_new(new_sk);
#  725|   		g_io_channel_set_close_on_unref(new_io, TRUE);
#  726|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def960]
bluez-5.85/tools/rfcomm-tester.c:734:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’
bluez-5.85/tools/rfcomm-tester.c:707:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:712:13: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:712:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:721:20: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:721:19: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:734:9: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:734:9: danger: ‘accept(g_io_channel_unix_get_fd(io), 0, 0)’ leaks here
#  732|   	}
#  733|   
#  734|-> 	close(new_sk);
#  735|   
#  736|   	tester_test_passed();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def961]
bluez-5.85/tools/rfcomm-tester.c:795:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘create_rfcomm_sock(hciemu_get_central_bdaddr(*<unknown>.hciemu), *srv.server_channel)’
bluez-5.85/tools/rfcomm-tester.c:777:13: enter_function: entry to ‘test_server’
bluez-5.85/tools/rfcomm-tester.c:788:14: call_function: calling ‘create_rfcomm_sock’ from ‘test_server’
bluez-5.85/tools/rfcomm-tester.c:788:14: return_function: returning to ‘test_server’ from ‘create_rfcomm_sock’
bluez-5.85/tools/rfcomm-tester.c:789:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:794:13: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:794:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm-tester.c:796:50: branch_true: ...to here
bluez-5.85/tools/rfcomm-tester.c:795:17: throw: if ‘tester_warn’ throws an exception...
bluez-5.85/tools/rfcomm-tester.c:795:17: danger: ‘create_rfcomm_sock(hciemu_get_central_bdaddr(*<unknown>.hciemu), *srv.server_channel)’ leaks here
#  793|   
#  794|   	if (listen(sk, 5) < 0) {
#  795|-> 		tester_warn("listening on socket failed: %s (%u)",
#  796|   				strerror(errno), errno);
#  797|   		tester_test_failed();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def962]
bluez-5.85/tools/rfcomm-tester.c:802:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘create_rfcomm_sock(hciemu_get_central_bdaddr(*<unknown>.hciemu), *srv.server_channel)’
bluez-5.85/tools/rfcomm-tester.c:777:13: enter_function: entry to ‘test_server’
bluez-5.85/tools/rfcomm-tester.c:788:14: call_function: calling ‘create_rfcomm_sock’ from ‘test_server’
bluez-5.85/tools/rfcomm-tester.c:788:14: return_function: returning to ‘test_server’ from ‘create_rfcomm_sock’
bluez-5.85/tools/rfcomm-tester.c:789:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:794:13: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:794:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm-tester.c:802:14: branch_false: ...to here
bluez-5.85/tools/rfcomm-tester.c:802:14: danger: ‘create_rfcomm_sock(hciemu_get_central_bdaddr(*<unknown>.hciemu), *srv.server_channel)’ leaks here
#  800|   	}
#  801|   
#  802|-> 	io = g_io_channel_unix_new(sk);
#  803|   	g_io_channel_set_close_on_unref(io, TRUE);
#  804|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def963]
bluez-5.85/tools/rfcomm.c:113:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ctl’
bluez-5.85/tools/rfcomm.c:687:5: enter_function: entry to ‘main’
bluez-5.85/tools/rfcomm.c:747:20: branch_false: following ‘false’ branch (when ‘argc == 0’)...
bluez-5.85/tools/rfcomm.c:754:15: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:754:15: acquire_resource: socket created here
bluez-5.85/tools/rfcomm.c:755:12: branch_false: following ‘false’ branch (when ‘ctl >= 0’)...
bluez-5.85/tools/rfcomm.c:760:12: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:760:12: branch_true: following ‘true’ branch (when ‘show_all != 0’)...
bluez-5.85/tools/rfcomm.c:761:17: branch_true: ...to here
bluez-5.85/tools/rfcomm.c:761:17: call_function: calling ‘print_dev_list’ from ‘main’
#  111|   	dl = malloc(sizeof(*dl) + RFCOMM_MAX_DEV * sizeof(*di));
#  112|   	if (!dl) {
#  113|-> 		perror("Can't allocate memory");
#  114|   		exit(1);
#  115|   	}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def964]
bluez-5.85/tools/rfcomm.c:234:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
bluez-5.85/tools/rfcomm.c:421:13: enter_function: entry to ‘cmd_listen’
bluez-5.85/tools/rfcomm.c:438:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm.c:443:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:459:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:465:58: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:473:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:480:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:500:12: branch_false: following ‘false’ branch (when ‘dev >= 0’)...
bluez-5.85/tools/rfcomm.c:507:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:526:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:533:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:563:12: branch_false: following ‘false’ branch (when ‘argc > 2’)...
bluez-5.85/tools/rfcomm.c:570:17: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:570:17: call_function: calling ‘run_cmdline’ from ‘cmd_listen’
#  232|   		sigaction(SIGPIPE, &sa, NULL);
#  233|   
#  234|-> 		i = execvp(cmdargv[0], cmdargv);
#  235|   		fprintf(stderr, "Couldn't execute command %s (errno=%d:%s)\n",
#  236|   				cmdargv[0], errno, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def965]
bluez-5.85/tools/rfcomm.c:248:33: warning[-Wanalyzer-malloc-leak]: leak of ‘cmdargv’
bluez-5.85/tools/rfcomm.c:217:19: acquire_memory: allocated here
bluez-5.85/tools/rfcomm.c:218:12: branch_false: following ‘false’ branch (when ‘cmdargv’ is non-NULL)...
bluez-5.85/tools/rfcomm.c:218:12: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:248:33: throw: if ‘waitpid’ throws an exception...
bluez-5.85/tools/rfcomm.c:248:33: danger: ‘cmdargv’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  246|   			struct timespec ts;
#  247|   
#  248|-> 			child = waitpid(-1, &status, WNOHANG);
#  249|   			if (child == pid || (child < 0 && errno != EAGAIN))
#  250|   				break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def966]
bluez-5.85/tools/rfcomm.c:255:29: warning[-Wanalyzer-malloc-leak]: leak of ‘cmdargv’
bluez-5.85/tools/rfcomm.c:217:19: acquire_memory: allocated here
bluez-5.85/tools/rfcomm.c:218:12: branch_false: following ‘false’ branch (when ‘cmdargv’ is non-NULL)...
bluez-5.85/tools/rfcomm.c:218:12: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:249:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:249:29: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:255:29: throw: if ‘ppoll’ throws an exception...
bluez-5.85/tools/rfcomm.c:255:29: danger: ‘cmdargv’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  253|   			ts.tv_sec  = 0;
#  254|   			ts.tv_nsec = 200;
#  255|-> 			if (ppoll(p, 1, &ts, sigs) || __io_canceled) {
#  256|   				kill(pid, SIGTERM);
#  257|   				waitpid(pid, &status, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def967]
bluez-5.85/tools/rfcomm.c:257:33: warning[-Wanalyzer-malloc-leak]: leak of ‘cmdargv’
bluez-5.85/tools/rfcomm.c:217:19: acquire_memory: allocated here
bluez-5.85/tools/rfcomm.c:218:12: branch_false: following ‘false’ branch (when ‘cmdargv’ is non-NULL)...
bluez-5.85/tools/rfcomm.c:218:12: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:249:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:249:29: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:257:33: throw: if ‘waitpid’ throws an exception...
bluez-5.85/tools/rfcomm.c:257:33: danger: ‘cmdargv’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  255|   			if (ppoll(p, 1, &ts, sigs) || __io_canceled) {
#  256|   				kill(pid, SIGTERM);
#  257|-> 				waitpid(pid, &status, 0);
#  258|   				break;
#  259|   			}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def968]
bluez-5.85/tools/rfcomm.c:354:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&devname, 256)’
bluez-5.85/tools/rfcomm.c:283:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
bluez-5.85/tools/rfcomm.c:288:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:297:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm.c:302:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:312:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:318:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:318:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:324:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:325:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:331:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:340:12: branch_false: following ‘false’ branch (when ‘dev >= 0’)...
bluez-5.85/tools/rfcomm.c:346:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:347:16: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm.c:348:21: branch_true: ...to here
bluez-5.85/tools/rfcomm.c:348:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:353:17: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:354:27: acquire_resource: opened here
bluez-5.85/tools/rfcomm.c:354:20: danger: ‘open(&devname, 256)’ leaks here; was opened at [(18)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/17)
#  352|   
#  353|   		snprintf(devname, MAXPATHLEN - 1, "/dev/bluetooth/rfcomm/%d", dev);
#  354|-> 		if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
#  355|   			if (try--) {
#  356|   				snprintf(devname, MAXPATHLEN - 1, "/dev/rfcomm%d", dev);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def969]
bluez-5.85/tools/rfcomm.c:365:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&devname, 256)’
bluez-5.85/tools/rfcomm.c:283:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
bluez-5.85/tools/rfcomm.c:288:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:297:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm.c:302:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:312:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:318:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:318:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:324:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:325:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:331:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:340:12: branch_false: following ‘false’ branch (when ‘dev >= 0’)...
bluez-5.85/tools/rfcomm.c:346:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:347:22: acquire_resource: opened here
bluez-5.85/tools/rfcomm.c:365:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:372:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:372:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/rfcomm.c:365:13: danger: ‘open(&devname, 256)’ leaks here; was opened at [(14)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/13)
#  363|   	}
#  364|   
#  365|-> 	if (rfcomm_raw_tty) {
#  366|   		tcflush(fd, TCIOFLUSH);
#  367|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def970]
bluez-5.85/tools/rfcomm.c:403:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p.fd’
bluez-5.85/tools/rfcomm.c:283:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
bluez-5.85/tools/rfcomm.c:288:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:297:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm.c:302:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:312:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:318:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:318:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:324:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:325:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:331:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:340:12: branch_false: following ‘false’ branch (when ‘dev >= 0’)...
bluez-5.85/tools/rfcomm.c:346:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:347:22: acquire_resource: opened here
bluez-5.85/tools/rfcomm.c:365:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:372:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:401:16: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm.c:402:17: branch_true: ...to here
bluez-5.85/tools/rfcomm.c:403:21: throw: if ‘ppoll’ throws an exception...
bluez-5.85/tools/rfcomm.c:403:21: danger: ‘p.fd’ leaks here; was opened at [(14)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/13)
#  401|   	while (!__io_canceled) {
#  402|   		p.revents = 0;
#  403|-> 		if (ppoll(&p, 1, NULL, &sigs) > 0)
#  404|   			break;
#  405|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def971]
bluez-5.85/tools/rfcomm.c:409:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p.fd’
bluez-5.85/tools/rfcomm.c:283:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
bluez-5.85/tools/rfcomm.c:288:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:297:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm.c:302:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:312:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:318:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:318:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:324:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:325:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:331:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:340:12: branch_false: following ‘false’ branch (when ‘dev >= 0’)...
bluez-5.85/tools/rfcomm.c:346:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:347:22: acquire_resource: opened here
bluez-5.85/tools/rfcomm.c:365:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:372:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:401:16: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:407:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:409:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/rfcomm.c:409:9: danger: ‘p.fd’ leaks here; was opened at [(14)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/13)
#  407|   	printf("Disconnected\n");
#  408|   
#  409|-> 	close(fd);
#  410|   	return;
#  411|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def972]
bluez-5.85/tools/rfcomm.c:470:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/rfcomm.c:437:14: acquire_resource: stream socket created here
bluez-5.85/tools/rfcomm.c:438:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm.c:443:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:459:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:465:58: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:470:15: throw: if ‘accept’ throws an exception...
bluez-5.85/tools/rfcomm.c:470:15: danger: ‘sk’ leaks here
#  468|   
#  469|   	alen = sizeof(raddr);
#  470|-> 	nsk = accept(sk, (struct sockaddr *) &raddr, &alen);
#  471|   
#  472|   	alen = sizeof(laddr);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def973]
bluez-5.85/tools/rfcomm.c:515:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&devname, 256)’
bluez-5.85/tools/rfcomm.c:438:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm.c:443:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:459:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:465:58: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:473:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:480:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:500:12: branch_false: following ‘false’ branch (when ‘dev >= 0’)...
bluez-5.85/tools/rfcomm.c:507:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:508:16: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm.c:509:21: branch_true: ...to here
bluez-5.85/tools/rfcomm.c:509:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:514:17: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:515:27: acquire_resource: opened here
bluez-5.85/tools/rfcomm.c:515:20: danger: ‘open(&devname, 256)’ leaks here; was opened at [(15)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/14)
#  513|   
#  514|   		snprintf(devname, MAXPATHLEN - 1, "/dev/bluetooth/rfcomm/%d", dev);
#  515|-> 		if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
#  516|   			if (try--) {
#  517|   				snprintf(devname, MAXPATHLEN - 1, "/dev/rfcomm%d", dev);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def974]
bluez-5.85/tools/rfcomm.c:526:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&devname, 256)’
bluez-5.85/tools/rfcomm.c:438:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm.c:443:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:459:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:465:58: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:473:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:480:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:500:12: branch_false: following ‘false’ branch (when ‘dev >= 0’)...
bluez-5.85/tools/rfcomm.c:507:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:508:22: acquire_resource: opened here
bluez-5.85/tools/rfcomm.c:526:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:533:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:533:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/rfcomm.c:526:13: danger: ‘open(&devname, 256)’ leaks here; was opened at [(11)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/10)
#  524|   	}
#  525|   
#  526|-> 	if (rfcomm_raw_tty) {
#  527|   		tcflush(fd, TCIOFLUSH);
#  528|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def975]
bluez-5.85/tools/rfcomm.c:566:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p.fd’
bluez-5.85/tools/rfcomm.c:438:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm.c:443:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:459:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:465:58: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:473:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:480:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:500:12: branch_false: following ‘false’ branch (when ‘dev >= 0’)...
bluez-5.85/tools/rfcomm.c:507:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:508:22: acquire_resource: opened here
bluez-5.85/tools/rfcomm.c:526:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:533:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:563:12: branch_true: following ‘true’ branch (when ‘argc <= 2’)...
bluez-5.85/tools/rfcomm.c:563:12: branch_true: ...to here
bluez-5.85/tools/rfcomm.c:564:24: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm.c:565:25: branch_true: ...to here
bluez-5.85/tools/rfcomm.c:566:29: throw: if ‘ppoll’ throws an exception...
bluez-5.85/tools/rfcomm.c:566:29: danger: ‘p.fd’ leaks here; was opened at [(11)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/10)
#  564|   		while (!__io_canceled) {
#  565|   			p.revents = 0;
#  566|-> 			if (ppoll(&p, 1, NULL, &sigs) > 0)
#  567|   				break;
#  568|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def976]
bluez-5.85/tools/rfcomm.c:578:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p.fd’
bluez-5.85/tools/rfcomm.c:438:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/rfcomm.c:443:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:459:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:465:58: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:473:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:480:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:500:12: branch_false: following ‘false’ branch (when ‘dev >= 0’)...
bluez-5.85/tools/rfcomm.c:507:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:508:22: acquire_resource: opened here
bluez-5.85/tools/rfcomm.c:526:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:533:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:563:12: branch_true: following ‘true’ branch (when ‘argc <= 2’)...
bluez-5.85/tools/rfcomm.c:563:12: branch_true: ...to here
bluez-5.85/tools/rfcomm.c:564:24: branch_false: following ‘false’ branch...
bluez-5.85/tools/rfcomm.c:572:9: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:578:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/rfcomm.c:578:9: danger: ‘p.fd’ leaks here; was opened at [(11)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/10)
#  576|   	printf("Disconnected\n");
#  577|   
#  578|-> 	close(fd);
#  579|   	return;
#  580|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def977]
bluez-5.85/tools/rfcomm.c:778:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ctl’
bluez-5.85/tools/rfcomm.c:754:15: acquire_resource: socket created here
bluez-5.85/tools/rfcomm.c:755:12: branch_false: following ‘false’ branch (when ‘ctl >= 0’)...
bluez-5.85/tools/rfcomm.c:760:12: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:760:12: branch_false: following ‘false’ branch (when ‘show_all == 0’)...
bluez-5.85/tools/rfcomm.c:766:13: branch_false: ...to here
bluez-5.85/tools/rfcomm.c:773:21: branch_true: following ‘true’ branch...
bluez-5.85/tools/rfcomm.c:774:21: branch_true: ...to here
bluez-5.85/tools/rfcomm.c:778:17: throw: if the called function throws an exception...
bluez-5.85/tools/rfcomm.c:778:17: danger: ‘ctl’ leaks here
#  776|   		argc--;
#  777|   		argv++;
#  778|-> 		command[i].func(ctl, dev_id, &bdaddr, argc, argv);
#  779|   		close(ctl);
#  780|   		exit(0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def978]
bluez-5.85/tools/sco-tester.c:481:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/sco-tester.c:473:14: acquire_resource: socket created here
bluez-5.85/tools/sco-tester.c:474:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/sco-tester.c:481:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:481:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/sco-tester.c:481:9: danger: ‘sk’ leaks here
#  479|   	}
#  480|   
#  481|-> 	close(sk);
#  482|   
#  483|   	tester_test_passed();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def979]
bluez-5.85/tools/sco-tester.c:700:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘create_sco_sock(tester_get_data())’
bluez-5.85/tools/sco-tester.c:923:13: enter_function: entry to ‘test_connect’
bluez-5.85/tools/sco-tester.c:929:14: call_function: calling ‘create_sco_sock’ from ‘test_connect’
bluez-5.85/tools/sco-tester.c:929:14: return_function: returning to ‘test_connect’ from ‘create_sco_sock’
bluez-5.85/tools/sco-tester.c:930:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/sco-tester.c:935:13: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:935:13: call_function: calling ‘connect_sco_sock’ from ‘test_connect’
#  698|   	}
#  699|   
#  700|-> 	central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
#  701|   	if (!central_bdaddr) {
#  702|   		tester_warn("No central bdaddr");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def980]
bluez-5.85/tools/sco-tester.c:700:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/sco-tester.c:691:14: acquire_resource: socket created here
bluez-5.85/tools/sco-tester.c:693:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/sco-tester.c:700:26: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:700:26: throw: if ‘hciemu_get_central_bdaddr’ throws an exception...
bluez-5.85/tools/sco-tester.c:700:26: danger: ‘sk’ leaks here
#  698|   	}
#  699|   
#  700|-> 	central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
#  701|   	if (!central_bdaddr) {
#  702|   		tester_warn("No central bdaddr");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def981]
bluez-5.85/tools/sco-tester.c:702:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/sco-tester.c:691:14: acquire_resource: socket created here
bluez-5.85/tools/sco-tester.c:693:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/sco-tester.c:700:26: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:701:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/sco-tester.c:702:17: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:702:17: throw: if ‘tester_warn’ throws an exception...
bluez-5.85/tools/sco-tester.c:702:17: danger: ‘sk’ leaks here
#  700|   	central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
#  701|   	if (!central_bdaddr) {
#  702|-> 		tester_warn("No central bdaddr");
#  703|   		return -ENODEV;
#  704|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def982]
bluez-5.85/tools/sco-tester.c:712:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/sco-tester.c:691:14: acquire_resource: socket created here
bluez-5.85/tools/sco-tester.c:693:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/sco-tester.c:700:26: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:701:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/sco-tester.c:706:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:710:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/sco-tester.c:711:24: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:712:17: throw: if ‘tester_warn’ throws an exception...
bluez-5.85/tools/sco-tester.c:712:17: danger: ‘sk’ leaks here
#  710|   	if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  711|   		err = -errno;
#  712|-> 		tester_warn("Can't bind socket: %s (%d)", strerror(errno),
#  713|   									errno);
#  714|   		close(sk);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def983]
bluez-5.85/tools/sco-tester.c:714:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/sco-tester.c:691:14: acquire_resource: socket created here
bluez-5.85/tools/sco-tester.c:693:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/sco-tester.c:700:26: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:701:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/sco-tester.c:706:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:710:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/sco-tester.c:711:24: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:714:17: throw: if ‘close’ throws an exception...
bluez-5.85/tools/sco-tester.c:714:17: danger: ‘sk’ leaks here
#  712|   		tester_warn("Can't bind socket: %s (%d)", strerror(errno),
#  713|   									errno);
#  714|-> 		close(sk);
#  715|   		return err;
#  716|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def984]
bluez-5.85/tools/sco-tester.c:719:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/sco-tester.c:691:14: acquire_resource: socket created here
bluez-5.85/tools/sco-tester.c:693:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/sco-tester.c:700:26: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:701:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/sco-tester.c:702:17: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:719:1: danger: ‘sk’ leaks here
#  717|   
#  718|   	return sk;
#  719|-> }
#  720|   
#  721|   static int connect_sco_sock(struct test_data *data, int sk)

Error: GCC_ANALYZER_WARNING (CWE-666): [#def985]
bluez-5.85/tools/sco-tester.c:737:15: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘sk’ in wrong phase
bluez-5.85/tools/sco-tester.c:923:13: enter_function: entry to ‘test_connect’
bluez-5.85/tools/sco-tester.c:929:14: call_function: calling ‘create_sco_sock’ from ‘test_connect’
bluez-5.85/tools/sco-tester.c:929:14: return_function: returning to ‘test_connect’ from ‘create_sco_sock’
bluez-5.85/tools/sco-tester.c:930:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/sco-tester.c:935:13: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:935:13: call_function: calling ‘connect_sco_sock’ from ‘test_connect’
#  735|   	bacpy(&addr.sco_bdaddr, (void *) client_bdaddr);
#  736|   
#  737|-> 	err = connect(sk, (struct sockaddr *) &addr, sizeof(addr));
#  738|   	if (err < 0 && !(errno == EAGAIN || errno == EINPROGRESS)) {
#  739|   		err = -errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def986]
bluez-5.85/tools/sco-tester.c:1189:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1189:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1189:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1189:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1189:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1189:9: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
# 1187|   	tester_init(&argc, &argv);
# 1188|   
# 1189|-> 	test_sco("Basic Framework - Success", NULL, setup_powered,
# 1190|   							test_framework);
# 1191|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def987]
bluez-5.85/tools/sco-tester.c:1192:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1192:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1192:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1192:9: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
# 1190|   							test_framework);
# 1191|   
# 1192|-> 	test_sco("Basic SCO Socket - Success", NULL, setup_powered,
# 1193|   							test_socket);
# 1194|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def988]
bluez-5.85/tools/sco-tester.c:1195:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1195:9: danger: ‘user’ leaks here; was allocated at [(4)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/3)
# 1193|   							test_socket);
# 1194|   
# 1195|-> 	test_sco("Basic SCO Get Socket Option - Success", NULL, setup_powered,
# 1196|   							test_getsockopt);
# 1197|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def989]
bluez-5.85/tools/sco-tester.c:1198:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1198:9: danger: ‘user’ leaks here; was allocated at [(7)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/6)
# 1196|   							test_getsockopt);
# 1197|   
# 1198|-> 	test_sco("Basic SCO Set Socket Option - Success", NULL, setup_powered,
# 1199|   							test_setsockopt);
# 1200|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def990]
bluez-5.85/tools/sco-tester.c:1201:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1201:9: danger: ‘user’ leaks here; was allocated at [(10)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/9)
# 1199|   							test_setsockopt);
# 1200|   
# 1201|-> 	test_sco("eSCO CVSD - Success", &connect_success, setup_powered,
# 1202|   							test_connect);
# 1203|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def991]
bluez-5.85/tools/sco-tester.c:1204:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1204:9: danger: ‘user’ leaks here; was allocated at [(13)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/12)
# 1202|   							test_connect);
# 1203|   
# 1204|-> 	test_sco("eSCO mSBC - Success", &connect_success, setup_powered,
# 1205|   							test_connect_transp);
# 1206|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def992]
bluez-5.85/tools/sco-tester.c:1207:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1207:9: danger: ‘user’ leaks here; was allocated at [(16)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/15)
# 1205|   							test_connect_transp);
# 1206|   
# 1207|-> 	test_sco("SCO Disconnect - Success", &disconnect_success, setup_powered,
# 1208|   							test_disconnect);
# 1209|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def993]
bluez-5.85/tools/sco-tester.c:1210:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1210:9: danger: ‘user’ leaks here; was allocated at [(19)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/18)
# 1208|   							test_disconnect);
# 1209|   
# 1210|-> 	test_sco("eSCO Simultaneous Disconnect - Failure",
# 1211|   					&connect_failure_reset, setup_powered,
# 1212|   					test_connect_simult_disc);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def994]
bluez-5.85/tools/sco-tester.c:1214:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1214:9: danger: ‘user’ leaks here; was allocated at [(22)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/21)
# 1212|   					test_connect_simult_disc);
# 1213|   
# 1214|-> 	test_sco("eSCO ACL Disconnect - Failure",
# 1215|   					&connect_failure_reset, setup_powered,
# 1216|   					test_connect_acl_disc);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def995]
bluez-5.85/tools/sco-tester.c:1218:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1218:9: danger: ‘user’ leaks here; was allocated at [(25)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/24)
# 1216|   					test_connect_acl_disc);
# 1217|   
# 1218|-> 	test_sco_11("SCO CVSD 1.1 - Success", &connect_success, setup_powered,
# 1219|   							test_connect);
# 1220|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def996]
bluez-5.85/tools/sco-tester.c:1221:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1221:9: danger: ‘user’ leaks here; was allocated at [(28)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/27)
# 1219|   							test_connect);
# 1220|   
# 1221|-> 	test_sco_11("SCO mSBC 1.1 - Failure", &connect_failure, setup_powered,
# 1222|   							test_connect_transp);
# 1223|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def997]
bluez-5.85/tools/sco-tester.c:1224:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1224:9: danger: ‘user’ leaks here; was allocated at [(31)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/30)
# 1222|   							test_connect_transp);
# 1223|   
# 1224|-> 	test_sco("SCO CVSD Recv - Success", &connect_recv_success,
# 1225|   					setup_powered, test_connect);
# 1226|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def998]
bluez-5.85/tools/sco-tester.c:1227:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1227:9: danger: ‘user’ leaks here; was allocated at [(34)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/33)
# 1225|   					setup_powered, test_connect);
# 1226|   
# 1227|-> 	test_sco("SCO CVSD Recv - RX Timestamping", &connect_recv_rx_ts_success,
# 1228|   					setup_powered, test_connect);
# 1229|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def999]
bluez-5.85/tools/sco-tester.c:1230:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1230:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1230:9: danger: ‘user’ leaks here; was allocated at [(37)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/36)
# 1228|   					setup_powered, test_connect);
# 1229|   
# 1230|-> 	test_sco("SCO CVSD Send - Success", &connect_send_success,
# 1231|   					setup_powered, test_connect);
# 1232|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1000]
bluez-5.85/tools/sco-tester.c:1233:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1233:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1233:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1233:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1233:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1233:9: danger: ‘user’ leaks here; was allocated at [(40)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/39)
# 1231|   					setup_powered, test_connect);
# 1232|   
# 1233|-> 	test_sco_no_flowctl("SCO CVSD Send No Flowctl - Success",
# 1234|   			&connect_send_success, setup_powered, test_connect);
# 1235|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1001]
bluez-5.85/tools/sco-tester.c:1236:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1233:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1236:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1236:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1236:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1236:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1236:9: danger: ‘user’ leaks here; was allocated at [(43)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/42)
# 1234|   			&connect_send_success, setup_powered, test_connect);
# 1235|   
# 1236|-> 	test_sco("SCO CVSD Send - TX Timestamping",
# 1237|   					&connect_send_tx_timestamping,
# 1238|   					setup_powered, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1002]
bluez-5.85/tools/sco-tester.c:1240:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1233:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1236:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1240:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1240:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1240:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1240:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1240:9: danger: ‘user’ leaks here; was allocated at [(46)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/45)
# 1238|   					setup_powered, test_connect);
# 1239|   
# 1240|-> 	test_sco_no_flowctl("SCO CVSD Send No Flowctl - TX Timestamping",
# 1241|   				&connect_send_no_flowctl_tx_timestamping,
# 1242|   				setup_powered, test_connect);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1003]
bluez-5.85/tools/sco-tester.c:1244:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1233:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1236:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1240:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1244:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1244:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1244:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1244:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1244:9: danger: ‘user’ leaks here; was allocated at [(49)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/48)
# 1242|   				setup_powered, test_connect);
# 1243|   
# 1244|-> 	test_sco_11("SCO CVSD 1.1 Send - Success", &connect_send_success,
# 1245|   					setup_powered, test_connect);
# 1246|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1004]
bluez-5.85/tools/sco-tester.c:1247:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1233:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1236:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1240:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1244:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1247:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1247:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1247:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1247:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1247:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1247:9: danger: ‘user’ leaks here; was allocated at [(52)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/51)
# 1245|   					setup_powered, test_connect);
# 1246|   
# 1247|-> 	test_sco_11_no_flowctl("SCO CVSD 1.1 Send No Flowctl - Success",
# 1248|   			&connect_send_success, setup_powered, test_connect);
# 1249|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1005]
bluez-5.85/tools/sco-tester.c:1250:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1233:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1236:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1240:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1244:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1247:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1247:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1247:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1250:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1250:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1250:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1250:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1250:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1250:9: danger: ‘user’ leaks here; was allocated at [(55)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/54)
# 1248|   			&connect_send_success, setup_powered, test_connect);
# 1249|   
# 1250|-> 	test_offload_sco("Basic SCO Get Socket Option - Offload - Success",
# 1251|   				NULL, setup_powered, test_codecs_getsockopt);
# 1252|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1006]
bluez-5.85/tools/sco-tester.c:1253:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1233:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1236:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1240:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1244:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1247:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1247:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1247:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1250:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1250:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1250:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1253:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1253:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1253:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1253:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1253:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1253:9: danger: ‘user’ leaks here; was allocated at [(58)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/57)
# 1251|   				NULL, setup_powered, test_codecs_getsockopt);
# 1252|   
# 1253|-> 	test_offload_sco("Basic SCO Set Socket Option - Offload - Success",
# 1254|   				NULL, setup_powered, test_codecs_setsockopt);
# 1255|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1007]
bluez-5.85/tools/sco-tester.c:1256:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1233:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1236:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1240:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1244:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1247:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1247:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1247:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1250:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1250:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1250:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1253:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1253:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1253:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1256:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1256:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1256:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1256:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1256:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1256:9: danger: ‘user’ leaks here; was allocated at [(61)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/60)
# 1254|   				NULL, setup_powered, test_codecs_setsockopt);
# 1255|   
# 1256|-> 	test_offload_sco("eSCO mSBC - Offload - Success",
# 1257|   		&connect_success, setup_powered, test_connect_offload_msbc);
# 1258|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1008]
bluez-5.85/tools/sco-tester.c:1259:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/sco-tester.c:1192:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1192:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1195:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1195:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1198:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1198:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1201:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1201:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1204:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1204:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1207:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1207:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1210:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1210:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1214:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1214:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1218:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1218:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1221:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1221:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1224:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1224:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1227:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1227:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1230:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1230:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1233:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1233:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1236:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1236:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1240:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1240:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1244:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1244:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1247:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1247:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1247:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1250:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1250:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1250:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1253:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1253:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1253:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1256:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1256:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1256:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/sco-tester.c:1259:9: branch_true: ...to here
bluez-5.85/tools/sco-tester.c:1259:9: acquire_memory: allocated here
bluez-5.85/tools/sco-tester.c:1259:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/sco-tester.c:1259:9: branch_false: ...to here
bluez-5.85/tools/sco-tester.c:1259:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/sco-tester.c:1259:9: danger: ‘user’ leaks here; was allocated at [(64)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/63)
# 1257|   		&connect_success, setup_powered, test_connect_offload_msbc);
# 1258|   
# 1259|-> 	test_sco("SCO Ethtool Get Ts Info - Success",
# 1260|   			NULL, setup_powered, test_sco_ethtool_get_ts_info);
# 1261|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1009]
bluez-5.85/tools/scotest.c:167:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/scotest.c:139:14: acquire_resource: socket created here
bluez-5.85/tools/scotest.c:140:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/scotest.c:148:9: branch_false: ...to here
bluez-5.85/tools/scotest.c:151:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/scotest.c:158:13: branch_false: ...to here
bluez-5.85/tools/scotest.c:166:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/scotest.c:168:74: branch_true: ...to here
bluez-5.85/tools/scotest.c:167:17: throw: if ‘syslog’ throws an exception...
bluez-5.85/tools/scotest.c:167:17: danger: ‘sk’ leaks here
#  165|   	/* Listen for connections */
#  166|   	if (listen(sk, 10)) {
#  167|-> 		syslog(LOG_ERR,"Can not listen on the socket: %s (%d)",
#  168|   							strerror(errno), errno);
#  169|   		goto error;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1010]
bluez-5.85/tools/scotest.c:172:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/scotest.c:139:14: acquire_resource: socket created here
bluez-5.85/tools/scotest.c:140:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/scotest.c:148:9: branch_false: ...to here
bluez-5.85/tools/scotest.c:151:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/scotest.c:158:13: branch_false: ...to here
bluez-5.85/tools/scotest.c:166:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/scotest.c:172:9: branch_false: ...to here
bluez-5.85/tools/scotest.c:172:9: throw: if ‘syslog’ throws an exception...
bluez-5.85/tools/scotest.c:172:9: danger: ‘sk’ leaks here
#  170|   	}
#  171|   
#  172|-> 	syslog(LOG_INFO,"Waiting for connection ...");
#  173|   
#  174|   	while (1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1011]
bluez-5.85/tools/scotest.c:178:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/scotest.c:139:14: acquire_resource: socket created here
bluez-5.85/tools/scotest.c:140:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/scotest.c:148:9: branch_false: ...to here
bluez-5.85/tools/scotest.c:151:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/scotest.c:158:13: branch_false: ...to here
bluez-5.85/tools/scotest.c:166:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/scotest.c:172:9: branch_false: ...to here
bluez-5.85/tools/scotest.c:178:23: throw: if ‘accept’ throws an exception...
bluez-5.85/tools/scotest.c:178:23: danger: ‘sk’ leaks here
#  176|   		optlen = sizeof(addr);
#  177|   
#  178|-> 		nsk = accept(sk, (struct sockaddr *) &addr, &optlen);
#  179|   		if (nsk < 0) {
#  180|   			syslog(LOG_ERR,"Accept failed: %s (%d)",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1012]
bluez-5.85/tools/scotest.c:229:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sk’
bluez-5.85/tools/scotest.c:139:14: acquire_resource: socket created here
bluez-5.85/tools/scotest.c:140:12: branch_false: following ‘false’ branch (when ‘sk >= 0’)...
bluez-5.85/tools/scotest.c:148:9: branch_false: ...to here
bluez-5.85/tools/scotest.c:151:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/scotest.c:158:13: branch_false: ...to here
bluez-5.85/tools/scotest.c:166:12: branch_true: following ‘true’ branch...
bluez-5.85/tools/scotest.c:168:74: branch_true: ...to here
bluez-5.85/tools/scotest.c:229:9: throw: if ‘close’ throws an exception...
bluez-5.85/tools/scotest.c:229:9: danger: ‘sk’ leaks here
#  227|   
#  228|   error:
#  229|-> 	close(sk);
#  230|   	exit(1);
#  231|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1013]
bluez-5.85/tools/seq2bseq.c:31:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(input_path, "r")’
bluez-5.85/tools/seq2bseq.c:54:13: enter_function: entry to ‘convert_file’
bluez-5.85/tools/seq2bseq.c:65:12: branch_false: following ‘false’ branch (when ‘output_path’ is NULL)...
bluez-5.85/tools/seq2bseq.c:72:23: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:73:20: branch_false: following ‘false’ branch (when ‘ptr’ is NULL)...
bluez-5.85/tools/seq2bseq.c:82:29: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:82:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:89:9: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:95:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:100:13: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:100:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:106:13: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:112:14: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:112:14: acquire_resource: opened here
bluez-5.85/tools/seq2bseq.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:113:12: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:124:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:129:23: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:129:23: call_function: calling ‘convert_line’ from ‘convert_file’
#   29|   	unsigned char val;
#   30|   
#   31|-> 	if (line[0] == '*' || line[0] == '\r' || line[0] == '\n')
#   32|   		return 0;
#   33|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1014]
bluez-5.85/tools/seq2bseq.c:31:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(input_path, "r")’
bluez-5.85/tools/seq2bseq.c:54:13: enter_function: entry to ‘convert_file’
bluez-5.85/tools/seq2bseq.c:65:12: branch_false: following ‘false’ branch (when ‘output_path’ is NULL)...
bluez-5.85/tools/seq2bseq.c:72:23: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:73:20: branch_false: following ‘false’ branch (when ‘ptr’ is NULL)...
bluez-5.85/tools/seq2bseq.c:82:29: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:82:28: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:89:9: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:95:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:100:13: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:100:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:106:13: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:106:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:112:14: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:112:14: acquire_memory: allocated here
bluez-5.85/tools/seq2bseq.c:113:12: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:113:12: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:124:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:129:23: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:129:23: call_function: calling ‘convert_line’ from ‘convert_file’
#   29|   	unsigned char val;
#   30|   
#   31|-> 	if (line[0] == '*' || line[0] == '\r' || line[0] == '\n')
#   32|   		return 0;
#   33|   

Error: COMPILER_WARNING: [#def1015]
bluez-5.85/tools/seq2bseq.c: scope_hint: In function ‘convert_file’
bluez-5.85/tools/seq2bseq.c:62:15: warning[-Wunused-but-set-variable=]: variable ‘cur’ set but not used
#   62 |         off_t cur = 0;
#      |               ^~~
#   60|   	FILE *fp;
#   61|   	struct stat st;
#   62|-> 	off_t cur = 0;
#   63|   	int fd;
#   64|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1016]
bluez-5.85/tools/seq2bseq.c:91:14: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
bluez-5.85/tools/seq2bseq.c:65:12: branch_true: following ‘true’ branch (when ‘output_path’ is non-NULL)...
bluez-5.85/tools/seq2bseq.c:66:24: branch_true: ...to here
bluez-5.85/tools/seq2bseq.c:66:24: acquire_memory: allocated here
bluez-5.85/tools/seq2bseq.c:67:20: branch_false: following ‘false’ branch...
bluez-5.85/tools/seq2bseq.c:89:9: branch_false: ...to here
bluez-5.85/tools/seq2bseq.c:91:14: throw: if ‘open’ throws an exception...
bluez-5.85/tools/seq2bseq.c:91:14: danger: ‘path’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   89|   	printf("Converting %s to %s\n", input_path, path);
#   90|   
#   91|-> 	fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
#   92|   
#   93|   	free(path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1017]
bluez-5.85/tools/smp-tester.c:902:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/smp-tester.c:902:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:902:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/smp-tester.c:902:9: branch_false: ...to here
bluez-5.85/tools/smp-tester.c:902:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/smp-tester.c:902:9: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  900|   	tester_init(&argc, &argv);
#  901|   
#  902|-> 	test_smp("SMP Server - Basic Request 1",
#  903|   					&smp_server_basic_req_1_test,
#  904|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1018]
bluez-5.85/tools/smp-tester.c:905:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/smp-tester.c:902:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:902:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:905:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:905:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:905:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/smp-tester.c:905:9: branch_false: ...to here
bluez-5.85/tools/smp-tester.c:905:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/smp-tester.c:905:9: danger: ‘user’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
#  903|   					&smp_server_basic_req_1_test,
#  904|   					setup_powered_server, test_server);
#  905|-> 	test_smp("SMP Server - Invalid Request 1",
#  906|   					&smp_server_nval_req_1_test,
#  907|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1019]
bluez-5.85/tools/smp-tester.c:908:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/smp-tester.c:902:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:902:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:905:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:905:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:905:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:908:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:908:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:908:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/smp-tester.c:908:9: branch_false: ...to here
bluez-5.85/tools/smp-tester.c:908:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/smp-tester.c:908:9: danger: ‘user’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  906|   					&smp_server_nval_req_1_test,
#  907|   					setup_powered_server, test_server);
#  908|-> 	test_smp("SMP Server - Invalid Request 2",
#  909|   					&smp_server_nval_req_2_test,
#  910|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1020]
bluez-5.85/tools/smp-tester.c:911:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/smp-tester.c:902:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:902:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:905:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:905:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:905:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:908:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:908:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:908:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:911:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:911:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:911:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/smp-tester.c:911:9: branch_false: ...to here
bluez-5.85/tools/smp-tester.c:911:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/smp-tester.c:911:9: danger: ‘user’ leaks here; was allocated at [(10)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/9)
#  909|   					&smp_server_nval_req_2_test,
#  910|   					setup_powered_server, test_server);
#  911|-> 	test_smp("SMP Server - Invalid Request 3",
#  912|   					&smp_server_nval_req_3_test,
#  913|   					setup_powered_server, test_server);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1021]
bluez-5.85/tools/smp-tester.c:915:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/smp-tester.c:902:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:902:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:905:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:905:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:905:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:908:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:908:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:908:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:911:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:911:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:911:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:915:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:915:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:915:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/smp-tester.c:915:9: branch_false: ...to here
bluez-5.85/tools/smp-tester.c:915:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/smp-tester.c:915:9: danger: ‘user’ leaks here; was allocated at [(13)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/12)
#  913|   					setup_powered_server, test_server);
#  914|   
#  915|-> 	test_smp("SMP Client - Basic Request 1",
#  916|   					&smp_client_basic_req_1_test,
#  917|   					setup_powered_client, test_client);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1022]
bluez-5.85/tools/smp-tester.c:918:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/smp-tester.c:902:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:902:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:905:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:905:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:905:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:908:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:908:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:908:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:911:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:911:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:911:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:915:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:915:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:915:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:918:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:918:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:918:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/smp-tester.c:918:9: branch_false: ...to here
bluez-5.85/tools/smp-tester.c:918:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/smp-tester.c:918:9: danger: ‘user’ leaks here; was allocated at [(16)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/15)
#  916|   					&smp_client_basic_req_1_test,
#  917|   					setup_powered_client, test_client);
#  918|-> 	test_smp("SMP Client - Basic Request 2",
#  919|   					&smp_client_basic_req_2_test,
#  920|   					setup_powered_client, test_client);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1023]
bluez-5.85/tools/smp-tester.c:922:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/smp-tester.c:902:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:902:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:905:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:905:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:905:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:908:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:908:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:908:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:911:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:911:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:911:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:915:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:915:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:915:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:918:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:918:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:918:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/smp-tester.c:922:9: branch_true: ...to here
bluez-5.85/tools/smp-tester.c:922:9: acquire_memory: allocated here
bluez-5.85/tools/smp-tester.c:922:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/smp-tester.c:922:9: branch_false: ...to here
bluez-5.85/tools/smp-tester.c:922:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/smp-tester.c:922:9: danger: ‘user’ leaks here; was allocated at [(19)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/18)
#  920|   					setup_powered_client, test_client);
#  921|   
#  922|-> 	test_smp("SMP Client - SC Request 1",
#  923|   					&smp_client_sc_req_1_test,
#  924|   					setup_powered_client, test_client);

Error: CPPCHECK_WARNING (CWE-457): [#def1024]
bluez-5.85/tools/test-runner.c:971: warning[uninitvar]: Uninitialized variable: argv
#  969|   	envp[pos] = NULL;
#  970|   
#  971|-> 	printf("Running command %s\n", cmdname ? cmdname : argv[0]);
#  972|   
#  973|   	pid = fork();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1025]
bluez-5.85/tools/userchan-tester.c:379:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/userchan-tester.c:379:9: acquire_memory: allocated here
bluez-5.85/tools/userchan-tester.c:379:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/userchan-tester.c:379:9: branch_false: ...to here
bluez-5.85/tools/userchan-tester.c:379:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/userchan-tester.c:379:9: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  377|   	tester_init(&argc, &argv);
#  378|   
#  379|-> 	test_user("User channel open - Success", NULL,
#  380|   					NULL, test_open_success);
#  381|   	test_user("User channel open - Failed", NULL,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1026]
bluez-5.85/tools/userchan-tester.c:381:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/userchan-tester.c:381:9: acquire_memory: allocated here
bluez-5.85/tools/userchan-tester.c:381:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/userchan-tester.c:381:9: branch_false: ...to here
bluez-5.85/tools/userchan-tester.c:381:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/userchan-tester.c:381:9: danger: ‘user’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  379|   	test_user("User channel open - Success", NULL,
#  380|   					NULL, test_open_success);
#  381|-> 	test_user("User channel open - Failed", NULL,
#  382|   					setup_powered, test_open_failed);
#  383|   	test_user("User channel open - Power Toggle Success", INT_TO_PTR(true),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1027]
bluez-5.85/tools/userchan-tester.c:383:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user’
bluez-5.85/tools/userchan-tester.c:381:9: acquire_memory: allocated here
bluez-5.85/tools/userchan-tester.c:381:9: branch_true: following ‘true’ branch (when ‘user’ is NULL)...
bluez-5.85/tools/userchan-tester.c:383:9: branch_true: ...to here
bluez-5.85/tools/userchan-tester.c:383:9: acquire_memory: allocated here
bluez-5.85/tools/userchan-tester.c:383:9: branch_false: following ‘false’ branch (when ‘user’ is non-NULL)...
bluez-5.85/tools/userchan-tester.c:383:9: branch_false: ...to here
bluez-5.85/tools/userchan-tester.c:383:9: throw: if ‘tester_add_full’ throws an exception...
bluez-5.85/tools/userchan-tester.c:383:9: danger: ‘user’ leaks here; was allocated at [(4)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/3)
#  381|   	test_user("User channel open - Failed", NULL,
#  382|   					setup_powered, test_open_failed);
#  383|-> 	test_user("User channel open - Power Toggle Success", INT_TO_PTR(true),
#  384|   					toggle_powered, test_open_success);
#  385|   	test_user("User channel close - Success", NULL,

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-13.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-namebluez-5.85-1.fc44
store-results-to/tmp/tmp_x13q01u/bluez-5.85-1.fc44.tar.xz
time-created2026-01-08 15:36:33
time-finished2026-01-08 15:40:39
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp_x13q01u/bluez-5.85-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp_x13q01u/bluez-5.85-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9