Task #90424 - added.err
back to task #90424download
Error: GCC_ANALYZER_WARNING (CWE-401):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:159:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:210:22: enter_function: entry to ‘scard_context_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:212:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:217:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:227:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:233:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:238:9: call_function: calling ‘scard_status_transition’ from ‘scard_context_new’
# 157| }
# 158| {
# 159|-> InitOnceExecuteOnce(&g_ReaderNameWGuard, g_ReaderNameWInit, NULL, NULL);
# 160| SCARD_READERSTATEW* reader = &context->readerStateW[0];
# 161| reader->szReader = g_ReaderNameW;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:186:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:182:12: branch_true: following ‘true’ branch (when ‘dstSize == 4294967295’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:184:29: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:184:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:186:17: throw: if ‘ArrayList_Append’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:186:17: danger: ‘tmp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 184| void* tmp = malloc(srcSize);
# 185| memcpy(tmp, src, srcSize);
# 186|-> ArrayList_Append(ctx->strings, tmp);
# 187| *((void**)dst) = tmp;
# 188| return (UINT32)srcSize;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:203:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:210:22: enter_function: entry to ‘scard_context_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:212:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:217:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:218:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:241:9: call_function: calling ‘scard_context_free’ from ‘scard_context_new’
# 201| if (ctx)
# 202| {
# 203|-> HashTable_Free(ctx->cards);
# 204| ArrayList_Free(ctx->strings);
# 205| HashTable_Free(ctx->cache);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:204:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:210:22: enter_function: entry to ‘scard_context_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:212:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:217:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:218:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:241:9: call_function: calling ‘scard_context_free’ from ‘scard_context_new’
# 202| {
# 203| HashTable_Free(ctx->cards);
# 204|-> ArrayList_Free(ctx->strings);
# 205| HashTable_Free(ctx->cache);
# 206| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:205:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:210:22: enter_function: entry to ‘scard_context_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:212:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:217:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:218:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:241:9: call_function: calling ‘scard_context_free’ from ‘scard_context_new’
# 203| HashTable_Free(ctx->cards);
# 204| ArrayList_Free(ctx->strings);
# 205|-> HashTable_Free(ctx->cache);
# 206| }
# 207| free(ctx);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:212:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: throw: if ‘ArrayList_New’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 214| return NULL;
# 215|
# 216|-> ctx->strings = ArrayList_New(FALSE);
# 217| if (!ctx->strings)
# 218| goto fail;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:217:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: throw: if ‘ArrayList_Object’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
# 219| else
# 220| {
# 221|-> wObject* obj = ArrayList_Object(ctx->strings);
# 222| WINPR_ASSERT(obj);
# 223| obj->fnObjectFree = free;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:212:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:217:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: throw: if ‘ArrayList_Object’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 219| else
# 220| {
# 221|-> wObject* obj = ArrayList_Object(ctx->strings);
# 222| WINPR_ASSERT(obj);
# 223| obj->fnObjectFree = free;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:226:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:212:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:217:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:226:22: throw: if ‘HashTable_New’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:226:22: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 224| }
# 225|
# 226|-> ctx->cache = HashTable_New(FALSE);
# 227| if (!ctx->cache)
# 228| goto fail;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:14: warning[-Wanalyzer-malloc-leak]: leak of ‘HashTable_New(0)’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:217:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:226:22: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:227:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:14: throw: if ‘HashTable_SetupForStringData’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:14: danger: ‘HashTable_New(0)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
# 227| if (!ctx->cache)
# 228| goto fail;
# 229|-> if (!HashTable_SetupForStringData(ctx->cache, FALSE))
# 230| goto fail;
# 231| else
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:212:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:217:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:227:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:14: throw: if ‘HashTable_SetupForStringData’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:14: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 227| if (!ctx->cache)
# 228| goto fail;
# 229|-> if (!HashTable_SetupForStringData(ctx->cache, FALSE))
# 230| goto fail;
# 231| else
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:233:32: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:212:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:213:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:216:24: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:217:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:221:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:227:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:229:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:233:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:233:32: throw: if ‘HashTable_ValueObject’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:233:32: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 231| else
# 232| {
# 233|-> wObject* val = HashTable_ValueObject(ctx->cache);
# 234| WINPR_ASSERT(val);
# 235| val->fnObjectFree = free;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:251:17: warning[-Wanalyzer-malloc-leak]: leak of ‘hdl’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:256:21: enter_function: entry to ‘scard_handle_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:263:15: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_true: following ‘true’ branch (when ‘unicode != 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:272:28: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:275:20: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:276:25: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:313:9: call_function: calling ‘scard_handle_free’ from ‘scard_handle_new’
# 249| {
# 250| free(hdl->szReader.pv);
# 251|-> vgids_free(hdl->vgids);
# 252| }
# 253| free(hdl);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:272:28: warning[-Wanalyzer-malloc-leak]: leak of ‘hdl’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:263:15: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_true: following ‘true’ branch (when ‘unicode != 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:272:28: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:272:28: throw: if ‘_wcslen’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:272:28: danger: ‘hdl’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 270| if (unicode)
# 271| {
# 272|-> size_t s = _wcslen(name);
# 273|
# 274| hdl->szReader.pw = calloc(s + 2, sizeof(WCHAR));
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: following ‘false’ branch (when ‘unicode == 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:281:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:283:36: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:284:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:286:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:289:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: throw: if ‘vgids_new’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/4)
# 290| goto fail;
# 291|
# 292|-> hdl->vgids = vgids_new();
# 293| if (!hdl->vgids)
# 294| goto fail;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: warning[-Wanalyzer-malloc-leak]: leak of ‘hdl’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:263:15: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: following ‘false’ branch (when ‘unicode == 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:281:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:284:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:286:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:289:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: throw: if ‘vgids_new’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: danger: ‘hdl’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 290| goto fail;
# 291|
# 292|-> hdl->vgids = vgids_new();
# 293| if (!hdl->vgids)
# 294| goto fail;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: following ‘false’ branch (when ‘unicode == 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:281:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:283:36: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:284:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:286:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:289:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:293:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: throw: if ‘freerdp_settings_get_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
# 296| {
# 297| const char* pem =
# 298|-> freerdp_settings_get_string(smartcard->settings, FreeRDP_SmartcardCertificate);
# 299| const char* key =
# 300| freerdp_settings_get_string(smartcard->settings, FreeRDP_SmartcardPrivateKey);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: warning[-Wanalyzer-malloc-leak]: leak of ‘hdl’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:263:15: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: following ‘false’ branch (when ‘unicode == 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:281:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:284:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:286:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:289:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:293:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: throw: if ‘freerdp_settings_get_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: danger: ‘hdl’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
# 296| {
# 297| const char* pem =
# 298|-> freerdp_settings_get_string(smartcard->settings, FreeRDP_SmartcardCertificate);
# 299| const char* key =
# 300| freerdp_settings_get_string(smartcard->settings, FreeRDP_SmartcardPrivateKey);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:300:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: following ‘false’ branch (when ‘unicode == 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:281:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:283:36: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:284:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:286:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:289:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:293:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:300:21: throw: if ‘freerdp_settings_get_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:300:21: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/4)
# 298| freerdp_settings_get_string(smartcard->settings, FreeRDP_SmartcardCertificate);
# 299| const char* key =
# 300|-> freerdp_settings_get_string(smartcard->settings, FreeRDP_SmartcardPrivateKey);
# 301|
# 302| const char* pin = freerdp_settings_get_string(smartcard->settings, FreeRDP_Password);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:300:21: warning[-Wanalyzer-malloc-leak]: leak of ‘hdl’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:263:15: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: following ‘false’ branch (when ‘unicode == 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:281:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:284:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:286:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:289:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:293:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:300:21: throw: if ‘freerdp_settings_get_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:300:21: danger: ‘hdl’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
# 298| freerdp_settings_get_string(smartcard->settings, FreeRDP_SmartcardCertificate);
# 299| const char* key =
# 300|-> freerdp_settings_get_string(smartcard->settings, FreeRDP_SmartcardPrivateKey);
# 301|
# 302| const char* pin = freerdp_settings_get_string(smartcard->settings, FreeRDP_Password);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:302:35: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: following ‘false’ branch (when ‘unicode == 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:281:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:283:36: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:284:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:286:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:289:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:293:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:302:35: throw: if ‘freerdp_settings_get_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:302:35: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
# 300| freerdp_settings_get_string(smartcard->settings, FreeRDP_SmartcardPrivateKey);
# 301|
# 302|-> const char* pin = freerdp_settings_get_string(smartcard->settings, FreeRDP_Password);
# 303|
# 304| if (!vgids_init(hdl->vgids, pem, key, pin))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:302:35: warning[-Wanalyzer-malloc-leak]: leak of ‘hdl’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:263:15: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: following ‘false’ branch (when ‘unicode == 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:281:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:284:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:286:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:289:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:293:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:302:35: throw: if ‘freerdp_settings_get_string’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:302:35: danger: ‘hdl’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
# 300| freerdp_settings_get_string(smartcard->settings, FreeRDP_SmartcardPrivateKey);
# 301|
# 302|-> const char* pin = freerdp_settings_get_string(smartcard->settings, FreeRDP_Password);
# 303|
# 304| if (!vgids_init(hdl->vgids, pem, key, pin))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:304:22: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: following ‘false’ branch (when ‘unicode == 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:281:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:283:36: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:284:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:286:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:289:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:293:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:304:22: throw: if ‘vgids_init’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:304:22: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
# 302| const char* pin = freerdp_settings_get_string(smartcard->settings, FreeRDP_Password);
# 303|
# 304|-> if (!vgids_init(hdl->vgids, pem, key, pin))
# 305| goto fail;
# 306| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:304:22: warning[-Wanalyzer-malloc-leak]: leak of ‘hdl’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:263:15: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:264:12: branch_false: following ‘false’ branch (when ‘hdl’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:270:12: branch_false: following ‘false’ branch (when ‘unicode == 0’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:281:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:284:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:286:17: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:289:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:292:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:293:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:298:21: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:304:22: throw: if ‘vgids_init’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:304:22: danger: ‘hdl’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
# 302| const char* pin = freerdp_settings_get_string(smartcard->settings, FreeRDP_Password);
# 303|
# 304|-> if (!vgids_init(hdl->vgids, pem, key, pin))
# 305| goto fail;
# 306| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2337:22: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2324:12: branch_false: following ‘false’ branch (when ‘DataLen <= 4096’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2327:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2327:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2330:16: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2331:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2333:24: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2333:24: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2334:20: branch_false: following ‘false’ branch (when ‘item’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2337:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2337:22: throw: if ‘HashTable_Insert’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2337:22: danger: ‘item’ leaks here; was allocated at [(7)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/6)
# 2335| return SCARD_E_NO_MEMORY;
# 2336|
# 2337|-> rc = HashTable_Insert(table, key, item);
# 2338| if (!rc)
# 2339| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2353:1: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2324:12: branch_false: following ‘false’ branch (when ‘DataLen <= 4096’)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2327:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2327:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2330:16: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2331:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2333:24: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2333:24: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2334:20: branch_false: following ‘false’ branch (when ‘item’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2337:22: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2338:20: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2345:13: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2345:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2345:12: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2353:1: danger: ‘item’ leaks here; was allocated at [(7)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/6)
# 2351| // NOLINTNEXTLINE(clang-analyzer-unix.Malloc): HashTable_Insert takes ownership of item
# 2352| return SCARD_S_SUCCESS;
# 2353|-> }
# 2354|
# 2355| LONG WINAPI Emulate_SCardWriteCacheA(SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext,
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2702:26: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2697:21: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2702:26: throw: if ‘WLog_Get’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2702:26: danger: ‘smartcard’ leaks here; was allocated at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
# 2700|
# 2701| smartcard->settings = settings;
# 2702|-> smartcard->log = WLog_Get("EmulateSCard");
# 2703| if (!smartcard->log)
# 2704| goto fail;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2707:31: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2697:21: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2703:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2705:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2707:31: throw: if ‘HashTable_New’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2707:31: danger: ‘smartcard’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
# 2705| smartcard->log_default_level = WLOG_TRACE;
# 2706|
# 2707|-> smartcard->contexts = HashTable_New(FALSE);
# 2708| if (!smartcard->contexts)
# 2709| goto fail;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2703:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2705:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2707:31: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2708:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: throw: if ‘HashTable_KeyObject’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/4)
# 2710| else
# 2711| {
# 2712|-> wObject* obj = HashTable_KeyObject(smartcard->contexts);
# 2713| WINPR_ASSERT(obj);
# 2714| obj->fnObjectEquals = context_equals;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2697:21: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2703:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2705:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2708:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: throw: if ‘HashTable_KeyObject’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: danger: ‘smartcard’ leaks here; was allocated at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
# 2710| else
# 2711| {
# 2712|-> wObject* obj = HashTable_KeyObject(smartcard->contexts);
# 2713| WINPR_ASSERT(obj);
# 2714| obj->fnObjectEquals = context_equals;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2720:32: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2697:21: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2703:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2705:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2708:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2716:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2720:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2720:32: throw: if ‘HashTable_ValueObject’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2720:32: danger: ‘smartcard’ leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
# 2718| else
# 2719| {
# 2720|-> wObject* obj = HashTable_ValueObject(smartcard->contexts);
# 2721| WINPR_ASSERT(obj);
# 2722| obj->fnObjectFree = scard_context_free;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2725:30: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2697:21: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2703:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2705:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2708:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2716:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2720:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2725:30: throw: if ‘HashTable_New’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2725:30: danger: ‘smartcard’ leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
# 2723| }
# 2724|
# 2725|-> smartcard->handles = HashTable_New(FALSE);
# 2726| if (!smartcard->handles)
# 2727| goto fail;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2730:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2703:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2705:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2708:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2716:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2720:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2725:30: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2726:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2730:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2730:32: throw: if ‘HashTable_KeyObject’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2730:32: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/8)
# 2728| else
# 2729| {
# 2730|-> wObject* obj = HashTable_KeyObject(smartcard->handles);
# 2731| WINPR_ASSERT(obj);
# 2732| obj->fnObjectEquals = handle_equals;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2730:32: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2697:21: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2703:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2705:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2708:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2716:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2720:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2726:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2730:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2730:32: throw: if ‘HashTable_KeyObject’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2730:32: danger: ‘smartcard’ leaks here; was allocated at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
# 2728| else
# 2729| {
# 2730|-> wObject* obj = HashTable_KeyObject(smartcard->handles);
# 2731| WINPR_ASSERT(obj);
# 2732| obj->fnObjectEquals = handle_equals;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2738:32: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2697:21: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2703:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2705:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2708:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2712:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2716:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2720:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2726:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2730:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2734:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2738:32: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2738:32: throw: if ‘HashTable_ValueObject’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2738:32: danger: ‘smartcard’ leaks here; was allocated at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0)
# 2736| else
# 2737| {
# 2738|-> wObject* obj = HashTable_ValueObject(smartcard->handles);
# 2739| WINPR_ASSERT(obj);
# 2740| obj->fnObjectFree = scard_handle_free;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2758:9: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2691:28: enter_function: entry to ‘Emulate_New’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2697:21: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2703:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2704:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2748:9: call_function: calling ‘Emulate_Free’ from ‘Emulate_New’
# 2756| return;
# 2757|
# 2758|-> HashTable_Free(context->handles);
# 2759| HashTable_Free(context->contexts);
# 2760| free(context);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2759:9: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2691:28: enter_function: entry to ‘Emulate_New’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2697:21: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2698:12: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2701:9: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2703:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2704:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_emulate.c:2748:9: call_function: calling ‘Emulate_Free’ from ‘Emulate_New’
# 2757|
# 2758| HashTable_Free(context->handles);
# 2759|-> HashTable_Free(context->contexts);
# 2760| free(context);
# 2761| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:276:20: warning[-Wanalyzer-malloc-leak]: leak of ‘ef’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1460:6: enter_function: entry to ‘vgids_init’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1490:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1499:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1502:27: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1503:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: call_function: calling ‘vgids_ef_new’ from ‘vgids_init’
# 274|
# 275| ef->id = id;
# 276|-> ef->data = Stream_New(NULL, 1024);
# 277| if (!ef->data)
# 278| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:282:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1460:6: enter_function: entry to ‘vgids_init’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1490:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1499:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1502:27: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1503:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: call_function: calling ‘vgids_ef_new’ from ‘vgids_init’
# 280| goto create_failed;
# 281| }
# 282|-> Stream_SetLength(ef->data, 0);
# 283|
# 284| if (!ArrayList_Append(ctx->files, ef))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:282:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ef’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1460:6: enter_function: entry to ‘vgids_init’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1490:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1499:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1502:27: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1503:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: call_function: calling ‘vgids_ef_new’ from ‘vgids_init’
# 280| goto create_failed;
# 281| }
# 282|-> Stream_SetLength(ef->data, 0);
# 283|
# 284| if (!ArrayList_Append(ctx->files, ef))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:284:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ef’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1460:6: enter_function: entry to ‘vgids_init’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1490:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1499:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1502:27: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1503:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: call_function: calling ‘vgids_ef_new’ from ‘vgids_init’
# 282| Stream_SetLength(ef->data, 0);
# 283|
# 284|-> if (!ArrayList_Append(ctx->files, ef))
# 285| {
# 286| WLog_ERR(TAG, "Failed to add new ef to file list");
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:419:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ef’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1460:6: enter_function: entry to ‘vgids_init’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1490:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1499:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1502:27: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1503:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: call_function: calling ‘vgids_ef_new’ from ‘vgids_init’
# 417| if (ef)
# 418| {
# 419|-> Stream_Free(ef->data, TRUE);
# 420| free(ef);
# 421| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:816:49: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_get_param(*context.certificate, 1, & nSize)’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:815:19: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:816:19: throw: if ‘freerdp_certificate_get_param’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:816:49: danger: ‘freerdp_certificate_get_param(*context.certificate, 1, & nSize)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 814|
# 815| char* n = freerdp_certificate_get_param(context->certificate, FREERDP_CERT_RSA_N, &nSize);
# 816|-> char* e = freerdp_certificate_get_param(context->certificate, FREERDP_CERT_RSA_E, &eSize);
# 817|
# 818| if (!n || !e)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:818:13: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_get_param(*context.certificate, 0, & eSize)’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:816:19: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:818:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:821:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:821:18: throw: if ‘Stream_New’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:818:13: danger: ‘freerdp_certificate_get_param(*context.certificate, 0, & eSize)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
# 816| char* e = freerdp_certificate_get_param(context->certificate, FREERDP_CERT_RSA_E, &eSize);
# 817|
# 818|-> if (!n || !e)
# 819| goto handle_error;
# 820|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:836:14: warning[-Wanalyzer-malloc-leak]: leak of ‘Stream_New(0, *<unknown>.capacity + 16)’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:803:13: enter_function: entry to ‘vgids_get_public_key’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:818:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:821:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:822:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:828:37: call_function: inlined call to ‘Stream_Capacity’ from ‘vgids_get_public_key’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:828:20: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:829:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:836:14: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:836:14: call_function: calling ‘vgids_write_tlv’ from ‘vgids_get_public_key’
# 834|
# 835| /* write modulus and exponent DOs */
# 836|-> if (!vgids_write_tlv(pubKey, 0x81, n, nSize))
# 837| goto handle_error;
# 838|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:855:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pubKey’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:860:13: enter_function: entry to ‘vgids_ins_getdata’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:876:14: call_function: calling ‘vgids_parse_apdu_header’ from ‘vgids_ins_getdata’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:876:14: return_function: returning to ‘vgids_ins_getdata’ from ‘vgids_parse_apdu_header’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:876:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:880:9: call_function: inlined call to ‘vgids_reset_context_response’ from ‘vgids_ins_getdata’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:921:28: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:928:25: call_function: inlined call to ‘stream_read_u8’ from ‘vgids_ins_getdata’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:931:28: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:940:28: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:940:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:946:25: call_function: inlined call to ‘stream_read_u16_be’ from ‘vgids_ins_getdata’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:948:28: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:954:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:954:28: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:961:25: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:961:25: call_function: calling ‘vgids_get_public_key’ from ‘vgids_ins_getdata’
# 853| free(n);
# 854| free(e);
# 855|-> Stream_Free(pubKey, TRUE);
# 856| Stream_Free(response, TRUE);
# 857| return rc;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:856:9: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:860:13: enter_function: entry to ‘vgids_ins_getdata’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:876:14: call_function: calling ‘vgids_parse_apdu_header’ from ‘vgids_ins_getdata’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:876:14: return_function: returning to ‘vgids_ins_getdata’ from ‘vgids_parse_apdu_header’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:876:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:880:9: call_function: inlined call to ‘vgids_reset_context_response’ from ‘vgids_ins_getdata’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:921:28: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:928:25: call_function: inlined call to ‘stream_read_u8’ from ‘vgids_ins_getdata’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:931:28: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:940:28: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:940:28: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:946:25: call_function: inlined call to ‘stream_read_u16_be’ from ‘vgids_ins_getdata’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:948:28: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:954:30: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:954:28: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:961:25: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:961:25: call_function: calling ‘vgids_get_public_key’ from ‘vgids_ins_getdata’
# 854| free(e);
# 855| Stream_Free(pubKey, TRUE);
# 856|-> Stream_Free(response, TRUE);
# 857| return rc;
# 858| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1443:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1441:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1443:22: throw: if ‘ArrayList_New’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1443:22: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/0)
# 1441| vgidsContext* ctx = calloc(1, sizeof(vgidsContext));
# 1442|
# 1443|-> ctx->files = ArrayList_New(FALSE);
# 1444| if (!ctx->files)
# 1445| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1450:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1443:22: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1444:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1450:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1450:15: throw: if ‘ArrayList_Object’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1450:15: danger: ‘<unknown>’ leaks here; was allocated at [(1)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/0)
# 1448| }
# 1449|
# 1450|-> obj = ArrayList_Object(ctx->files);
# 1451| obj->fnObjectFree = vgids_ef_free;
# 1452|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1450:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1441:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1444:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1450:15: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1450:15: throw: if ‘ArrayList_Object’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1450:15: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/0)
# 1448| }
# 1449|
# 1450|-> obj = ArrayList_Object(ctx->files);
# 1451| obj->fnObjectFree = vgids_ef_free;
# 1452|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1630:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1438:15: enter_function: entry to ‘vgids_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1441:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1444:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1456:9: call_function: inlined call to ‘vgids_free’ from ‘vgids_new’
# 1628| if (context)
# 1629| {
# 1630|-> freerdp_key_free(context->privateKey);
# 1631| freerdp_certificate_free(context->certificate);
# 1632| Stream_Free(context->commandData, TRUE);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1631:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1438:15: enter_function: entry to ‘vgids_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1441:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1444:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1456:9: call_function: inlined call to ‘vgids_free’ from ‘vgids_new’
# 1629| {
# 1630| freerdp_key_free(context->privateKey);
# 1631|-> freerdp_certificate_free(context->certificate);
# 1632| Stream_Free(context->commandData, TRUE);
# 1633| Stream_Free(context->responseData, TRUE);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1632:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1438:15: enter_function: entry to ‘vgids_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1441:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1444:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1456:9: call_function: inlined call to ‘vgids_free’ from ‘vgids_new’
# 1630| freerdp_key_free(context->privateKey);
# 1631| freerdp_certificate_free(context->certificate);
# 1632|-> Stream_Free(context->commandData, TRUE);
# 1633| Stream_Free(context->responseData, TRUE);
# 1634| free(context->pin);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1633:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1438:15: enter_function: entry to ‘vgids_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1441:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1444:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1456:9: call_function: inlined call to ‘vgids_free’ from ‘vgids_new’
# 1631| freerdp_certificate_free(context->certificate);
# 1632| Stream_Free(context->commandData, TRUE);
# 1633|-> Stream_Free(context->responseData, TRUE);
# 1634| free(context->pin);
# 1635| ArrayList_Free(context->files);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1635:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1438:15: enter_function: entry to ‘vgids_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1441:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1444:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1456:9: call_function: inlined call to ‘vgids_free’ from ‘vgids_new’
# 1633| Stream_Free(context->responseData, TRUE);
# 1634| free(context->pin);
# 1635|-> ArrayList_Free(context->files);
# 1636| free(context);
# 1637| }
Error: GCC_ANALYZER_WARNING (CWE-401):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
FreeRDP-3.20.0/winpr/include/winpr/stream.h:1298:24: warning[-Wanalyzer-malloc-leak]: leak of ‘Stream_New(0, nSize + eSize + 16)’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:803:13: enter_function: entry to ‘vgids_get_public_key’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:818:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:821:35: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:821:18: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:822:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:828:37: call_function: inlined call to ‘Stream_Capacity’ from ‘vgids_get_public_key’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:828:20: throw: if ‘Stream_New’ throws an exception...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:828:37: call_function: inlined call to ‘Stream_Capacity’ from ‘vgids_get_public_key’
# 1296| {
# 1297| WINPR_ASSERT(_s);
# 1298|-> return _s->capacity;
# 1299| }
# 1300|
Error: GCC_ANALYZER_WARNING (CWE-401):
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):
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):
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:269:42: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1438:15: enter_function: entry to ‘vgids_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1441:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1444:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: call_function: calling ‘WLog_Print_dbg_tag’ from ‘vgids_new’
# 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):
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:269:42: warning[-Wanalyzer-malloc-leak]: leak of ‘ef’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1460:6: enter_function: entry to ‘vgids_init’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1490:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1499:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1502:27: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1503:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: call_function: calling ‘vgids_ef_new’ from ‘vgids_init’
# 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):
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):
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):
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:271:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1438:15: enter_function: entry to ‘vgids_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1441:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1444:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: call_function: calling ‘WLog_Print_dbg_tag’ from ‘vgids_new’
# 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):
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:271:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ef’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1460:6: enter_function: entry to ‘vgids_init’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1490:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1499:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1502:27: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1503:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: call_function: calling ‘vgids_ef_new’ from ‘vgids_init’
# 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):
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):
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):
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:275:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1438:15: enter_function: entry to ‘vgids_new’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1441:29: acquire_memory: allocated here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1444:12: branch_true: following ‘true’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: branch_true: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1446:17: call_function: calling ‘WLog_Print_dbg_tag’ from ‘vgids_new’
# 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):
FreeRDP-3.20.0/winpr/include/winpr/wlog.h:275:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ef’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1460:6: enter_function: entry to ‘vgids_init’
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1490:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1499:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1502:27: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1503:12: branch_false: following ‘false’ branch...
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: branch_false: ...to here
FreeRDP-3.20.0/libfreerdp/emu/scard/smartcard_virtual_gids.c:1508:20: call_function: calling ‘vgids_ef_new’ from ‘vgids_init’
# 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):
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):
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):
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:
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:
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):
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):
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))