Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
FreeRDP-3.20.0/channels/geometry/client/geometry_main.c:230:30: warning[-Wanalyzer-malloc-leak]: leak of ‘mappedGeometry’
FreeRDP-3.20.0/channels/geometry/client/geometry_main.c:318:13: enter_function: entry to ‘geometry_on_data_received’
FreeRDP-3.20.0/channels/geometry/client/geometry_main.c:321:16: call_function: calling ‘geometry_recv_pdu’ from ‘geometry_on_data_received’
#  228|   			mappedGeometry->mappingId = id;
#  229|   
#  230|-> 			if (!HashTable_Insert(context->geometries, &(mappedGeometry->mappingId),
#  231|   			                      mappedGeometry))
#  232|   			{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
FreeRDP-3.20.0/channels/geometry/client/geometry_main.c:233:33: warning[-Wanalyzer-malloc-leak]: leak of ‘mappedGeometry’
FreeRDP-3.20.0/channels/geometry/client/geometry_main.c:318:13: enter_function: entry to ‘geometry_on_data_received’
FreeRDP-3.20.0/channels/geometry/client/geometry_main.c:321:16: call_function: calling ‘geometry_recv_pdu’ from ‘geometry_on_data_received’
#  231|   			                      mappedGeometry))
#  232|   			{
#  233|-> 				WLog_Print(logger, WLOG_ERROR,
#  234|   				           "unable to register geometry 0x%" PRIx64 " in the table", id);
#  235|   				free(mappedGeometry);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def3]
FreeRDP-3.20.0/client/X11/xf_utils.c:52:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
FreeRDP-3.20.0/client/X11/xf_utils.c:756:5: enter_function: entry to ‘LogDynAndXRestackWindows_ex’
FreeRDP-3.20.0/client/X11/xf_utils.c:759:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/client/X11/xf_utils.c:761:17: branch_true: ...to here
FreeRDP-3.20.0/client/X11/xf_utils.c:761:17: call_function: calling ‘write_log’ from ‘LogDynAndXRestackWindows_ex’
#   50|   	va_list ap = { 0 };
#   51|   	va_start(ap, fmt);
#   52|-> 	WLog_PrintTextMessageVA(log, level, line, fname, fkt, fmt, ap);
#   53|   	va_end(ap);
#   54|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
FreeRDP-3.20.0/client/common/file.c:1732:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘CommandLineParseCommaSeparatedValues(values, & count) + x * 8’
FreeRDP-3.20.0/client/common/file.c:1753:6: enter_function: entry to ‘freerdp_client_populate_settings_from_rdp_file_unchecked’
FreeRDP-3.20.0/client/common/file.c:2486:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/client/common/file.c:2486:57: call_function: inlined call to ‘utils_str_is_empty’ from ‘freerdp_client_populate_settings_from_rdp_file_unchecked’
FreeRDP-3.20.0/client/common/file.c:2494:36: branch_false: ...to here
FreeRDP-3.20.0/client/common/file.c:2494:36: call_function: calling ‘rdp_file_to_args’ from ‘freerdp_client_populate_settings_from_rdp_file_unchecked’
# 1730|   	{
# 1731|   		BOOL rc = 0;
# 1732|-> 		const char* val = p[x];
# 1733|   		const size_t len = strlen(val) + 8;
# 1734|   		char* str = calloc(len, sizeof(char));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
FreeRDP-3.20.0/client/common/file.c:2537:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘CommandLineParseCommaSeparatedValues(*file.SelectedMonitors, & count)’
FreeRDP-3.20.0/client/common/file.c:2516:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/client/common/file.c:2518:24: branch_true: ...to here
FreeRDP-3.20.0/client/common/file.c:2519:30: acquire_memory: this call could return NULL
FreeRDP-3.20.0/client/common/file.c:2522:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/client/common/file.c:2527:24: branch_false: ...to here
FreeRDP-3.20.0/client/common/file.c:2533:36: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/client/common/file.c:2536:25: branch_true: ...to here
FreeRDP-3.20.0/client/common/file.c:2537:31: danger: ‘CommandLineParseCommaSeparatedValues(*file.SelectedMonitors, & count) + x * 8’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/2)
# 2535|   			unsigned long val = 0;
# 2536|   			errno = 0;
# 2537|-> 			val = strtoul(ptr[x], NULL, 0);
# 2538|   			if ((val >= UINT32_MAX) && (errno != 0))
# 2539|   			{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
FreeRDP-3.20.0/libfreerdp/common/settings.c:907:16: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
FreeRDP-3.20.0/libfreerdp/common/settings.c:1010:6: enter_function: entry to ‘freerdp_target_net_addresses_resize’
FreeRDP-3.20.0/libfreerdp/common/settings.c:1021:14: call_function: calling ‘resize_setting_ptr’ from ‘freerdp_target_net_addresses_resize’
#  905|   
#  906|   	// NOLINTNEXTLINE(clang-analyzer-unix.Malloc
#  907|-> 	return freerdp_settings_set_pointer(settings, id, ptr);
#  908|   }
#  909|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr,  length)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4324:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: danger: ‘WINPR_JSON_ParseWithLength(jstr,  length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 4329|   		goto fail;
# 4330|   
# 4331|-> 	WINPR_JSON* jbool = WINPR_JSON_GetObjectItemCaseSensitive(
# 4332|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_BOOL));
# 4333|   	if (!jbool)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
# 4329|   		goto fail;
# 4330|   
# 4331|-> 	WINPR_JSON* jbool = WINPR_JSON_GetObjectItemCaseSensitive(
# 4332|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_BOOL));
# 4333|   	if (!jbool)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr,  length)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4324:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: danger: ‘WINPR_JSON_ParseWithLength(jstr,  length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 4333|   	if (!jbool)
# 4334|   		goto fail;
# 4335|-> 	WINPR_JSON* juint16 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4336|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT16));
# 4337|   	if (!juint16)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
# 4333|   	if (!jbool)
# 4334|   		goto fail;
# 4335|-> 	WINPR_JSON* juint16 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4336|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT16));
# 4337|   	if (!juint16)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr,  length)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4324:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: danger: ‘WINPR_JSON_ParseWithLength(jstr,  length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
# 4337|   	if (!juint16)
# 4338|   		goto fail;
# 4339|-> 	WINPR_JSON* jint16 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4340|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT16));
# 4341|   	if (!jint16)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
# 4337|   	if (!juint16)
# 4338|   		goto fail;
# 4339|-> 	WINPR_JSON* jint16 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4340|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT16));
# 4341|   	if (!jint16)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr,  length)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4324:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: danger: ‘WINPR_JSON_ParseWithLength(jstr,  length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
# 4341|   	if (!jint16)
# 4342|   		goto fail;
# 4343|-> 	WINPR_JSON* juint32 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4344|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT32));
# 4345|   	if (!juint32)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
# 4341|   	if (!jint16)
# 4342|   		goto fail;
# 4343|-> 	WINPR_JSON* juint32 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4344|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT32));
# 4345|   	if (!juint32)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr,  length)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4324:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4345:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: danger: ‘WINPR_JSON_ParseWithLength(jstr,  length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
# 4345|   	if (!juint32)
# 4346|   		goto fail;
# 4347|-> 	WINPR_JSON* jint32 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4348|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT32));
# 4349|   	if (!jint32)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4345:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
# 4345|   	if (!juint32)
# 4346|   		goto fail;
# 4347|-> 	WINPR_JSON* jint32 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4348|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT32));
# 4349|   	if (!jint32)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr,  length)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4324:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4345:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4349:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: danger: ‘WINPR_JSON_ParseWithLength(jstr,  length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
# 4349|   	if (!jint32)
# 4350|   		goto fail;
# 4351|-> 	WINPR_JSON* juint64 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4352|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT64));
# 4353|   	if (!juint64)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4345:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4349:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/2)
# 4349|   	if (!jint32)
# 4350|   		goto fail;
# 4351|-> 	WINPR_JSON* juint64 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4352|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT64));
# 4353|   	if (!juint64)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr,  length)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4324:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4345:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4349:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4353:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: danger: ‘WINPR_JSON_ParseWithLength(jstr,  length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
# 4353|   	if (!juint64)
# 4354|   		goto fail;
# 4355|-> 	WINPR_JSON* jint64 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4356|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT64));
# 4357|   	if (!jint64)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4345:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4349:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4353:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/2)
# 4353|   	if (!juint64)
# 4354|   		goto fail;
# 4355|-> 	WINPR_JSON* jint64 = WINPR_JSON_GetObjectItemCaseSensitive(
# 4356|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT64));
# 4357|   	if (!jint64)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4359:31: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr,  length)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4324:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4345:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4349:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4353:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4357:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4359:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4359:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4359:31: danger: ‘WINPR_JSON_ParseWithLength(jstr,  length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/0)
# 4357|   	if (!jint64)
# 4358|   		goto fail;
# 4359|-> 	WINPR_JSON* jstring = WINPR_JSON_GetObjectItemCaseSensitive(
# 4360|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_STRING));
# 4361|   	if (!jstring)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4359:31: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4345:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4349:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4353:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4357:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4359:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4359:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4359:31: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/2)
# 4357|   	if (!jint64)
# 4358|   		goto fail;
# 4359|-> 	WINPR_JSON* jstring = WINPR_JSON_GetObjectItemCaseSensitive(
# 4360|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_STRING));
# 4361|   	if (!jstring)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4363:32: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr,  length)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4324:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4345:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4349:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4353:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4357:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4359:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4361:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4363:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4363:32: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4363:32: danger: ‘WINPR_JSON_ParseWithLength(jstr,  length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/0)
# 4361|   	if (!jstring)
# 4362|   		goto fail;
# 4363|-> 	WINPR_JSON* jpointer = WINPR_JSON_GetObjectItemCaseSensitive(
# 4364|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_POINTER));
# 4365|   	if (!jpointer)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
FreeRDP-3.20.0/libfreerdp/common/settings.c:4363:32: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.20.0/libfreerdp/common/settings.c:4325:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4327:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4328:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4331:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4333:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4335:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4337:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4339:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4341:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4343:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4345:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4347:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4349:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4351:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4353:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4355:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4357:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4359:31: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4361:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4363:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/common/settings.c:4363:32: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.20.0/libfreerdp/common/settings.c:4363:32: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/2)
# 4361|   	if (!jstring)
# 4362|   		goto fail;
# 4363|-> 	WINPR_JSON* jpointer = WINPR_JSON_GetObjectItemCaseSensitive(
# 4364|   	    json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_POINTER));
# 4365|   	if (!jpointer)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
FreeRDP-3.20.0/libfreerdp/core/aad.c:869:29: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(data,  length)’
FreeRDP-3.20.0/libfreerdp/core/aad.c:860:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/aad.c:861:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/aad.c:869:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/aad.c:869:29: throw: if ‘WINPR_JSON_GetObjectItemCaseSensitive’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/aad.c:869:29: danger: ‘WINPR_JSON_ParseWithLength(data,  length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
#  867|   	}
#  868|   
#  869|-> 	access_token_prop = WINPR_JSON_GetObjectItemCaseSensitive(json, "access_token");
#  870|   	if (!access_token_prop)
#  871|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:203:33: warning[-Wanalyzer-malloc-leak]: leak of ‘http_request_new()’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:198:32: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:200:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:203:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:205:14: throw: if ‘http_request_set_method’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:203:33: danger: ‘http_request_new()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  201|   		return NULL;
#  202|   
#  203|-> 	rdpSettings* settings = arm->context->settings;
#  204|   
#  205|   	if (!http_request_set_method(request, method) || !http_request_set_uri(request, uri))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:346:17: warning[-Wanalyzer-malloc-leak]: leak of ‘message’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:323:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:327:41: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:332:12: branch_false: following ‘false’ branch (when ‘lbi’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:336:41: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:343:19: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:346:17: throw: if ‘WINPR_JSON_Delete’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:346:17: danger: ‘message’ leaks here; was allocated at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4)
#  344|   arm_create_cleanup:
#  345|   	if (json)
#  346|-> 		WINPR_JSON_Delete(json);
#  347|   	free(lbi);
#  348|   	return message;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:449:14: warning[-Wanalyzer-malloc-leak]: leak of ‘winpr_Cipher_NewEx(cipherType, 0, *<unknown>.pointer, (long unsigned int)Stream_Get_UINT32(Stream_StaticConstInit(&staticStream,  pbInput + algoLen,  cbInput)), 0, 0)’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:365:26: enter_function: entry to ‘treatAuthBlob’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:374:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:380:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:380:12: branch_false: following ‘false’ branch (when the strings are equal)...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:386:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:388:12: branch_false: following ‘false’ branch (when ‘cbInput >= algoLen’)...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:394:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:400:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:403:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:403:32: call_function: calling ‘Stream_Get_UINT32’ from ‘treatAuthBlob’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:403:32: return_function: returning to ‘treatAuthBlob’ from ‘Stream_Get_UINT32’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:404:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:410:34: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:410:34: call_function: calling ‘Stream_Get_UINT32’ from ‘treatAuthBlob’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:410:34: return_function: returning to ‘treatAuthBlob’ from ‘Stream_Get_UINT32’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:411:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:418:34: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:418:34: call_function: calling ‘Stream_Get_UINT32’ from ‘treatAuthBlob’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:418:34: return_function: returning to ‘treatAuthBlob’ from ‘Stream_Get_UINT32’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:419:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:426:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:442:15: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:443:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:449:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:449:14: throw: if ‘winpr_Cipher_SetPadding’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:449:14: danger: ‘winpr_Cipher_NewEx(cipherType, 0, *<unknown>.pointer, (long unsigned int)Stream_Get_UINT32(Stream_StaticConstInit(&staticStream,  pbInput + algoLen,  cbInput)), 0, 0)’ leaks here; was allocated at [(37)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/36)
#  447|   	}
#  448|   
#  449|-> 	if (!winpr_Cipher_SetPadding(ret, TRUE))
#  450|   	{
#  451|   		WLog_Print(log, WLOG_ERROR, "unable to enable padding on cipher");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:507:14: warning[-Wanalyzer-malloc-leak]: leak of ‘encryptedPass’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:494:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:500:37: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:501:31: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:503:12: branch_false: following ‘false’ branch (when ‘encryptedPass’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:506:16: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:507:14: throw: if ‘winpr_Cipher_Update’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:507:14: danger: ‘encryptedPass’ leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
#  505|   
#  506|   	size_t encryptedPassLen = 0;
#  507|-> 	if (!winpr_Cipher_Update(cipher, wpasswd, wpasswdBytes, encryptedPass, &encryptedPassLen))
#  508|   		goto out;
#  509|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:634:33: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:736:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:743:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:746:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:746:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:747:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:753:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:754:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:760:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:760:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:766:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:767:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:767:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:775:28: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:777:38: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:782:20: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:783:34: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:783:34: call_function: calling ‘arm_parse_ipvx_count’ from ‘arm_treat_azureInstanceNetworkMetadata’
#  632|   {
#  633|   	WINPR_ASSERT(ipvX);
#  634|-> 	WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItemCaseSensitive(ipvX, "ipAddress");
#  635|   	if (!ipAddress || !WINPR_JSON_IsArray(ipAddress))
#  636|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:639:16: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:736:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:743:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:746:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:746:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:747:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:753:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:754:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:760:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:760:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:766:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:767:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:767:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:775:28: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:777:38: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:782:20: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:783:34: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:783:34: call_function: calling ‘arm_parse_ipvx_count’ from ‘arm_treat_azureInstanceNetworkMetadata’
#  637|   
#  638|   	/* Each entry might contain a public and a private address */
#  639|-> 	return WINPR_JSON_GetArraySize(ipAddress) * 2;
#  640|   }
#  641|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:651:33: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:736:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:743:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:746:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:746:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:747:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:753:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:754:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:760:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:760:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:766:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:767:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:767:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:790:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:793:16: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:794:28: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:796:38: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:803:30: call_function: calling ‘arm_parse_ipv6’ from ‘arm_treat_azureInstanceNetworkMetadata’
#  649|   		return TRUE;
#  650|   
#  651|-> 	WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItemCaseSensitive(ipv6, "ipAddress");
#  652|   	if (!ipAddress || !WINPR_JSON_IsArray(ipAddress))
#  653|   		return TRUE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:655:32: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:736:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:743:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:746:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:746:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:747:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:753:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:754:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:760:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:760:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:766:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:767:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:767:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:790:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:793:16: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:794:28: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:796:38: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:803:30: call_function: calling ‘arm_parse_ipv6’ from ‘arm_treat_azureInstanceNetworkMetadata’
#  653|   		return TRUE;
#  654|   	const size_t naddresses = WINPR_JSON_GetArraySize(ipAddress);
#  655|-> 	const uint32_t count = freerdp_settings_get_uint32(settings, FreeRDP_TargetNetAddressCount);
#  656|   	for (size_t j = 0; j < naddresses; j++)
#  657|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:685:33: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:736:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:743:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:746:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:746:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:747:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:753:29: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:754:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:760:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:760:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:766:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:767:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:767:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:790:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:793:16: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:794:28: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:796:38: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:801:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:807:36: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:810:30: call_function: calling ‘arm_parse_ipv4’ from ‘arm_treat_azureInstanceNetworkMetadata’
#  683|   	WINPR_ASSERT(pAddressIdx);
#  684|   
#  685|-> 	WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItemCaseSensitive(ipv4, "ipAddress");
#  686|   	if (!ipAddress || !WINPR_JSON_IsArray(ipAddress))
#  687|   		return TRUE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:425:17: warning[-Wanalyzer-malloc-leak]: leak of ‘context’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:136:14: enter_function: entry to ‘http_context_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:138:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:139:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:143:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:144:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:165:9: call_function: calling ‘http_context_free’ from ‘http_context_new’
#  423|   		free(context->Connection);
#  424|   		free(context->Pragma);
#  425|-> 		HashTable_Free(context->headers);
#  426|   		ListDictionary_Free(context->cookies);
#  427|   		free(context);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:716:9: warning[-Wanalyzer-malloc-leak]: leak of ‘request’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:690:14: enter_function: entry to ‘http_request_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:692:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:693:12: branch_false: following ‘false’ branch (when ‘request’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:697:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:698:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:702:9: call_function: calling ‘http_request_free’ from ‘http_request_new’
#  714|   	free(request->Method);
#  715|   	free(request->URI);
#  716|-> 	HashTable_Free(request->headers);
#  717|   	free(request);
#  718|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1480:29: warning[-Wanalyzer-malloc-leak]: leak of ‘context’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:136:14: enter_function: entry to ‘http_context_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:138:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:139:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: call_function: calling ‘HashTable_New_String’ from ‘http_context_new’
# 1478|   wHashTable* HashTable_New_String(void)
# 1479|   {
# 1480|-> 	wHashTable* table = HashTable_New(FALSE);
# 1481|   	if (!table)
# 1482|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1480:29: warning[-Wanalyzer-malloc-leak]: leak of ‘request’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:690:14: enter_function: entry to ‘http_request_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:692:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:693:12: branch_false: following ‘false’ branch (when ‘request’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: call_function: calling ‘HashTable_New_String’ from ‘http_request_new’
# 1478|   wHashTable* HashTable_New_String(void)
# 1479|   {
# 1480|-> 	wHashTable* table = HashTable_New(FALSE);
# 1481|   	if (!table)
# 1482|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1480:29: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1494:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1496:49: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1498:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: call_function: calling ‘HashTable_New_String’ from ‘http_response_new’
# 1478|   wHashTable* HashTable_New_String(void)
# 1479|   {
# 1480|-> 	wHashTable* table = HashTable_New(FALSE);
# 1481|   	if (!table)
# 1482|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1484:14: warning[-Wanalyzer-malloc-leak]: leak of ‘HashTable_New(0)’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1480:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1481:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1484:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1484:14: throw: if ‘HashTable_SetupForStringData’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1484:14: danger: ‘HashTable_New(0)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 1482|   		return NULL;
# 1483|   
# 1484|-> 	if (!HashTable_SetupForStringData(table, TRUE))
# 1485|   	{
# 1486|   		HashTable_Free(table);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1484:14: warning[-Wanalyzer-malloc-leak]: leak of ‘context’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:136:14: enter_function: entry to ‘http_context_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:138:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:139:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: call_function: calling ‘HashTable_New_String’ from ‘http_context_new’
# 1482|   		return NULL;
# 1483|   
# 1484|-> 	if (!HashTable_SetupForStringData(table, TRUE))
# 1485|   	{
# 1486|   		HashTable_Free(table);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1484:14: warning[-Wanalyzer-malloc-leak]: leak of ‘request’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:690:14: enter_function: entry to ‘http_request_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:692:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:693:12: branch_false: following ‘false’ branch (when ‘request’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: call_function: calling ‘HashTable_New_String’ from ‘http_request_new’
# 1482|   		return NULL;
# 1483|   
# 1484|-> 	if (!HashTable_SetupForStringData(table, TRUE))
# 1485|   	{
# 1486|   		HashTable_Free(table);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1484:14: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1494:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1496:49: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1498:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: call_function: calling ‘HashTable_New_String’ from ‘http_response_new’
# 1482|   		return NULL;
# 1483|   
# 1484|-> 	if (!HashTable_SetupForStringData(table, TRUE))
# 1485|   	{
# 1486|   		HashTable_Free(table);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1486:17: warning[-Wanalyzer-malloc-leak]: leak of ‘context’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:136:14: enter_function: entry to ‘http_context_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:138:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:139:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: call_function: calling ‘HashTable_New_String’ from ‘http_context_new’
# 1484|   	if (!HashTable_SetupForStringData(table, TRUE))
# 1485|   	{
# 1486|-> 		HashTable_Free(table);
# 1487|   		return NULL;
# 1488|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1486:17: warning[-Wanalyzer-malloc-leak]: leak of ‘request’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:690:14: enter_function: entry to ‘http_request_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:692:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:693:12: branch_false: following ‘false’ branch (when ‘request’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: call_function: calling ‘HashTable_New_String’ from ‘http_request_new’
# 1484|   	if (!HashTable_SetupForStringData(table, TRUE))
# 1485|   	{
# 1486|-> 		HashTable_Free(table);
# 1487|   		return NULL;
# 1488|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1486:17: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1494:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1496:49: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1498:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: call_function: calling ‘HashTable_New_String’ from ‘http_response_new’
# 1484|   	if (!HashTable_SetupForStringData(table, TRUE))
# 1485|   	{
# 1486|-> 		HashTable_Free(table);
# 1487|   		return NULL;
# 1488|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1489:9: warning[-Wanalyzer-malloc-leak]: leak of ‘context’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:136:14: enter_function: entry to ‘http_context_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:138:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:139:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: call_function: calling ‘HashTable_New_String’ from ‘http_context_new’
# 1487|   		return NULL;
# 1488|   	}
# 1489|-> 	HashTable_KeyObject(table)->fnObjectEquals = strings_equals_nocase;
# 1490|   	HashTable_ValueObject(table)->fnObjectEquals = strings_equals_nocase;
# 1491|   	return table;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1489:9: warning[-Wanalyzer-malloc-leak]: leak of ‘request’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:690:14: enter_function: entry to ‘http_request_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:692:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:693:12: branch_false: following ‘false’ branch (when ‘request’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: call_function: calling ‘HashTable_New_String’ from ‘http_request_new’
# 1487|   		return NULL;
# 1488|   	}
# 1489|-> 	HashTable_KeyObject(table)->fnObjectEquals = strings_equals_nocase;
# 1490|   	HashTable_ValueObject(table)->fnObjectEquals = strings_equals_nocase;
# 1491|   	return table;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1489:9: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1494:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1496:49: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1498:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: call_function: calling ‘HashTable_New_String’ from ‘http_response_new’
# 1487|   		return NULL;
# 1488|   	}
# 1489|-> 	HashTable_KeyObject(table)->fnObjectEquals = strings_equals_nocase;
# 1490|   	HashTable_ValueObject(table)->fnObjectEquals = strings_equals_nocase;
# 1491|   	return table;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1490:9: warning[-Wanalyzer-malloc-leak]: leak of ‘context’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:136:14: enter_function: entry to ‘http_context_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:138:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:139:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:142:28: call_function: calling ‘HashTable_New_String’ from ‘http_context_new’
# 1488|   	}
# 1489|   	HashTable_KeyObject(table)->fnObjectEquals = strings_equals_nocase;
# 1490|-> 	HashTable_ValueObject(table)->fnObjectEquals = strings_equals_nocase;
# 1491|   	return table;
# 1492|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1490:9: warning[-Wanalyzer-malloc-leak]: leak of ‘request’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:690:14: enter_function: entry to ‘http_request_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:692:46: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:693:12: branch_false: following ‘false’ branch (when ‘request’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:696:28: call_function: calling ‘HashTable_New_String’ from ‘http_request_new’
# 1488|   	}
# 1489|   	HashTable_KeyObject(table)->fnObjectEquals = strings_equals_nocase;
# 1490|-> 	HashTable_ValueObject(table)->fnObjectEquals = strings_equals_nocase;
# 1491|   	return table;
# 1492|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1490:9: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1494:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1496:49: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1498:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: call_function: calling ‘HashTable_New_String’ from ‘http_response_new’
# 1488|   	}
# 1489|   	HashTable_KeyObject(table)->fnObjectEquals = strings_equals_nocase;
# 1490|-> 	HashTable_ValueObject(table)->fnObjectEquals = strings_equals_nocase;
# 1491|   	return table;
# 1492|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1532:9: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1494:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1496:49: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1498:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1503:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1504:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1521:9: call_function: calling ‘http_response_free’ from ‘http_response_new’
# 1530|   
# 1531|   	free((void*)response->lines);
# 1532|-> 	HashTable_Free(response->Authenticates);
# 1533|   	HashTable_Free(response->SetCookie);
# 1534|   	Stream_Free(response->data, TRUE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1533:9: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1494:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1496:49: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1498:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1501:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1503:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1504:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1521:9: call_function: calling ‘http_response_free’ from ‘http_response_new’
# 1531|   	free((void*)response->lines);
# 1532|   	HashTable_Free(response->Authenticates);
# 1533|-> 	HashTable_Free(response->SetCookie);
# 1534|   	Stream_Free(response->data, TRUE);
# 1535|   	free(response);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def55]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1708:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1707:9: acquire_resource: ‘va_start’ called here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1708:9: throw: if ‘winpr_vasprintf’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1708:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
# 1706|   	va_list ap;
# 1707|   	va_start(ap, value);
# 1708|-> 	winpr_vasprintf(&v, &vlen, value, ap);
# 1709|   	va_end(ap);
# 1710|   	const BOOL rc = HashTable_Insert(request->headers, key, v);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def56]
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1720:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1690:20: enter_function: entry to ‘http_context_set_header’
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1695:9: acquire_resource: ‘va_start’ called here
FreeRDP-3.20.0/libfreerdp/core/gateway/http.c:1696:25: call_function: calling ‘http_context_set_header_va’ from ‘http_context_set_header’
# 1718|   	char* v = NULL;
# 1719|   	size_t vlen = 0;
# 1720|-> 	winpr_vasprintf(&v, &vlen, value, ap);
# 1721|   	const BOOL rc = HashTable_Insert(context->headers, key, v);
# 1722|   	free(v);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:590:21: warning[-Wanalyzer-malloc-leak]: leak of ‘http_response_recv(*outChannel.common.tls, 1)’
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:580:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:582:21: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:582:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:585:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:585:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:587:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:590:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:590:20: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:593:30: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:593:30: throw: if ‘rpc_ncacn_http_recv_out_channel_response’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:590:21: danger: ‘http_response_recv(*outChannel.common.tls, 1)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  588|   			return -1;
#  589|   
#  590|-> 		if (outChannel->State == CLIENT_OUT_CHANNEL_STATE_SECURITY)
#  591|   		{
#  592|   			/* Receive OUT Channel Response */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:649:43: warning[-Wanalyzer-malloc-leak]: leak of ‘http_response_recv(*outChannel.common.tls, 0)’
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:580:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:638:18: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:638:17: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:641:21: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:641:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:644:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:644:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:646:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:649:43: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:649:43: throw: if ‘http_response_get_status_code’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:649:43: danger: ‘http_response_recv(*outChannel.common.tls, 0)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  647|   			return -1;
#  648|   
#  649|-> 		const UINT16 statusCode = http_response_get_status_code(response);
#  650|   		if (statusCode != HTTP_STATUS_OK)
#  651|   		{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:652:25: warning[-Wanalyzer-malloc-leak]: leak of ‘http_response_recv(*outChannel.common.tls, 0)’
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:580:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:638:18: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:638:17: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:641:21: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:641:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:644:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:644:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:646:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:649:43: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:650:20: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:652:25: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:652:25: throw: if ‘WLog_Get’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:652:25: danger: ‘http_response_recv(*outChannel.common.tls, 0)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  650|   		if (statusCode != HTTP_STATUS_OK)
#  651|   		{
#  652|-> 			http_response_log_error_status(WLog_Get(TAG), WLOG_ERROR, response);
#  653|   
#  654|   			if (statusCode == HTTP_STATUS_DENIED)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:656:55: warning[-Wanalyzer-malloc-leak]: leak of ‘http_response_recv(*outChannel.common.tls, 0)’
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:580:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:638:18: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:638:17: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:641:21: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:641:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:644:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:644:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:646:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:649:43: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:650:20: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:652:25: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:654:28: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:656:55: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:656:55: throw: if ‘transport_get_context’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:656:55: danger: ‘http_response_recv(*outChannel.common.tls, 0)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  654|   			if (statusCode == HTTP_STATUS_DENIED)
#  655|   			{
#  656|-> 				rdpContext* context = transport_get_context(rpc->transport);
#  657|   				freerdp_set_last_error_if_not(context, FREERDP_ERROR_CONNECT_ACCESS_DENIED);
#  658|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:660:25: warning[-Wanalyzer-malloc-leak]: leak of ‘http_response_recv(*outChannel.common.tls, 0)’
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:580:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:638:18: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:638:17: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:641:21: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:641:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:644:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:644:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:646:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:649:43: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:650:20: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:652:25: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:660:25: danger: ‘http_response_recv(*outChannel.common.tls, 0)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  658|   			}
#  659|   
#  660|-> 			http_response_free(response);
#  661|   			return -1;
#  662|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:664:17: warning[-Wanalyzer-malloc-leak]: leak of ‘http_response_recv(*outChannel.common.tls, 0)’
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:580:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:638:18: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:638:17: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:641:21: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:641:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:644:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:644:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:646:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:649:43: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:650:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:664:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:664:17: danger: ‘http_response_recv(*outChannel.common.tls, 0)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  662|   		}
#  663|   
#  664|-> 		http_response_free(response);
#  665|   		rpc_virtual_connection_transition_to_state(rpc, rpc->VirtualConnection,
#  666|   		                                           VIRTUAL_CONNECTION_STATE_WAIT_A3W);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:767:25: warning[-Wanalyzer-malloc-leak]: leak of ‘http_response_recv(*nextOutChannel.common.tls, 1)’
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:760:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:763:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:763:20: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:765:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:767:25: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:767:17: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:769:25: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:770:37: throw: if ‘rpc_ncacn_http_recv_out_channel_response’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:767:25: danger: ‘http_response_recv(*nextOutChannel.common.tls, 1)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  765|   	if (response)
#  766|   	{
#  767|-> 		switch (nextOutChannel->State)
#  768|   		{
#  769|   			case CLIENT_OUT_CHANNEL_STATE_SECURITY:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:868:21: warning[-Wanalyzer-malloc-leak]: leak of ‘http_response_recv(*inChannel.common.tls, 1)’
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:858:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:861:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:861:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:863:28: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:863:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:865:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:868:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:868:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:912:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:868:21: danger: ‘http_response_recv(*inChannel.common.tls, 1)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/4)
#  866|   			return -1;
#  867|   
#  868|-> 		if (inChannel->State == CLIENT_IN_CHANNEL_STATE_SECURITY)
#  869|   		{
#  870|   			if (!rpc_ncacn_http_recv_in_channel_response(&inChannel->common, response))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:922:17: warning[-Wanalyzer-malloc-leak]: leak of ‘http_response_recv(*inChannel.common.tls, 1)’
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:858:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:861:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:861:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:916:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:916:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:918:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:922:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/rpc_client.c:922:17: danger: ‘http_response_recv(*inChannel.common.tls, 1)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4)
#  920|   
#  921|   		/* We can receive an unauthorized HTTP response on the IN channel */
#  922|-> 		http_response_free(response);
#  923|   	}
#  924|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:794:25: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:841:9: enter_function: entry to ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:843:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:847:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
#  792|   		if (strncmp("https://", url, 8) != 0)
#  793|   		{
#  794|-> 			WLog_Print(wst->log, WLOG_ERROR,
#  795|   			           "Websocket URL is invalid. Only wss:// or https:// URLs are supported");
#  796|   			return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:843:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:847:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: throw: if ‘WLog_Get’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: danger: ‘wst’ leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
#  848|   		return NULL;
#  849|   
#  850|-> 	wst->log = WLog_Get(TAG);
#  851|   	wst->context = context;
#  852|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:841:9: enter_function: entry to ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:843:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:847:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:860:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:861:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:864:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:866:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:41: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:13: throw: if ‘freerdp_settings_get_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:13: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/9)
#  868|   
#  869|   	const char* useragent =
#  870|-> 	    freerdp_settings_get_string(context->settings, FreeRDP_GatewayHttpUserAgent);
#  871|   	const char* msuseragent =
#  872|   	    freerdp_settings_get_string(context->settings, FreeRDP_GatewayHttpMsUserAgent);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:13: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:841:9: enter_function: entry to ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:843:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:847:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:860:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:861:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:864:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:866:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:41: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:13: throw: if ‘freerdp_settings_get_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:13: danger: ‘wst’ leaks here; was allocated at [(4)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/3)
#  868|   
#  869|   	const char* useragent =
#  870|-> 	    freerdp_settings_get_string(context->settings, FreeRDP_GatewayHttpUserAgent);
#  871|   	const char* msuseragent =
#  872|   	    freerdp_settings_get_string(context->settings, FreeRDP_GatewayHttpMsUserAgent);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:872:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:841:9: enter_function: entry to ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:843:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:847:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:860:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:861:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:864:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:866:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:41: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:872:13: throw: if ‘freerdp_settings_get_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:872:13: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/9)
#  870|   	    freerdp_settings_get_string(context->settings, FreeRDP_GatewayHttpUserAgent);
#  871|   	const char* msuseragent =
#  872|-> 	    freerdp_settings_get_string(context->settings, FreeRDP_GatewayHttpMsUserAgent);
#  873|   	if (!http_context_set_uri(wst->http, wst->gwpath) ||
#  874|   	    !http_context_set_accept(wst->http, "*/*") ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:872:13: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:841:9: enter_function: entry to ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:843:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:847:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:860:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:861:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:864:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:866:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:41: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:872:13: throw: if ‘freerdp_settings_get_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:872:13: danger: ‘wst’ leaks here; was allocated at [(4)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/3)
#  870|   	    freerdp_settings_get_string(context->settings, FreeRDP_GatewayHttpUserAgent);
#  871|   	const char* msuseragent =
#  872|-> 	    freerdp_settings_get_string(context->settings, FreeRDP_GatewayHttpMsUserAgent);
#  873|   	if (!http_context_set_uri(wst->http, wst->gwpath) ||
#  874|   	    !http_context_set_accept(wst->http, "*/*") ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:878:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:841:9: enter_function: entry to ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:843:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:847:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:860:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:861:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:864:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:866:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:41: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:874:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:875:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:876:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:877:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:878:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:878:14: throw: if ‘http_context_set_user_agent’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:878:14: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/60/codeFlows/0/threadFlows/0/locations/9)
#  876|   	    !http_context_set_pragma(wst->http, "no-cache") ||
#  877|   	    !http_context_set_connection(wst->http, "Keep-Alive") ||
#  878|-> 	    !http_context_set_user_agent(wst->http, useragent) ||
#  879|   	    !http_context_set_x_ms_user_agent(wst->http, msuseragent) ||
#  880|   	    !http_context_set_host(wst->http, wst->gwhostname) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:878:14: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:841:9: enter_function: entry to ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:843:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:847:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:860:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:861:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:864:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:866:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:41: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:874:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:875:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:876:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:877:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:878:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:878:14: throw: if ‘http_context_set_user_agent’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:878:14: danger: ‘wst’ leaks here; was allocated at [(4)](sarif:/runs/0/results/61/codeFlows/0/threadFlows/0/locations/3)
#  876|   	    !http_context_set_pragma(wst->http, "no-cache") ||
#  877|   	    !http_context_set_connection(wst->http, "Keep-Alive") ||
#  878|-> 	    !http_context_set_user_agent(wst->http, useragent) ||
#  879|   	    !http_context_set_x_ms_user_agent(wst->http, msuseragent) ||
#  880|   	    !http_context_set_host(wst->http, wst->gwhostname) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:879:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:841:9: enter_function: entry to ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:843:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:847:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:860:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:861:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:864:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:866:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:41: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:874:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:875:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:876:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:877:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:878:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:879:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:879:14: throw: if ‘http_context_set_x_ms_user_agent’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:879:14: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/63/codeFlows/0/threadFlows/0/locations/9)
#  877|   	    !http_context_set_connection(wst->http, "Keep-Alive") ||
#  878|   	    !http_context_set_user_agent(wst->http, useragent) ||
#  879|-> 	    !http_context_set_x_ms_user_agent(wst->http, msuseragent) ||
#  880|   	    !http_context_set_host(wst->http, wst->gwhostname) ||
#  881|   	    !http_context_enable_websocket_upgrade(wst->http, TRUE))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:879:14: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:841:9: enter_function: entry to ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:843:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:846:32: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:847:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:850:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:857:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:860:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:861:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:864:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:866:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:870:41: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:874:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:875:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:876:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:877:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:878:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:873:13: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:879:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:879:14: throw: if ‘http_context_set_x_ms_user_agent’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/gateway/wst.c:879:14: danger: ‘wst’ leaks here; was allocated at [(4)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/3)
#  877|   	    !http_context_set_connection(wst->http, "Keep-Alive") ||
#  878|   	    !http_context_set_user_agent(wst->http, useragent) ||
#  879|-> 	    !http_context_set_x_ms_user_agent(wst->http, msuseragent) ||
#  880|   	    !http_context_set_host(wst->http, wst->gwhostname) ||
#  881|   	    !http_context_enable_websocket_upgrade(wst->http, TRUE))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
FreeRDP-3.20.0/libfreerdp/core/input.c:1135:22: warning[-Wanalyzer-malloc-leak]: leak of ‘MessageQueue_New(&cb)’
FreeRDP-3.20.0/libfreerdp/core/input.c:1130:12: branch_false: following ‘false’ branch (when ‘input’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/input.c:1133:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/input.c:1134:24: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/input.c:1135:22: throw: if ‘WLog_Get’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/input.c:1135:22: danger: ‘MessageQueue_New(&cb)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1133|   	input->common.context = rdp->context;
# 1134|   	input->queue = MessageQueue_New(&cb);
# 1135|-> 	input->log = WLog_Get(TAG);
# 1136|   
# 1137|   	if (!input->queue)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
FreeRDP-3.20.0/libfreerdp/core/input.c:1135:22: warning[-Wanalyzer-malloc-leak]: leak of ‘input’
FreeRDP-3.20.0/libfreerdp/core/input.c:1126:58: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/input.c:1130:12: branch_false: following ‘false’ branch (when ‘input’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/input.c:1133:33: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/input.c:1135:22: throw: if ‘WLog_Get’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/input.c:1135:22: danger: ‘input’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1133|   	input->common.context = rdp->context;
# 1134|   	input->queue = MessageQueue_New(&cb);
# 1135|-> 	input->log = WLog_Get(TAG);
# 1136|   
# 1137|   	if (!input->queue)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
FreeRDP-3.20.0/libfreerdp/core/peer.c:1453:23: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
FreeRDP-3.20.0/libfreerdp/core/peer.c:1446:47: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/peer.c:1448:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/peer.c:1451:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/peer.c:1451:12: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
FreeRDP-3.20.0/libfreerdp/core/peer.c:1453:23: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/peer.c:1453:23: throw: if ‘WLog_Get’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/peer.c:1453:23: danger: ‘client’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1451|   	if (sockfd >= 0)
# 1452|   	{
# 1453|-> 		(void)freerdp_tcp_set_nodelay(WLog_Get(TAG), WLOG_DEBUG, sockfd);
# 1454|   	}
# 1455|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
FreeRDP-3.20.0/libfreerdp/core/rdstls.c:853:25: warning[-Wanalyzer-malloc-leak]: leak of ‘Stream_New(0, 512)’
FreeRDP-3.20.0/libfreerdp/core/rdstls.c:941:12: enter_function: entry to ‘rdstls_client_authenticate’
FreeRDP-3.20.0/libfreerdp/core/rdstls.c:943:14: call_function: calling ‘rdstls_set_state’ from ‘rdstls_client_authenticate’
FreeRDP-3.20.0/libfreerdp/core/rdstls.c:943:14: return_function: returning to ‘rdstls_client_authenticate’ from ‘rdstls_set_state’
FreeRDP-3.20.0/libfreerdp/core/rdstls.c:943:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/rdstls.c:946:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/rdstls.c:946:14: call_function: calling ‘rdstls_recv_capabilities’ from ‘rdstls_client_authenticate’
#  851|   
#  852|   	WINPR_ASSERT(rdstls);
#  853|-> 	const int res = transport_read_pdu(rdstls->transport, s);
#  854|   
#  855|   	if (res < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
FreeRDP-3.20.0/libfreerdp/core/settings.c:774:22: warning[-Wanalyzer-malloc-leak]: leak of ‘settings’
FreeRDP-3.20.0/libfreerdp/core/settings.c:767:47: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/settings.c:769:12: branch_false: following ‘false’ branch (when ‘settings’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/settings.c:769:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/settings.c:772:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/settings.c:774:22: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/settings.c:774:22: throw: if ‘freerdp_settings_set_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/settings.c:774:22: danger: ‘settings’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  772|   	if (!server && !remote)
#  773|   	{
#  774|-> 		if (!freerdp_settings_set_string(settings, FreeRDP_GatewayHttpUserAgent,
#  775|   		                                 FREERDP_USER_AGENT))
#  776|   			goto out_fail;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def81]
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1290:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1121:12: branch_false: following ‘false’ branch (when ‘hostname’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1128:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1135:12: branch_false: following ‘false’ branch (when ‘ipcSocket == 0’)...
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1145:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1145:17: branch_false: following ‘false’ branch (when ‘useExternalDefinedSocket == 0’)...
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1147:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1147:17: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1151:26: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1151:26: acquire_resource: stream socket created here
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1152:20: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1161:36: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1169:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1181:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1335:1: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1271:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1288:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1288:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1290:23: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1290:23: throw: if ‘WLog_Get’ throws an exception...
FreeRDP-3.20.0/libfreerdp/core/tcp.c:1290:23: danger: ‘sockfd’ leaks here
# 1288|   	if (!ipcSocket && !useExternalDefinedSocket)
# 1289|   	{
# 1290|-> 		(void)freerdp_tcp_set_nodelay(WLog_Get(TAG), WLOG_ERROR, sockfd);
# 1291|   	}
# 1292|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
FreeRDP-3.20.0/libfreerdp/crypto/per.c:400:36: warning[-Wanalyzer-malloc-leak]: leak of ‘winpr_BinToHexString(got,  length, 1)’
FreeRDP-3.20.0/libfreerdp/crypto/per.c:399:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/crypto/per.c:400:36: throw: if ‘winpr_BinToHexString’ throws an exception...
FreeRDP-3.20.0/libfreerdp/crypto/per.c:400:36: danger: ‘winpr_BinToHexString(got,  length, 1)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  398|   	{
#  399|   		char* got_str = winpr_BinToHexString(got, length, TRUE);
#  400|-> 		char* expect_str = winpr_BinToHexString(expect, length, TRUE);
#  401|   
#  402|   		WLog_WARN(TAG, "PER OID mismatch, got %s, expected %s", got_str, expect_str);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1512:27: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_GetJSONConfigFile(1, &configfile)’
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1585:12: enter_function: entry to ‘tls_config_check_certificate’
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1592:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1594:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1600:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1600:13: call_function: calling ‘tls_config_parse_bool’ from ‘tls_config_check_certificate’
# 1510|   static int tls_config_parse_bool(WINPR_JSON* json, const char* opt)
# 1511|   {
# 1512|-> 	WINPR_JSON* val = WINPR_JSON_GetObjectItemCaseSensitive(json, opt);
# 1513|   	if (!val || !WINPR_JSON_IsBool(val))
# 1514|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1528:26: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_GetJSONConfigFile(1, &configfile)’
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1585:12: enter_function: entry to ‘tls_config_check_certificate’
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1592:28: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1594:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1600:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1600:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1607:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1607:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1614:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1614:13: call_function: calling ‘tls_config_check_allowed_hashed’ from ‘tls_config_check_certificate’
# 1526|   	WINPR_ASSERT(json);
# 1527|   
# 1528|-> 	WINPR_JSON* db = WINPR_JSON_GetObjectItemCaseSensitive(json, "certificate-db");
# 1529|   	if (!db || !WINPR_JSON_IsArray(db))
# 1530|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1575:33: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_get_fingerprint_by_hash_ex(cert,  WINPR_JSON_GetStringValue(WINPR_JSON_GetObjectItemCaseSensitive(WINPR_JSON_GetArrayItem(WINPR_JSON_GetObjectItemCaseSensitive(json, "certificate-db"), x), "type")), 0)’
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1529:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1532:28: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1534:35: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1535:21: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1543:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1565:30: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1575:33: throw: if ‘_stricmp’ throws an exception...
FreeRDP-3.20.0/libfreerdp/crypto/tls.c:1575:33: danger: ‘freerdp_certificate_get_fingerprint_by_hash_ex(cert,  WINPR_JSON_GetStringValue(WINPR_JSON_GetObjectItemCaseSensitive(WINPR_JSON_GetArrayItem(WINPR_JSON_GetObjectItemCaseSensitive(json, "certificate-db"), x), "type")), 0)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/6)
# 1573|   		}
# 1574|   
# 1575|-> 		const int cmp = _stricmp(hash, sval);
# 1576|   		free(hash);
# 1577|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:298:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:188:20: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  296|   		}
#  297|   
#  298|-> 		const int rc1 = fcntl(fd, F_SETFL, orig | O_NONBLOCK);
#  299|   		if (rc1 != 0)
#  300|   		{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:298:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  296|   		}
#  297|   
#  298|-> 		const int rc1 = fcntl(fd, F_SETFL, orig | O_NONBLOCK);
#  299|   		if (rc1 != 0)
#  300|   		{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:302:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:188:20: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  300|   		{
#  301|   			char buffer[128] = { 0 };
#  302|-> 			WLog_ERR(TAG, "fcntl(F_SETFL) failed with %s",
#  303|   			         winpr_strerror(errno, buffer, sizeof(buffer)));
#  304|   			return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:302:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  300|   		{
#  301|   			char buffer[128] = { 0 };
#  302|-> 			WLog_ERR(TAG, "fcntl(F_SETFL) failed with %s",
#  303|   			         winpr_strerror(errno, buffer, sizeof(buffer)));
#  304|   			return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:310:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:188:20: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  308|   		{
#  309|   			char buffer[128] = { 0 };
#  310|-> 			WLog_ERR(TAG, "tcgetattr() failed with %s",
#  311|   			         winpr_strerror(errno, buffer, sizeof(buffer)));
#  312|   			return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:310:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  308|   		{
#  309|   			char buffer[128] = { 0 };
#  310|-> 			WLog_ERR(TAG, "tcgetattr() failed with %s",
#  311|   			         winpr_strerror(errno, buffer, sizeof(buffer)));
#  312|   			return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def92]
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: warning[-Wanalyzer-null-argument]: use of NULL ‘arg’ where non-null expected
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:92:5: enter_function: entry to ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:129:6: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:130:22: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:133:6: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: following ‘false’ branch (when ‘run_all != 1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_true: following ‘true’ branch (when ‘testToRun == -1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:24: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:168:15: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:33: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:8: branch_true: following ‘true’ branch (when ‘partial_match != 0’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: danger: argument 2 (‘arg’) NULL where non-null expected
#  168|     for (i = 0; i < NumTests && testToRun == -1; ++i) {
#  169|       char *test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
#  170|->     if (partial_match != 0 && strstr(test_name, arg) != CM_NULL) { /* NOLINT */
#  171|         testToRun = i;
#  172|         ac -= 2;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def93]
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: warning[-Wanalyzer-null-argument]: use of NULL ‘lowercase(cmakeGeneratedFunctionMapEntries[i].name)’ where non-null expected
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:92:5: enter_function: entry to ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:129:6: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:130:22: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:133:6: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: following ‘false’ branch (when ‘run_all != 1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_true: following ‘true’ branch (when ‘testToRun == -1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:24: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:168:15: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:33: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:8: branch_true: following ‘true’ branch (when ‘partial_match != 0’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: danger: argument 1 (‘lowercase(cmakeGeneratedFunctionMapEntries[i].name)’) NULL where non-null expected
#  168|     for (i = 0; i < NumTests && testToRun == -1; ++i) {
#  169|       char *test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
#  170|->     if (partial_match != 0 && strstr(test_name, arg) != CM_NULL) { /* NOLINT */
#  171|         testToRun = i;
#  172|         ac -= 2;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def94]
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:92:5: enter_function: entry to ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:129:6: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:130:22: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:133:6: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: following ‘false’ branch (when ‘run_all != 1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_true: following ‘true’ branch (when ‘testToRun == -1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:24: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:168:15: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:33: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:8: branch_true: following ‘true’ branch (when ‘partial_match != 0’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: danger: use of uninitialized value ‘*<unknown>’ here
#  168|     for (i = 0; i < NumTests && testToRun == -1; ++i) {
#  169|       char *test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
#  170|->     if (partial_match != 0 && strstr(test_name, arg) != CM_NULL) { /* NOLINT */
#  171|         testToRun = i;
#  172|         ac -= 2;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def95]
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*arg’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:92:5: enter_function: entry to ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:129:6: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:130:22: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:133:6: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: following ‘false’ branch (when ‘run_all != 1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_true: following ‘true’ branch (when ‘testToRun == -1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:24: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:168:15: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:33: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:8: branch_true: following ‘true’ branch (when ‘partial_match != 0’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:31: danger: use of uninitialized value ‘*arg’ here
#  168|     for (i = 0; i < NumTests && testToRun == -1; ++i) {
#  169|       char *test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
#  170|->     if (partial_match != 0 && strstr(test_name, arg) != CM_NULL) { /* NOLINT */
#  171|         testToRun = i;
#  172|         ac -= 2;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def96]
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:174:38: warning[-Wanalyzer-null-argument]: use of NULL ‘arg’ where non-null expected
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:92:5: enter_function: entry to ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:129:6: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:130:22: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:133:6: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: following ‘false’ branch (when ‘run_all != 1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_true: following ‘true’ branch (when ‘testToRun == -1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:24: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:168:15: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:33: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:8: branch_false: following ‘false’ branch (when ‘partial_match == 0’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:174:38: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:174:38: danger: argument 2 (‘arg’) NULL where non-null expected
#  172|         ac -= 2;
#  173|         av += 2;
#  174|->     } else if (partial_match == 0 && strcmp(test_name, arg) == 0) {
#  175|         testToRun = i;
#  176|         ac--;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def97]
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:174:38: warning[-Wanalyzer-null-argument]: use of NULL ‘lowercase(cmakeGeneratedFunctionMapEntries[i].name)’ where non-null expected
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:92:5: enter_function: entry to ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:129:6: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:130:22: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:133:6: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:137:6: branch_false: following ‘false’ branch (when ‘run_all != 1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:165:6: branch_true: following ‘true’ branch (when ‘testToRun == -1’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:24: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:166:11: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:168:15: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:33: branch_true: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: call_function: calling ‘lowercase’ from ‘main’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:169:23: return_function: returning to ‘main’ from ‘lowercase’
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:170:8: branch_false: following ‘false’ branch (when ‘partial_match == 0’)...
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:174:38: branch_false: ...to here
FreeRDP-3.20.0/redhat-linux-build/winpr/libwinpr/credentials/test/TestCredentials.c:174:38: danger: argument 1 (‘lowercase(cmakeGeneratedFunctionMapEntries[i].name)’) NULL where non-null expected
#  172|         ac -= 2;
#  173|         av += 2;
#  174|->     } else if (partial_match == 0 && strcmp(test_name, arg) == 0) {
#  175|         testToRun = i;
#  176|         ac--;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def98]
FreeRDP-3.20.0/server/proxy/channels/pf_channel_drdynvc.c:140:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
FreeRDP-3.20.0/server/proxy/channels/pf_channel_drdynvc.c:687:24: enter_function: entry to ‘DynvcTrackerPeekFn’
FreeRDP-3.20.0/server/proxy/channels/pf_channel_drdynvc.c:716:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/server/proxy/channels/pf_channel_drdynvc.c:719:28: call_function: inlined call to ‘Stream_Get_UINT8’ from ‘DynvcTrackerPeekFn’
FreeRDP-3.20.0/server/proxy/channels/pf_channel_drdynvc.c:754:33: call_function: calling ‘dyn_log_’ from ‘DynvcTrackerPeekFn’
#  138|   	va_list ap;
#  139|   	va_start(ap, fmt);
#  140|-> 	(void)winpr_vasprintf(&msg, &msglen, fmt, ap);
#  141|   	va_end(ap);
#  142|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:268:21: warning[-Wanalyzer-malloc-leak]: leak of ‘winpr_BinToHexString(expect,  length, 1)’
FreeRDP-3.20.0/libfreerdp/crypto/per.c:391:13: enter_function: entry to ‘per_check_oid_and_log_mismatch’
FreeRDP-3.20.0/libfreerdp/crypto/per.c:400:36: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/crypto/per.c:402:17: call_function: calling ‘WLog_Print_dbg_tag’ from ‘per_check_oid_and_log_mismatch’
#  266|   	{
#  267|   		static wLog* log_cached_ptr = NULL;
#  268|-> 		if (!log_cached_ptr)
#  269|   			log_cached_ptr = WLog_Get(tag);
#  270|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:268:21: warning[-Wanalyzer-malloc-leak]: leak of ‘winpr_BinToHexString(got,  length, 1)’
FreeRDP-3.20.0/libfreerdp/crypto/per.c:391:13: enter_function: entry to ‘per_check_oid_and_log_mismatch’
FreeRDP-3.20.0/libfreerdp/crypto/per.c:399:33: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/crypto/per.c:402:17: call_function: calling ‘WLog_Print_dbg_tag’ from ‘per_check_oid_and_log_mismatch’
#  266|   	{
#  267|   		static wLog* log_cached_ptr = NULL;
#  268|-> 		if (!log_cached_ptr)
#  269|   			log_cached_ptr = WLog_Get(tag);
#  270|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:269:42: warning[-Wanalyzer-malloc-leak]: leak of ‘domain’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:838:13: enter_function: entry to ‘arm_fill_rdstls’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:867:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:872:23: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:876:20: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:877:34: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:877:34: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:878:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: call_function: calling ‘WLog_Print_dbg_tag’ from ‘arm_fill_rdstls’
#  267|   		static wLog* log_cached_ptr = NULL;
#  268|   		if (!log_cached_ptr)
#  269|-> 			log_cached_ptr = WLog_Get(tag);
#  270|   
#  271|   		if (WLog_IsLevelActive(log_cached_ptr, log_level))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:269:42: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:188:20: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  267|   		static wLog* log_cached_ptr = NULL;
#  268|   		if (!log_cached_ptr)
#  269|-> 			log_cached_ptr = WLog_Get(tag);
#  270|   
#  271|   		if (WLog_IsLevelActive(log_cached_ptr, log_level))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:269:42: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  267|   		static wLog* log_cached_ptr = NULL;
#  268|   		if (!log_cached_ptr)
#  269|-> 			log_cached_ptr = WLog_Get(tag);
#  270|   
#  271|   		if (WLog_IsLevelActive(log_cached_ptr, log_level))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:271:21: warning[-Wanalyzer-malloc-leak]: leak of ‘domain’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:838:13: enter_function: entry to ‘arm_fill_rdstls’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:867:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:872:23: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:876:20: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:877:34: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:877:34: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:878:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: call_function: calling ‘WLog_Print_dbg_tag’ from ‘arm_fill_rdstls’
#  269|   			log_cached_ptr = WLog_Get(tag);
#  270|   
#  271|-> 		if (WLog_IsLevelActive(log_cached_ptr, log_level))
#  272|   		{
#  273|   			va_list ap;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:271:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:188:20: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  269|   			log_cached_ptr = WLog_Get(tag);
#  270|   
#  271|-> 		if (WLog_IsLevelActive(log_cached_ptr, log_level))
#  272|   		{
#  273|   			va_list ap;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:271:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  269|   			log_cached_ptr = WLog_Get(tag);
#  270|   
#  271|-> 		if (WLog_IsLevelActive(log_cached_ptr, log_level))
#  272|   		{
#  273|   			va_list ap;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:275:25: warning[-Wanalyzer-malloc-leak]: leak of ‘domain’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:838:13: enter_function: entry to ‘arm_fill_rdstls’
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:867:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:872:23: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:876:20: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:877:34: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:877:34: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:878:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/core/gateway/arm.c:882:21: call_function: calling ‘WLog_Print_dbg_tag’ from ‘arm_fill_rdstls’
#  273|   			va_list ap;
#  274|   			va_start(ap, fkt);
#  275|-> 			WLog_PrintMessageVA(log_cached_ptr, WLOG_MESSAGE_TEXT, log_level, line, file, fkt, ap);
#  276|   			va_end(ap);
#  277|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:275:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:188:20: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  273|   			va_list ap;
#  274|   			va_start(ap, fkt);
#  275|-> 			WLog_PrintMessageVA(log_cached_ptr, WLOG_MESSAGE_TEXT, log_level, line, file, fkt, ap);
#  276|   			va_end(ap);
#  277|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:275:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:135:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:143:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:149:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:189:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:192:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/utils/passphrase.c:198:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
#  273|   			va_list ap;
#  274|   			va_start(ap, fkt);
#  275|-> 			WLog_PrintMessageVA(log_cached_ptr, WLOG_MESSAGE_TEXT, log_level, line, file, fkt, ap);
#  276|   			va_end(ap);
#  277|   		}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def110]
FreeRDP-3.20.0/winpr/libwinpr/comm/comm.c:210:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
FreeRDP-3.20.0/winpr/libwinpr/comm/comm.c:203:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/winpr/libwinpr/comm/comm.c:206:14: branch_false: ...to here
FreeRDP-3.20.0/winpr/libwinpr/comm/comm.c:206:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/winpr/libwinpr/comm/comm.c:208:17: branch_false: ...to here
FreeRDP-3.20.0/winpr/libwinpr/comm/comm.c:209:9: acquire_resource: ‘va_start’ called here
FreeRDP-3.20.0/winpr/libwinpr/comm/comm.c:210:9: throw: if ‘WLog_PrintTextMessageVA’ throws an exception...
FreeRDP-3.20.0/winpr/libwinpr/comm/comm.c:210:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  208|   	va_list ap = { 0 };
#  209|   	va_start(ap, fmt);
#  210|-> 	WLog_PrintTextMessageVA(sLog, level, line, file, fkt, fmt, ap);
#  211|   	va_end(ap);
#  212|   }

Error: COMPILER_WARNING: [#def111]
FreeRDP-3.20.0/winpr/libwinpr/path/path.c:1143:36: note[note]: length computed here
# 1141|   		return FALSE;
# 1142|   
# 1143|-> 	const size_t pathnamelen = strlen(lpPathName);
# 1144|   	const size_t path_slash_len = pathnamelen + 3;
# 1145|   	char* path_slash = calloc(pathnamelen + 4, sizeof(char));

Error: COMPILER_WARNING: [#def112]
FreeRDP-3.20.0/winpr/libwinpr/path/path.c:1148:9: warning[-Wstringop-overflow=]: ‘strncat’ specified bound depends on the length of the source argument
# 1146|   	if (!path_slash)
# 1147|   		return FALSE;
# 1148|-> 	strncat(path_slash, lpPathName, pathnamelen);
# 1149|   
# 1150|   	const char star[] = "*";

Error: COMPILER_WARNING (CWE-704): [#def113]
FreeRDP-3.20.0/winpr/libwinpr/utils/json/json-c.c: scope_hint: In function ‘WINPR_JSON_GetObjectItem’
FreeRDP-3.20.0/winpr/libwinpr/utils/json/json-c.c:79:65: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘json_object_iter_begin’ discards ‘const’ qualifier from pointer target type
#   79 |         struct json_object_iterator it = json_object_iter_begin((const json_object*)object);
#      |                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/json-c/json.h:28: included_from: Included from here.
FreeRDP-3.20.0/winpr/libwinpr/utils/json/json-c.c:30: included_from: Included from here.
/usr/include/json-c/json_object_iterator.h:107:84: note: expected ‘struct json_object *’ but argument is of type ‘const json_object *’
#  107 | JSON_EXPORT struct json_object_iterator json_object_iter_begin(struct json_object *obj);
#      |                                                                ~~~~~~~~~~~~~~~~~~~~^~~
#   77|   WINPR_JSON* WINPR_JSON_GetObjectItem(const WINPR_JSON* object, const char* string)
#   78|   {
#   79|-> 	struct json_object_iterator it = json_object_iter_begin((const json_object*)object);
#   80|   	struct json_object_iterator itEnd = json_object_iter_end((const json_object*)object);
#   81|   	while (!json_object_iter_equal(&it, &itEnd))

Error: COMPILER_WARNING (CWE-704): [#def114]
FreeRDP-3.20.0/winpr/libwinpr/utils/json/json-c.c:79:65: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘json_object_iter_begin’ discards ‘const’ qualifier from pointer target type
#   77|   WINPR_JSON* WINPR_JSON_GetObjectItem(const WINPR_JSON* object, const char* string)
#   78|   {
#   79|-> 	struct json_object_iterator it = json_object_iter_begin((const json_object*)object);
#   80|   	struct json_object_iterator itEnd = json_object_iter_end((const json_object*)object);
#   81|   	while (!json_object_iter_equal(&it, &itEnd))

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
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-16.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namefreerdp-3.16.0-4.fc43
diffbase-store-results-to/tmp/tmp51nvx5sh/freerdp-3.16.0-4.fc43.tar.xz
diffbase-time-created2026-01-08 16:09:42
diffbase-time-finished2026-01-08 16:16:16
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp51nvx5sh/freerdp-3.16.0-4.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp51nvx5sh/freerdp-3.16.0-4.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-16.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-namefreerdp-3.20.0-1.fc44
store-results-to/tmp/tmpucll2y_4/freerdp-3.20.0-1.fc44.tar.xz
time-created2026-01-08 16:17:53
time-finished2026-01-08 16:24:02
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpucll2y_4/freerdp-3.20.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpucll2y_4/freerdp-3.20.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9