Task #90896 - fixed.err
back to task #90896download
Error: GCC_ANALYZER_WARNING (CWE-775):
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&dev_name, 0)’
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:154:12: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:160:13: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:168:27: acquire_resource: opened here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:168:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:29: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:29: throw: if ‘open’ throws an exception...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:29: danger: ‘open(&dev_name, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 174|
# 175| /* Set rec volume to 100%. */
# 176|-> if ((mixer_handle = open(mixer_name, O_RDWR)) < 0)
# 177| {
# 178| OSS_LOG_ERR("mixer open failed, not critical", errno);
Error: GCC_ANALYZER_WARNING (CWE-775):
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:178:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&dev_name, 0)’
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:141:21: enter_function: entry to ‘audin_oss_thread_func’
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:154:12: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:160:13: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:168:27: acquire_resource: opened here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:168:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:29: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:178:64: branch_true: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:178:17: call_function: inlined call to ‘OSS_LOG_ERR’ from ‘audin_oss_thread_func’
# 176| if ((mixer_handle = open(mixer_name, O_RDWR)) < 0)
# 177| {
# 178|-> OSS_LOG_ERR("mixer open failed, not critical", errno);
# 179| }
# 180| else
Error: GCC_ANALYZER_WARNING (CWE-775):
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:185:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&dev_name, 0)’
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:141:21: enter_function: entry to ‘audin_oss_thread_func’
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:154:12: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:160:13: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:168:27: acquire_resource: opened here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:168:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:29: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:182:17: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:184:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:185:84: branch_true: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:185:25: call_function: inlined call to ‘OSS_LOG_ERR’ from ‘audin_oss_thread_func’
# 183|
# 184| if (ioctl(mixer_handle, MIXER_WRITE(SOUND_MIXER_MIC), &tmp) == -1)
# 185|-> OSS_LOG_ERR("WRITE_MIXER - SOUND_MIXER_MIC, not critical", errno);
# 186|
# 187| tmp = (100 | (100 << 8));
Error: GCC_ANALYZER_WARNING (CWE-775):
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:190:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&dev_name, 0)’
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:141:21: enter_function: entry to ‘audin_oss_thread_func’
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:154:12: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:160:13: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:168:27: acquire_resource: opened here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:168:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:29: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:182:17: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:189:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:190:87: branch_true: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:190:25: call_function: inlined call to ‘OSS_LOG_ERR’ from ‘audin_oss_thread_func’
# 188|
# 189| if (ioctl(mixer_handle, MIXER_WRITE(SOUND_MIXER_RECLEV), &tmp) == -1)
# 190|-> OSS_LOG_ERR("WRITE_MIXER - SOUND_MIXER_RECLEV, not critical", errno);
# 191|
# 192| close(mixer_handle);
Error: GCC_ANALYZER_WARNING (CWE-775):
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:192:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&dev_name, 0)’
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:154:12: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:160:13: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:168:27: acquire_resource: opened here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:168:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:29: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:176:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:182:17: branch_false: ...to here
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:192:17: throw: if ‘close’ throws an exception...
FreeRDP-3.16.0/channels/audin/client/oss/audin_oss.c:192:17: danger: ‘open(&dev_name, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
# 190| OSS_LOG_ERR("WRITE_MIXER - SOUND_MIXER_RECLEV, not critical", errno);
# 191|
# 192|-> close(mixer_handle);
# 193| }
# 194|
Error: COMPILER_WARNING:
FreeRDP-3.16.0/channels/rdpsnd/server/rdpsnd_main.c: scope_hint: In function ‘rdpsnd_server_recv_formats’
FreeRDP-3.16.0/channels/rdpsnd/server/rdpsnd_main.c:187:16: warning[-Wunused-but-set-variable=]: variable ‘num_known_format’ set but not used
# 187 | UINT16 num_known_format = 0;
# | ^~~~~~~~~~~~~~~~
# 185| static UINT rdpsnd_server_recv_formats(RdpsndServerContext* context, wStream* s)
# 186| {
# 187|-> UINT16 num_known_format = 0;
# 188| UINT error = CHANNEL_RC_OK;
# 189|
Error: GCC_ANALYZER_WARNING (CWE-404):
FreeRDP-3.16.0/client/X11/xf_utils.c:49:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
FreeRDP-3.16.0/client/X11/xf_utils.c:727:5: enter_function: entry to ‘LogDynAndXReparentWindow_ex’
FreeRDP-3.16.0/client/X11/xf_utils.c:730:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/client/X11/xf_utils.c:732:17: branch_true: ...to here
FreeRDP-3.16.0/client/X11/xf_utils.c:732:17: call_function: calling ‘write_log’ from ‘LogDynAndXReparentWindow_ex’
# 47| va_list ap = { 0 };
# 48| va_start(ap, line);
# 49|-> WLog_PrintMessageVA(log, WLOG_MESSAGE_TEXT, level, line, fname, fkt, ap);
# 50| va_end(ap);
# 51| }
Error: COMPILER_WARNING (CWE-1164):
FreeRDP-3.16.0/client/X11/xf_utils.c:109:12: warning[-Wunused-function]: ‘write_result_log_ex’ defined but not used
# 109 | static int write_result_log_ex(wLog* log, DWORD level, const char* fname, const char* fkt,
# | ^~~~~~~~~~~~~~~~~~~
# 107| }
# 108|
# 109|-> static int write_result_log_ex(wLog* log, DWORD level, const char* fname, const char* fkt,
# 110| size_t line, Display* display, char* name, int rc, size_t count, ...)
# 111| {
Error: GCC_ANALYZER_WARNING (CWE-415):
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:581:9: warning[-Wanalyzer-double-free]: double-‘freerdp_client_rdp_file_free’ of ‘file’
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:287:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:293:14: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:293:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:296:14: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:296:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:299:13: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:306:14: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:306:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:313:13: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:313:12: branch_false: following ‘false’ branch (when the strings are equal)...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:322:13: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:322:12: branch_false: following ‘false’ branch (when the strings are equal)...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:331:9: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:334:16: acquire_memory: allocated here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:336:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:342:14: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:342:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:346:14: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:346:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:349:13: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:349:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:356:14: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:356:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:363:13: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:363:12: branch_false: following ‘false’ branch (when the strings are equal)...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:372:13: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:372:12: branch_false: following ‘false’ branch (when the strings are equal)...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:381:18: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:382:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:387:14: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:387:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:392:18: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:393:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:398:20: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:398:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:449:36: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:450:20: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:455:21: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:455:20: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:455:20: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:461:33: branch_true: following ‘true’ branch (when ‘x != 4’)...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:463:29: branch_true: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:463:28: branch_false: following ‘false’ branch (when the strings are equal)...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:461:49: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:463:28: branch_false: following ‘false’ branch (when the strings are equal)...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:461:49: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:474:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:479:34: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:480:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:485:14: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:485:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:494:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:499:14: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:499:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:504:14: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:504:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:510:18: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:511:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:514:13: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:514:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:520:18: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:521:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:524:20: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:526:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:529:20: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:532:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:535:9: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:537:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:543:9: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:543:9: release_memory: first ‘freerdp_client_rdp_file_free’ here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:573:12: branch_false: following ‘false’ branch (when ‘uniname’ is NULL)...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:575:12: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:575:12: branch_false: following ‘false’ branch (when ‘base’ is NULL)...
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:577:9: branch_false: ...to here
FreeRDP-3.16.0/client/common/test/TestClientRdpFile.c:581:9: danger: second ‘freerdp_client_rdp_file_free’ here; first ‘freerdp_client_rdp_file_free’ was at [(73)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/72)
# 579| free(base);
# 580| free(tmp);
# 581|-> freerdp_client_rdp_file_free(file);
# 582| freerdp_settings_free(settings);
# 583| return rc;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr, length)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4298:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: danger: ‘WINPR_JSON_ParseWithLength(jstr, length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 4303| goto fail;
# 4304|
# 4305|-> WINPR_JSON* jbool = WINPR_JSON_GetObjectItem(
# 4306| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_BOOL));
# 4307| if (!jbool)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
# 4303| goto fail;
# 4304|
# 4305|-> WINPR_JSON* jbool = WINPR_JSON_GetObjectItem(
# 4306| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_BOOL));
# 4307| if (!jbool)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr, length)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4298:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: danger: ‘WINPR_JSON_ParseWithLength(jstr, length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 4307| if (!jbool)
# 4308| goto fail;
# 4309|-> WINPR_JSON* juint16 = WINPR_JSON_GetObjectItem(
# 4310| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT16));
# 4311| if (!juint16)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
# 4307| if (!jbool)
# 4308| goto fail;
# 4309|-> WINPR_JSON* juint16 = WINPR_JSON_GetObjectItem(
# 4310| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT16));
# 4311| if (!juint16)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr, length)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4298:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: danger: ‘WINPR_JSON_ParseWithLength(jstr, length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 4311| if (!juint16)
# 4312| goto fail;
# 4313|-> WINPR_JSON* jint16 = WINPR_JSON_GetObjectItem(
# 4314| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT16));
# 4315| if (!jint16)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
# 4311| if (!juint16)
# 4312| goto fail;
# 4313|-> WINPR_JSON* jint16 = WINPR_JSON_GetObjectItem(
# 4314| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT16));
# 4315| if (!jint16)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr, length)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4298:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: danger: ‘WINPR_JSON_ParseWithLength(jstr, length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
# 4315| if (!jint16)
# 4316| goto fail;
# 4317|-> WINPR_JSON* juint32 = WINPR_JSON_GetObjectItem(
# 4318| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT32));
# 4319| if (!juint32)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
# 4315| if (!jint16)
# 4316| goto fail;
# 4317|-> WINPR_JSON* juint32 = WINPR_JSON_GetObjectItem(
# 4318| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT32));
# 4319| if (!juint32)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr, length)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4298:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4319:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: danger: ‘WINPR_JSON_ParseWithLength(jstr, length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
# 4319| if (!juint32)
# 4320| goto fail;
# 4321|-> WINPR_JSON* jint32 = WINPR_JSON_GetObjectItem(
# 4322| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT32));
# 4323| if (!jint32)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4319:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
# 4319| if (!juint32)
# 4320| goto fail;
# 4321|-> WINPR_JSON* jint32 = WINPR_JSON_GetObjectItem(
# 4322| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT32));
# 4323| if (!jint32)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr, length)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4298:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4319:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4323:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: danger: ‘WINPR_JSON_ParseWithLength(jstr, length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
# 4323| if (!jint32)
# 4324| goto fail;
# 4325|-> WINPR_JSON* juint64 = WINPR_JSON_GetObjectItem(
# 4326| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT64));
# 4327| if (!juint64)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4319:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4323:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
# 4323| if (!jint32)
# 4324| goto fail;
# 4325|-> WINPR_JSON* juint64 = WINPR_JSON_GetObjectItem(
# 4326| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_UINT64));
# 4327| if (!juint64)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr, length)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4298:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4319:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4323:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4327:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: danger: ‘WINPR_JSON_ParseWithLength(jstr, length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
# 4327| if (!juint64)
# 4328| goto fail;
# 4329|-> WINPR_JSON* jint64 = WINPR_JSON_GetObjectItem(
# 4330| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT64));
# 4331| if (!jint64)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4319:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4323:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4327:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/2)
# 4327| if (!juint64)
# 4328| goto fail;
# 4329|-> WINPR_JSON* jint64 = WINPR_JSON_GetObjectItem(
# 4330| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_INT64));
# 4331| if (!jint64)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4333:31: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr, length)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4298:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4319:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4323:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4327:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4331:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4333:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4333:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4333:31: danger: ‘WINPR_JSON_ParseWithLength(jstr, length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0)
# 4331| if (!jint64)
# 4332| goto fail;
# 4333|-> WINPR_JSON* jstring = WINPR_JSON_GetObjectItem(
# 4334| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_STRING));
# 4335| if (!jstring)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4333:31: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4319:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4323:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4327:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4331:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4333:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4333:31: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4333:31: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/2)
# 4331| if (!jint64)
# 4332| goto fail;
# 4333|-> WINPR_JSON* jstring = WINPR_JSON_GetObjectItem(
# 4334| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_STRING));
# 4335| if (!jstring)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4337:32: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(jstr, length)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4298:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4319:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4323:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4327:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4331:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4333:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4335:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4337:32: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4337:32: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4337:32: danger: ‘WINPR_JSON_ParseWithLength(jstr, length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/0)
# 4335| if (!jstring)
# 4336| goto fail;
# 4337|-> WINPR_JSON* jpointer = WINPR_JSON_GetObjectItem(
# 4338| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_POINTER));
# 4339| if (!jpointer)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/common/settings.c:4337:32: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_settings_new(0)’
FreeRDP-3.16.0/libfreerdp/common/settings.c:4299:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4301:33: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4302:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4305:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4307:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4309:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4311:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4313:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4315:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4317:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4319:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4321:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4323:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4325:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4327:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4329:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4331:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4333:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4335:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4337:32: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/common/settings.c:4337:32: throw: if ‘freerdp_settings_get_type_name_for_type’ throws an exception...
FreeRDP-3.16.0/libfreerdp/common/settings.c:4337:32: danger: ‘freerdp_settings_new(0)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/2)
# 4335| if (!jstring)
# 4336| goto fail;
# 4337|-> WINPR_JSON* jpointer = WINPR_JSON_GetObjectItem(
# 4338| json, freerdp_settings_get_type_name_for_type(RDP_SETTINGS_TYPE_POINTER));
# 4339| if (!jpointer)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/aad.c:859:29: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(data, length)’
FreeRDP-3.16.0/libfreerdp/core/aad.c:851:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/aad.c:852:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/aad.c:859:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/aad.c:859:29: throw: if ‘WINPR_JSON_GetObjectItem’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/aad.c:859:29: danger: ‘WINPR_JSON_ParseWithLength(data, length)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
# 857| }
# 858|
# 859|-> access_token_prop = WINPR_JSON_GetObjectItem(json, "access_token");
# 860| if (!access_token_prop)
# 861| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:205:14: warning[-Wanalyzer-malloc-leak]: leak of ‘http_request_new()’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:200:19: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:202:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:205:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:205:14: throw: if ‘http_request_set_method’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:205:14: danger: ‘http_request_new()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 203| return NULL;
# 204|
# 205|-> if (!http_request_set_method(request, method) || !http_request_set_uri(request, uri))
# 206| goto out;
# 207|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:451:14: warning[-Wanalyzer-malloc-leak]: leak of ‘winpr_Cipher_NewEx(cipherType, 0, *<unknown>.pointer + 12, (long unsigned int)v, 0, 0)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:365:26: enter_function: entry to ‘treatAuthBlob’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:372:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:378:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:379:12: branch_false: following ‘false’ branch (when the strings are equal)...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:385:20: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:387:12: branch_false: following ‘false’ branch (when ‘cbInput > 11’)...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:394:17: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:400:9: call_function: inlined call to ‘stream_read_u32_le’ from ‘treatAuthBlob’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:402:12: branch_false: following ‘false’ branch (when ‘v == 1296188491’)...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:402:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:409:9: call_function: inlined call to ‘stream_read_u32_le’ from ‘treatAuthBlob’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:410:12: branch_false: following ‘false’ branch (when ‘v == 1’)...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:410:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:418:9: call_function: inlined call to ‘stream_read_u32_le’ from ‘treatAuthBlob’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:421:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:428:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:444:15: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:445:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:451:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:451:14: throw: if ‘winpr_Cipher_SetPadding’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:451:14: danger: ‘winpr_Cipher_NewEx(cipherType, 0, *<unknown>.pointer + 12, (long unsigned int)v, 0, 0)’ leaks here; was allocated at [(26)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/25)
# 449| }
# 450|
# 451|-> if (!winpr_Cipher_SetPadding(ret, TRUE))
# 452| {
# 453| WLog_Print(log, WLOG_ERROR, "unable to enable padding on cipher");
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:507:14: warning[-Wanalyzer-malloc-leak]: leak of ‘encryptedPass’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:496:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:502:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:503:31: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:506:12: branch_false: following ‘false’ branch (when ‘encryptedPass’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:507:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:507:14: throw: if ‘winpr_Cipher_Update’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:507:14: danger: ‘encryptedPass’ leaks here; was allocated at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
# 505| size_t finalLen = 0;
# 506| if (!encryptedPass ||
# 507|-> !winpr_Cipher_Update(cipher, wpasswd, wpasswdBytes, encryptedPass, &encryptedPassLen) ||
# 508| !winpr_Cipher_Final(cipher, encryptedPass + encryptedPassLen, &finalLen))
# 509| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:629:33: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:708:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:747:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:749:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:754:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:755:34: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:755:34: call_function: calling ‘arm_parse_ipvx_count’ from ‘arm_treat_azureInstanceNetworkMetadata’
# 627| {
# 628| WINPR_ASSERT(ipvX);
# 629|-> WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItem(ipvX, "ipAddress");
# 630| if (!ipAddress || !WINPR_JSON_IsArray(ipAddress))
# 631| return 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:632:16: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:708:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:747:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:749:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:754:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:755:34: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:755:34: call_function: calling ‘arm_parse_ipvx_count’ from ‘arm_treat_azureInstanceNetworkMetadata’
# 630| if (!ipAddress || !WINPR_JSON_IsArray(ipAddress))
# 631| return 0;
# 632|-> return WINPR_JSON_GetArraySize(ipAddress);
# 633| }
# 634|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:644:33: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:708:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:766:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:775:30: call_function: calling ‘arm_parse_ipv6’ from ‘arm_treat_azureInstanceNetworkMetadata’
# 642| return TRUE;
# 643|
# 644|-> WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItem(ipv6, "ipAddress");
# 645| if (!ipAddress || !WINPR_JSON_IsArray(ipAddress))
# 646| return TRUE;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:654:36: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:708:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:766:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:775:30: call_function: calling ‘arm_parse_ipv6’ from ‘arm_treat_azureInstanceNetworkMetadata’
# 652| continue;
# 653|
# 654|-> const char* addr = WINPR_JSON_GetStringValue(adressN);
# 655| if (utils_str_is_empty(addr))
# 656| continue;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:670:33: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:708:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:766:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:773:20: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:779:36: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:782:30: call_function: calling ‘arm_parse_ipv4’ from ‘arm_treat_azureInstanceNetworkMetadata’
# 668| WINPR_ASSERT(pAddressIdx);
# 669|
# 670|-> WINPR_JSON* ipAddress = WINPR_JSON_GetObjectItem(ipv4, "ipAddress");
# 671| if (!ipAddress || !WINPR_JSON_IsArray(ipAddress))
# 672| return TRUE;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:677:39: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:708:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:766:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:773:20: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:779:36: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:782:30: call_function: calling ‘arm_parse_ipv4’ from ‘arm_treat_azureInstanceNetworkMetadata’
# 675| for (size_t j = 0; j < naddresses; j++)
# 676| {
# 677|-> WINPR_JSON* adressN = WINPR_JSON_GetArrayItem(ipAddress, j);
# 678| if (!adressN)
# 679| continue;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:681:44: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:708:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:766:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:773:20: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:779:36: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:782:30: call_function: calling ‘arm_parse_ipv4’ from ‘arm_treat_azureInstanceNetworkMetadata’
# 679| continue;
# 680|
# 681|-> WINPR_JSON* publicIpNode = WINPR_JSON_GetObjectItem(adressN, "publicIpAddress");
# 682| if (publicIpNode && WINPR_JSON_IsString(publicIpNode))
# 683| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:682:37: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:708:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:766:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:773:20: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:779:36: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:782:30: call_function: calling ‘arm_parse_ipv4’ from ‘arm_treat_azureInstanceNetworkMetadata’
# 680|
# 681| WINPR_JSON* publicIpNode = WINPR_JSON_GetObjectItem(adressN, "publicIpAddress");
# 682|-> if (publicIpNode && WINPR_JSON_IsString(publicIpNode))
# 683| {
# 684| const char* publicIp = WINPR_JSON_GetStringValue(publicIpNode);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:684:48: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:708:13: enter_function: entry to ‘arm_treat_azureInstanceNetworkMetadata’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:766:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:773:20: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:779:36: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:782:30: call_function: calling ‘arm_parse_ipv4’ from ‘arm_treat_azureInstanceNetworkMetadata’
# 682| if (publicIpNode && WINPR_JSON_IsString(publicIpNode))
# 683| {
# 684|-> const char* publicIp = WINPR_JSON_GetStringValue(publicIpNode);
# 685| if (!utils_str_is_empty(publicIp))
# 686| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: throw: if ‘WINPR_JSON_GetObjectItem’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/2)
# 723| }
# 724|
# 725|-> WINPR_JSON* iface = WINPR_JSON_GetObjectItem(json, "interface");
# 726| if (!iface)
# 727| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: throw: if ‘WINPR_JSON_IsArray’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/2)
# 730| }
# 731|
# 732|-> if (!WINPR_JSON_IsArray(iface))
# 733| {
# 734| WLog_Print(log, WLOG_ERROR, "expecting interface to be an Array");
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:734:17: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:734:17: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:734:17: throw: if ‘WLog_IsLevelActive’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:734:17: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/2)
# 732| if (!WINPR_JSON_IsArray(iface))
# 733| {
# 734|-> WLog_Print(log, WLOG_ERROR, "expecting interface to be an Array");
# 735| goto out;
# 736| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: throw: if ‘WINPR_JSON_GetArraySize’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/2)
# 736| }
# 737|
# 738|-> size_t interfaceSz = WINPR_JSON_GetArraySize(iface);
# 739| if (interfaceSz == 0)
# 740| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:749:38: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:747:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:749:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:749:38: throw: if ‘WINPR_JSON_GetArrayItem’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:749:38: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/47/codeFlows/0/threadFlows/0/locations/2)
# 747| for (size_t i = 0; i < interfaceSz; i++)
# 748| {
# 749|-> WINPR_JSON* interN = WINPR_JSON_GetArrayItem(iface, i);
# 750| if (!interN)
# 751| continue;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:753:36: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:747:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:749:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:753:36: throw: if ‘WINPR_JSON_GetObjectItem’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:753:36: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/2)
# 751| continue;
# 752|
# 753|-> WINPR_JSON* ipv6 = WINPR_JSON_GetObjectItem(interN, "ipv6");
# 754| if (ipv6)
# 755| count += arm_parse_ipvx_count(ipv6);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:757:36: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:747:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:749:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:757:36: throw: if ‘WINPR_JSON_GetObjectItem’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:757:36: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/2)
# 755| count += arm_parse_ipvx_count(ipv6);
# 756|
# 757|-> WINPR_JSON* ipv4 = WINPR_JSON_GetObjectItem(interN, "ipv4");
# 758| if (ipv4)
# 759| count += arm_parse_ipvx_count(ipv4);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/50/codeFlows/0/threadFlows/0/locations/2)
# 760| }
# 761|
# 762|-> if (!freerdp_target_net_adresses_reset(settings, count))
# 763| return FALSE;
# 764|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:14: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:14: throw: if ‘freerdp_target_net_adresses_reset’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:14: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/2)
# 760| }
# 761|
# 762|-> if (!freerdp_target_net_adresses_reset(settings, count))
# 763| return FALSE;
# 764|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:766:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: throw: if ‘WINPR_JSON_GetArrayItem’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/52/codeFlows/0/threadFlows/0/locations/2)
# 766| for (size_t i = 0; i < interfaceSz; i++)
# 767| {
# 768|-> WINPR_JSON* interN = WINPR_JSON_GetArrayItem(iface, i);
# 769| if (!interN)
# 770| continue;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:772:36: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:766:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:772:36: throw: if ‘WINPR_JSON_GetObjectItem’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:772:36: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/2)
# 770| continue;
# 771|
# 772|-> WINPR_JSON* ipv6 = WINPR_JSON_GetObjectItem(interN, "ipv6");
# 773| if (ipv6)
# 774| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:779:36: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:766:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:768:38: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:773:20: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:779:36: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:779:36: throw: if ‘WINPR_JSON_GetObjectItem’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:779:36: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/2)
# 777| }
# 778|
# 779|-> WINPR_JSON* ipv4 = WINPR_JSON_GetObjectItem(interN, "ipv4");
# 780| if (ipv4)
# 781| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:786:13: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:726:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:732:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:738:30: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:739:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:762:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:765:16: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:786:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:789:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:789:14: throw: if ‘freerdp_settings_set_uint32’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:786:13: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/55/codeFlows/0/threadFlows/0/locations/2)
# 784| }
# 785| }
# 786|-> if (addressIdx > UINT32_MAX)
# 787| goto out;
# 788|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:795:9: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_Parse(metadata)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:715:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:718:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:719:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:725:29: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:795:9: danger: ‘WINPR_JSON_Parse(metadata)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/58/codeFlows/0/threadFlows/0/locations/2)
# 793|
# 794| out:
# 795|-> WINPR_JSON_Delete(json);
# 796| return ret;
# 797| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:886:33: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(message, len)’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:881:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:883:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:886:33: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:887:29: throw: if ‘WINPR_JSON_GetObjectItemCaseSensitive’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:886:33: danger: ‘WINPR_JSON_ParseWithLength(message, len)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/59/codeFlows/0/threadFlows/0/locations/0)
# 884| return FALSE;
# 885|
# 886|-> rdpSettings* settings = arm->context->settings;
# 887| WINPR_JSON* gwurl = WINPR_JSON_GetObjectItemCaseSensitive(json, "gatewayLocation");
# 888| const char* gwurlstr = WINPR_JSON_GetStringValue(gwurl);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:965:40: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:950:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:953:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:955:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:956:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:965:40: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:965:40: throw: if ‘WINPR_JSON_GetObjectItemCaseSensitive’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:965:40: danger: ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/88/codeFlows/0/threadFlows/0/locations/2)
# 963| }
# 964|
# 965|-> WINPR_JSON* gateway_code_obj = WINPR_JSON_GetObjectItemCaseSensitive(json, "Code");
# 966| const char* gw_code_str = WINPR_JSON_GetStringValue(gateway_code_obj);
# 967| if (gw_code_str == NULL)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:966:35: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:950:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:953:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:955:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:956:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:965:40: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:966:35: throw: if ‘WINPR_JSON_GetStringValue’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:966:35: danger: ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/89/codeFlows/0/threadFlows/0/locations/2)
# 964|
# 965| WINPR_JSON* gateway_code_obj = WINPR_JSON_GetObjectItemCaseSensitive(json, "Code");
# 966|-> const char* gw_code_str = WINPR_JSON_GetStringValue(gateway_code_obj);
# 967| if (gw_code_str == NULL)
# 968| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:969:17: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:950:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:953:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:955:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:956:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:965:40: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:967:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:969:17: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:969:17: throw: if ‘WLog_IsLevelActive’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:969:17: danger: ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/90/codeFlows/0/threadFlows/0/locations/2)
# 967| if (gw_code_str == NULL)
# 968| {
# 969|-> WLog_Print(arm->log, WLOG_ERROR, "Response has no \"Code\" property");
# 970| http_response_log_error_status(WLog_Get(TAG), WLOG_ERROR, response);
# 971| goto fail;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:977:39: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:950:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:953:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:955:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:956:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:965:40: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:967:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:974:13: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:974:12: branch_true: following ‘true’ branch (when the strings are equal)...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:976:17: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:977:39: throw: if ‘WINPR_JSON_GetObjectItemCaseSensitive’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:977:39: danger: ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/94/codeFlows/0/threadFlows/0/locations/2)
# 975| {
# 976| *retry = TRUE;
# 977|-> WINPR_JSON* message = WINPR_JSON_GetObjectItemCaseSensitive(json, "Message");
# 978| const char* msgstr = WINPR_JSON_GetStringValue(message);
# 979| if (!msgstr)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:978:38: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:950:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:953:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:955:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:956:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:965:40: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:967:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:974:13: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:974:12: branch_true: following ‘true’ branch (when the strings are equal)...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:976:17: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:978:38: throw: if ‘WINPR_JSON_GetStringValue’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:978:38: danger: ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/95/codeFlows/0/threadFlows/0/locations/2)
# 976| *retry = TRUE;
# 977| WINPR_JSON* message = WINPR_JSON_GetObjectItemCaseSensitive(json, "Message");
# 978|-> const char* msgstr = WINPR_JSON_GetStringValue(message);
# 979| if (!msgstr)
# 980| WLog_WARN(TAG, "Starting your VM. It may take up to 5 minutes");
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:986:17: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:950:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:953:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:955:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:956:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:965:40: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:967:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:974:13: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:974:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:986:17: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:986:17: throw: if ‘WLog_Get’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:986:17: danger: ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/96/codeFlows/0/threadFlows/0/locations/2)
# 984| else
# 985| {
# 986|-> http_response_log_error_status(WLog_Get(TAG), WLOG_ERROR, response);
# 987| goto fail;
# 988| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:992:9: warning[-Wanalyzer-malloc-leak]: leak of ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:950:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:953:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:955:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:956:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:965:40: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/arm.c:992:9: danger: ‘WINPR_JSON_ParseWithLength(http_response_get_body(response), http_response_get_body_length(response))’ leaks here; was allocated at [(3)](sarif:/runs/0/results/98/codeFlows/0/threadFlows/0/locations/2)
# 990| rc = TRUE;
# 991| fail:
# 992|-> WINPR_JSON_Delete(json);
# 993| return rc;
# 994| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1546:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1555:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1559:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1564:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: call_function: calling ‘set_compare’ from ‘http_response_new’
# 1544| {
# 1545| WINPR_ASSERT(dict);
# 1546|-> wObject* key = ListDictionary_KeyObject(dict);
# 1547| wObject* value = ListDictionary_KeyObject(dict);
# 1548| if (!key || !value)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1546:24: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1555:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1557:49: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1559:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1564:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: call_function: calling ‘set_compare’ from ‘http_response_new’
# 1544| {
# 1545| WINPR_ASSERT(dict);
# 1546|-> wObject* key = ListDictionary_KeyObject(dict);
# 1547| wObject* value = ListDictionary_KeyObject(dict);
# 1548| if (!key || !value)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1547:26: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1555:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1557:49: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1559:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1564:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: call_function: calling ‘set_compare’ from ‘http_response_new’
# 1545| WINPR_ASSERT(dict);
# 1546| wObject* key = ListDictionary_KeyObject(dict);
# 1547|-> wObject* value = ListDictionary_KeyObject(dict);
# 1548| if (!key || !value)
# 1549| return FALSE;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1557:49: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1559:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: throw: if ‘ListDictionary_New’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: danger: ‘response’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 1560| return NULL;
# 1561|
# 1562|-> response->Authenticates = ListDictionary_New(FALSE);
# 1563|
# 1564| if (!response->Authenticates)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1570:31: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1555:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1557:49: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1559:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1564:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: call_function: calling ‘set_compare’ from ‘http_response_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: return_function: returning to ‘http_response_new’ from ‘set_compare’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1570:31: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1570:31: throw: if ‘ListDictionary_New’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1570:31: danger: ‘response’ leaks here; was allocated at [(2)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/1)
# 1568| goto fail;
# 1569|
# 1570|-> response->SetCookie = ListDictionary_New(FALSE);
# 1571|
# 1572| if (!response->SetCookie)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1599:9: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1555:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1557:49: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1559:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1564:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: call_function: calling ‘set_compare’ from ‘http_response_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: return_function: returning to ‘http_response_new’ from ‘set_compare’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1568:17: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1588:9: call_function: calling ‘http_response_free’ from ‘http_response_new’
# 1597|
# 1598| free((void*)response->lines);
# 1599|-> ListDictionary_Free(response->Authenticates);
# 1600| ListDictionary_Free(response->SetCookie);
# 1601| Stream_Free(response->data, TRUE);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1600:9: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1555:15: enter_function: entry to ‘http_response_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1557:49: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1559:12: branch_false: following ‘false’ branch (when ‘response’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1562:35: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1564:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: call_function: calling ‘set_compare’ from ‘http_response_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:14: return_function: returning to ‘http_response_new’ from ‘set_compare’
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1567:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1568:17: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/http.c:1588:9: call_function: calling ‘http_response_free’ from ‘http_response_new’
# 1598| free((void*)response->lines);
# 1599| ListDictionary_Free(response->Authenticates);
# 1600|-> ListDictionary_Free(response->SetCookie);
# 1601| Stream_Free(response->data, TRUE);
# 1602| free(response);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:53:77: warning[-Wanalyzer-malloc-leak]: leak of ‘http_request_new()’
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:44:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:47:19: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:47:19: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:49:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:52:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:52:12: branch_true: following ‘true’ branch (when ‘authToken’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:53:77: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:53:35: throw: if ‘crypto_base64_encode’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:53:77: danger: ‘http_request_new()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 51|
# 52| if (authToken)
# 53|-> base64AuthToken = crypto_base64_encode(authToken->pvBuffer, authToken->cbBuffer);
# 54|
# 55| uri = http_context_get_uri(http);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:55:15: warning[-Wanalyzer-malloc-leak]: leak of ‘http_request_new()’
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:44:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:47:19: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:47:19: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:49:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:52:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:52:12: branch_false: following ‘false’ branch (when ‘authToken’ is NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:55:15: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:55:15: throw: if ‘http_context_get_uri’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:55:15: danger: ‘http_request_new()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 53| base64AuthToken = crypto_base64_encode(authToken->pvBuffer, authToken->cbBuffer);
# 54|
# 55|-> uri = http_context_get_uri(http);
# 56|
# 57| if (!http_request_set_method(request, method) ||
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:57:14: warning[-Wanalyzer-malloc-leak]: leak of ‘http_request_new()’
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:44:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:47:19: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:47:19: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:49:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:52:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:52:12: branch_false: following ‘false’ branch (when ‘authToken’ is NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:55:15: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:57:14: throw: if ‘http_request_set_method’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/ncacn_http.c:57:14: danger: ‘http_request_new()’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 55| uri = http_context_get_uri(http);
# 56|
# 57|-> if (!http_request_set_method(request, method) ||
# 58| !http_request_set_content_length(request, contentLength) ||
# 59| !http_request_set_uri(request, uri))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:809:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:777:9: enter_function: entry to ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:779:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:783:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:786:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:795:20: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:796:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:799:21: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:801:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:46: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:805:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:806:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:807:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:808:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:809:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:809:14: throw: if ‘http_context_set_user_agent’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:809:14: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/53/codeFlows/0/threadFlows/0/locations/9)
# 807| !http_context_set_pragma(wst->http, "no-cache") ||
# 808| !http_context_set_connection(wst->http, "Keep-Alive") ||
# 809|-> !http_context_set_user_agent(wst->http, FREERDP_USER_AGENT) ||
# 810| !http_context_set_x_ms_user_agent(wst->http, FREERDP_USER_AGENT) ||
# 811| !http_context_set_host(wst->http, wst->gwhostname) ||
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:809:14: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:777:9: enter_function: entry to ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:779:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:783:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:786:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:795:20: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:796:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:799:21: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:801:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:46: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:805:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:806:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:807:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:808:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:809:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:809:14: throw: if ‘http_context_set_user_agent’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:809:14: danger: ‘wst’ leaks here; was allocated at [(4)](sarif:/runs/0/results/54/codeFlows/0/threadFlows/0/locations/3)
# 807| !http_context_set_pragma(wst->http, "no-cache") ||
# 808| !http_context_set_connection(wst->http, "Keep-Alive") ||
# 809|-> !http_context_set_user_agent(wst->http, FREERDP_USER_AGENT) ||
# 810| !http_context_set_x_ms_user_agent(wst->http, FREERDP_USER_AGENT) ||
# 811| !http_context_set_host(wst->http, wst->gwhostname) ||
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:810:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:777:9: enter_function: entry to ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:779:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:783:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:786:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:795:20: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:796:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:799:21: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:801:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:46: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:805:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:806:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:807:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:808:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:809:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:810:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:810:14: throw: if ‘http_context_set_x_ms_user_agent’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:810:14: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/56/codeFlows/0/threadFlows/0/locations/9)
# 808| !http_context_set_connection(wst->http, "Keep-Alive") ||
# 809| !http_context_set_user_agent(wst->http, FREERDP_USER_AGENT) ||
# 810|-> !http_context_set_x_ms_user_agent(wst->http, FREERDP_USER_AGENT) ||
# 811| !http_context_set_host(wst->http, wst->gwhostname) ||
# 812| !http_context_enable_websocket_upgrade(wst->http, TRUE))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:810:14: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:777:9: enter_function: entry to ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:779:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:783:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:786:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: return_function: returning to ‘wst_new’ from ‘wst_parse_url’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:795:20: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:796:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:799:21: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:801:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:46: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:805:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:806:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:807:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:808:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:809:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:804:13: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:810:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:810:14: throw: if ‘http_context_set_x_ms_user_agent’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:810:14: danger: ‘wst’ leaks here; was allocated at [(4)](sarif:/runs/0/results/57/codeFlows/0/threadFlows/0/locations/3)
# 808| !http_context_set_connection(wst->http, "Keep-Alive") ||
# 809| !http_context_set_user_agent(wst->http, FREERDP_USER_AGENT) ||
# 810|-> !http_context_set_x_ms_user_agent(wst->http, FREERDP_USER_AGENT) ||
# 811| !http_context_set_host(wst->http, wst->gwhostname) ||
# 812| !http_context_enable_websocket_upgrade(wst->http, TRUE))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:818:18: warning[-Wanalyzer-malloc-leak]: leak of ‘Stream_New(0, 512)’
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:906:12: enter_function: entry to ‘rdstls_client_authenticate’
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:908:14: call_function: calling ‘rdstls_set_state’ from ‘rdstls_client_authenticate’
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:908:14: return_function: returning to ‘rdstls_client_authenticate’ from ‘rdstls_set_state’
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:908:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:911:14: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:911:14: call_function: calling ‘rdstls_recv_capabilities’ from ‘rdstls_client_authenticate’
# 816| goto fail;
# 817|
# 818|-> status = transport_read_pdu(rdstls->transport, s);
# 819|
# 820| if (status < 0)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:870:18: warning[-Wanalyzer-malloc-leak]: leak of ‘Stream_New(0, 512)’
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:863:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:866:13: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:866:13: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:867:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:870:18: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:870:18: throw: if ‘transport_read_pdu’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/rdstls.c:870:18: danger: ‘Stream_New(0, 512)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 868| goto fail;
# 869|
# 870|-> status = transport_read_pdu(rdstls->transport, s);
# 871|
# 872| if (status < 0)
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/settings.c:780:24: warning[-Wanalyzer-malloc-leak]: leak of ‘GetKnownSubPath(4, "FreeRDP")’
FreeRDP-3.16.0/libfreerdp/core/settings.c:778:22: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/settings.c:779:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/settings.c:780:24: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/settings.c:780:24: throw: if ‘GetCombinedPath’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/settings.c:780:24: danger: ‘GetKnownSubPath(4, "FreeRDP")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
# 778| char* base = GetKnownSubPath(KNOWN_PATH_XDG_CONFIG_HOME, FREERDP_VENDOR_STRING);
# 779| if (base)
# 780|-> path = GetCombinedPath(base, FREERDP_PRODUCT_STRING);
# 781| free(base);
# 782|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/core/settings.c:798:22: warning[-Wanalyzer-malloc-leak]: leak of ‘settings’
FreeRDP-3.16.0/libfreerdp/core/settings.c:791:47: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/settings.c:793:12: branch_false: following ‘false’ branch (when ‘settings’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/settings.c:793:12: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/settings.c:796:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/settings.c:798:22: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/settings.c:798:22: throw: if ‘freerdp_settings_set_string’ throws an exception...
FreeRDP-3.16.0/libfreerdp/core/settings.c:798:22: danger: ‘settings’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
# 796| if (!server && !remote)
# 797| {
# 798|-> if (!freerdp_settings_set_string(settings, FreeRDP_GatewayAvdScope,
# 799| "https%%3A%%2F%%2F%s%%2F%s%%2Foauth2%%2Fnativeclient"))
# 800| goto out_fail;
Error: COMPILER_WARNING (CWE-704):
FreeRDP-3.16.0/libfreerdp/core/test/TestSettings.c:1930:48: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘freerdp_settings_set_bool’ discards ‘const’ qualifier from pointer target type
# 1928| goto fail;
# 1929| }
# 1930|-> if (!freerdp_settings_set_bool(settings, key, val))
# 1931| goto fail;
# 1932| if (!check_key_helpers(key, "bool"))
Error: COMPILER_WARNING (CWE-704):
FreeRDP-3.16.0/libfreerdp/core/test/TestSettings.c:1997:50: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘freerdp_settings_set_uint16’ discards ‘const’ qualifier from pointer target type
# 1995| goto fail;
# 1996| }
# 1997|-> if (!freerdp_settings_set_uint16(settings, key, val))
# 1998| goto fail;
# 1999| if (!check_key_helpers(key, "uint16"))
Error: COMPILER_WARNING (CWE-704):
FreeRDP-3.16.0/libfreerdp/core/test/TestSettings.c:2031:49: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘freerdp_settings_set_int32’ discards ‘const’ qualifier from pointer target type
# 2029| goto fail;
# 2030| }
# 2031|-> if (!freerdp_settings_set_int32(settings, key, val))
# 2032| goto fail;
# 2033| if (!check_key_helpers(key, "int32"))
Error: COMPILER_WARNING (CWE-704):
FreeRDP-3.16.0/libfreerdp/core/test/TestSettings.c:2066:50: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘freerdp_settings_set_uint32’ discards ‘const’ qualifier from pointer target type
# 2064| goto fail;
# 2065| }
# 2066|-> if (!freerdp_settings_set_uint32(settings, key, val))
# 2067| goto fail;
# 2068| if (!check_key_helpers(key, "uint32"))
Error: COMPILER_WARNING (CWE-704):
FreeRDP-3.16.0/libfreerdp/core/test/TestSettings.c:2135:50: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘freerdp_settings_set_uint64’ discards ‘const’ qualifier from pointer target type
# 2133| goto fail;
# 2134| }
# 2135|-> if (!freerdp_settings_set_uint64(settings, key, val))
# 2136| goto fail;
# 2137| if (!check_key_helpers(key, "uint64"))
Error: COMPILER_WARNING (CWE-704):
FreeRDP-3.16.0/libfreerdp/core/test/TestSettings.c:2172:50: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘freerdp_settings_set_string’ discards ‘const’ qualifier from pointer target type
# 2170| goto fail;
# 2171| }
# 2172|-> if (!freerdp_settings_set_string(settings, key, val))
# 2173| goto fail;
# 2174|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1495:27: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_GetJSONConfigFile(1, &configfile)’
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1568:12: enter_function: entry to ‘tls_config_check_certificate’
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1575:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1577:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1583:13: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1583:13: call_function: calling ‘tls_config_parse_bool’ from ‘tls_config_check_certificate’
# 1493| static int tls_config_parse_bool(WINPR_JSON* json, const char* opt)
# 1494| {
# 1495|-> WINPR_JSON* val = WINPR_JSON_GetObjectItem(json, opt);
# 1496| if (!val || !WINPR_JSON_IsBool(val))
# 1497| return -1;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1511:26: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_GetJSONConfigFile(1, &configfile)’
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1568:12: enter_function: entry to ‘tls_config_check_certificate’
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1575:28: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1577:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1583:13: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1583:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1590:13: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1590:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1597:13: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1597:13: call_function: calling ‘tls_config_check_allowed_hashed’ from ‘tls_config_check_certificate’
# 1509| WINPR_ASSERT(json);
# 1510|
# 1511|-> WINPR_JSON* db = WINPR_JSON_GetObjectItem(json, "certificate-db");
# 1512| if (!db || !WINPR_JSON_IsArray(db))
# 1513| return 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1558:33: warning[-Wanalyzer-malloc-leak]: leak of ‘freerdp_certificate_get_fingerprint_by_hash_ex(cert, WINPR_JSON_GetStringValue(WINPR_JSON_GetObjectItem(WINPR_JSON_GetArrayItem(WINPR_JSON_GetObjectItem(json, "certificate-db"), x), "type")), 0)’
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1512:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1515:28: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1517:35: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1518:21: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1526:35: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1548:30: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1558:33: throw: if ‘_stricmp’ throws an exception...
FreeRDP-3.16.0/libfreerdp/crypto/tls.c:1558:33: danger: ‘freerdp_certificate_get_fingerprint_by_hash_ex(cert, WINPR_JSON_GetStringValue(WINPR_JSON_GetObjectItem(WINPR_JSON_GetArrayItem(WINPR_JSON_GetObjectItem(json, "certificate-db"), x), "type")), 0)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/6)
# 1556| }
# 1557|
# 1558|-> const int cmp = _stricmp(hash, sval);
# 1559| free(hash);
# 1560|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:98:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:133:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:141:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:147:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:186:20: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:187:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:190:15: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:196:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
# 96| do
# 97| {
# 98|-> status = poll(&pollset, 1, timeout);
# 99| } while ((status < 0) && (errno == EINTR));
# 100|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:98:26: warning[-Wanalyzer-malloc-leak]: leak of ‘n’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:306:9: enter_function: entry to ‘freerdp_interruptible_get_line’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:324:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:326:25: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:329:28: branch_false: following ‘false’ branch (when ‘n’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:337:21: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:337:21: call_function: calling ‘freerdp_interruptible_getc’ from ‘freerdp_interruptible_get_line’
# 96| do
# 97| {
# 98|-> status = poll(&pollset, 1, timeout);
# 99| } while ((status < 0) && (errno == EINTR));
# 100|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:198:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:133:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:141:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:147:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:186:20: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:187:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:190:15: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:196:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:196:29: return_function: returning to ‘freerdp_passphrase_read_tty’ from ‘freerdp_interruptible_get_line’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:197:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:198:17: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:221:12: branch_false: following ‘false’ branch (when ‘terminal_fildes == 0’)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:227:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:198:17: danger: ‘fp’ leaks here; was allocated at [(4)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/3)
# 196| const SSIZE_T res = freerdp_interruptible_get_line(context, &ptr, &ptr_len, fp);
# 197| if (res < 0)
# 198|-> goto error;
# 199| replace_char(ptr, ptr_len, "\r\n");
# 200|
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:273:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:133:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:141:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:147:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:186:20: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:187:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:190:15: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:196:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
# 271| const int fd = fileno(f);
# 272|
# 273|-> const int orig = fcntl(fd, F_GETFL);
# 274| (void)fcntl(fd, F_SETFL, orig | O_NONBLOCK);
# 275| do
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:273:26: warning[-Wanalyzer-malloc-leak]: leak of ‘n’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:306:9: enter_function: entry to ‘freerdp_interruptible_get_line’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:324:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:326:25: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:329:28: branch_false: following ‘false’ branch (when ‘n’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:337:21: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:337:21: call_function: calling ‘freerdp_interruptible_getc’ from ‘freerdp_interruptible_get_line’
# 271| const int fd = fileno(f);
# 272|
# 273|-> const int orig = fcntl(fd, F_GETFL);
# 274| (void)fcntl(fd, F_SETFL, orig | O_NONBLOCK);
# 275| do
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:274:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:133:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:141:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:147:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:186:20: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:187:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:190:15: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:196:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
# 272|
# 273| const int orig = fcntl(fd, F_GETFL);
# 274|-> (void)fcntl(fd, F_SETFL, orig | O_NONBLOCK);
# 275| do
# 276| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:274:15: warning[-Wanalyzer-malloc-leak]: leak of ‘n’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:306:9: enter_function: entry to ‘freerdp_interruptible_get_line’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:324:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:326:25: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:329:28: branch_false: following ‘false’ branch (when ‘n’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:337:21: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:337:21: call_function: calling ‘freerdp_interruptible_getc’ from ‘freerdp_interruptible_get_line’
# 272|
# 273| const int orig = fcntl(fd, F_GETFL);
# 274|-> (void)fcntl(fd, F_SETFL, orig | O_NONBLOCK);
# 275| do
# 276| {
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:286:19: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:133:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:141:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:147:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:186:20: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:187:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:190:15: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:196:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
# 284| break;
# 285| }
# 286|-> } while (!freerdp_shall_disconnect_context(context));
# 287|
# 288| (void)fcntl(fd, F_SETFL, orig);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:286:19: warning[-Wanalyzer-malloc-leak]: leak of ‘n’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:306:9: enter_function: entry to ‘freerdp_interruptible_get_line’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:324:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:326:25: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:329:28: branch_false: following ‘false’ branch (when ‘n’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:337:21: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:337:21: call_function: calling ‘freerdp_interruptible_getc’ from ‘freerdp_interruptible_get_line’
# 284| break;
# 285| }
# 286|-> } while (!freerdp_shall_disconnect_context(context));
# 287|
# 288| (void)fcntl(fd, F_SETFL, orig);
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:288:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:133:20: enter_function: entry to ‘freerdp_passphrase_read_tty’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:141:12: branch_false: following ‘false’ branch (when ‘bufsiz != 0’)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:147:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:186:20: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:187:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:190:15: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:196:29: call_function: calling ‘freerdp_interruptible_get_line’ from ‘freerdp_passphrase_read_tty’
# 286| } while (!freerdp_shall_disconnect_context(context));
# 287|
# 288|-> (void)fcntl(fd, F_SETFL, orig);
# 289| return rc;
# 290| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:288:15: warning[-Wanalyzer-malloc-leak]: leak of ‘n’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:306:9: enter_function: entry to ‘freerdp_interruptible_get_line’
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:324:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:326:25: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:329:28: branch_false: following ‘false’ branch (when ‘n’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:337:21: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/utils/passphrase.c:337:21: call_function: calling ‘freerdp_interruptible_getc’ from ‘freerdp_interruptible_get_line’
# 286| } while (!freerdp_shall_disconnect_context(context));
# 287|
# 288|-> (void)fcntl(fd, F_SETFL, orig);
# 289| return rc;
# 290| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:207:42: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
FreeRDP-3.16.0/libfreerdp/core/peer.c:1444:15: enter_function: entry to ‘freerdp_peer_new’
FreeRDP-3.16.0/libfreerdp/core/peer.c:1448:47: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1450:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/peer.c:1453:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1456:12: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
FreeRDP-3.16.0/libfreerdp/core/peer.c:1458:21: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1458:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/peer.c:1462:25: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1462:25: call_function: calling ‘WLog_Print_dbg_tag’ from ‘freerdp_peer_new’
# 205| static wLog* log_cached_ptr = NULL;
# 206| if (!log_cached_ptr)
# 207|-> log_cached_ptr = WLog_Get(tag);
# 208|
# 209| if (WLog_IsLevelActive(log_cached_ptr, log_level))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:207:42: warning[-Wanalyzer-malloc-leak]: leak of ‘pContext’
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:179:14: enter_function: entry to ‘smartcard_context_new’
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:182:40: acquire_memory: allocated here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:184:12: branch_false: following ‘false’ branch (when ‘pContext’ is non-NULL)...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:190:9: branch_false: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:194:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:196:17: branch_true: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:196:17: call_function: calling ‘WLog_Print_dbg_tag’ from ‘smartcard_context_new’
# 205| static wLog* log_cached_ptr = NULL;
# 206| if (!log_cached_ptr)
# 207|-> log_cached_ptr = WLog_Get(tag);
# 208|
# 209| if (WLog_IsLevelActive(log_cached_ptr, log_level))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:207:42: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:630:1: enter_function: entry to ‘smartcard_DeviceServiceEntry’
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:636:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:638:48: branch_true: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:638:48: acquire_memory: allocated here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:640:20: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:646:17: branch_false: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:655:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:657:25: branch_true: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:657:25: call_function: calling ‘WLog_Print_dbg_tag’ from ‘smartcard_DeviceServiceEntry’
# 205| static wLog* log_cached_ptr = NULL;
# 206| if (!log_cached_ptr)
# 207|-> log_cached_ptr = WLog_Get(tag);
# 208|
# 209| if (WLog_IsLevelActive(log_cached_ptr, log_level))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:207:42: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:777:9: enter_function: entry to ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:779:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:783:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:786:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
# 205| static wLog* log_cached_ptr = NULL;
# 206| if (!log_cached_ptr)
# 207|-> log_cached_ptr = WLog_Get(tag);
# 208|
# 209| if (WLog_IsLevelActive(log_cached_ptr, log_level))
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:209:21: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
FreeRDP-3.16.0/libfreerdp/core/peer.c:1444:15: enter_function: entry to ‘freerdp_peer_new’
FreeRDP-3.16.0/libfreerdp/core/peer.c:1448:47: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1450:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/peer.c:1453:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1456:12: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
FreeRDP-3.16.0/libfreerdp/core/peer.c:1458:21: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1458:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/peer.c:1462:25: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1462:25: call_function: calling ‘WLog_Print_dbg_tag’ from ‘freerdp_peer_new’
# 207| log_cached_ptr = WLog_Get(tag);
# 208|
# 209|-> if (WLog_IsLevelActive(log_cached_ptr, log_level))
# 210| {
# 211| va_list ap;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:209:21: warning[-Wanalyzer-malloc-leak]: leak of ‘pContext’
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:179:14: enter_function: entry to ‘smartcard_context_new’
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:182:40: acquire_memory: allocated here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:184:12: branch_false: following ‘false’ branch (when ‘pContext’ is non-NULL)...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:190:9: branch_false: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:194:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:196:17: branch_true: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:196:17: call_function: calling ‘WLog_Print_dbg_tag’ from ‘smartcard_context_new’
# 207| log_cached_ptr = WLog_Get(tag);
# 208|
# 209|-> if (WLog_IsLevelActive(log_cached_ptr, log_level))
# 210| {
# 211| va_list ap;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:209:21: warning[-Wanalyzer-malloc-leak]: leak of ‘smartcard’
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:630:1: enter_function: entry to ‘smartcard_DeviceServiceEntry’
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:636:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:638:48: branch_true: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:638:48: acquire_memory: allocated here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:640:20: branch_false: following ‘false’ branch (when ‘smartcard’ is non-NULL)...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:646:17: branch_false: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:655:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:657:25: branch_true: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:657:25: call_function: calling ‘WLog_Print_dbg_tag’ from ‘smartcard_DeviceServiceEntry’
# 207| log_cached_ptr = WLog_Get(tag);
# 208|
# 209|-> if (WLog_IsLevelActive(log_cached_ptr, log_level))
# 210| {
# 211| va_list ap;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:209:21: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:777:9: enter_function: entry to ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:779:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:783:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:786:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
# 207| log_cached_ptr = WLog_Get(tag);
# 208|
# 209|-> if (WLog_IsLevelActive(log_cached_ptr, log_level))
# 210| {
# 211| va_list ap;
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:213:25: warning[-Wanalyzer-malloc-leak]: leak of ‘client’
FreeRDP-3.16.0/libfreerdp/core/peer.c:1444:15: enter_function: entry to ‘freerdp_peer_new’
FreeRDP-3.16.0/libfreerdp/core/peer.c:1448:47: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1450:12: branch_false: following ‘false’ branch (when ‘client’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/peer.c:1453:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1456:12: branch_true: following ‘true’ branch (when ‘sockfd >= 0’)...
FreeRDP-3.16.0/libfreerdp/core/peer.c:1458:21: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1458:20: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/libfreerdp/core/peer.c:1462:25: branch_true: ...to here
FreeRDP-3.16.0/libfreerdp/core/peer.c:1462:25: call_function: calling ‘WLog_Print_dbg_tag’ from ‘freerdp_peer_new’
# 211| va_list ap;
# 212| va_start(ap, fkt);
# 213|-> WLog_PrintMessageVA(log_cached_ptr, WLOG_MESSAGE_TEXT, log_level, line, file, fkt, ap);
# 214| va_end(ap);
# 215| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:213:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pContext’
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:179:14: enter_function: entry to ‘smartcard_context_new’
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:182:40: acquire_memory: allocated here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:184:12: branch_false: following ‘false’ branch (when ‘pContext’ is non-NULL)...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:190:9: branch_false: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:194:12: branch_true: following ‘true’ branch...
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:196:17: branch_true: ...to here
FreeRDP-3.16.0/channels/smartcard/client/smartcard_main.c:196:17: call_function: calling ‘WLog_Print_dbg_tag’ from ‘smartcard_context_new’
# 211| va_list ap;
# 212| va_start(ap, fkt);
# 213|-> WLog_PrintMessageVA(log_cached_ptr, WLOG_MESSAGE_TEXT, log_level, line, file, fkt, ap);
# 214| va_end(ap);
# 215| }
Error: GCC_ANALYZER_WARNING (CWE-401):
FreeRDP-3.16.0/winpr/include/winpr/wlog.h:213:25: warning[-Wanalyzer-malloc-leak]: leak of ‘wst’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:777:9: enter_function: entry to ‘wst_new’
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:779:12: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:782:32: acquire_memory: allocated here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:783:12: branch_false: following ‘false’ branch (when ‘wst’ is non-NULL)...
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:786:9: branch_false: ...to here
FreeRDP-3.16.0/libfreerdp/core/gateway/wst.c:792:14: call_function: calling ‘wst_parse_url’ from ‘wst_new’
# 211| va_list ap;
# 212| va_start(ap, fkt);
# 213|-> WLog_PrintMessageVA(log_cached_ptr, WLOG_MESSAGE_TEXT, log_level, line, file, fkt, ap);
# 214| va_end(ap);
# 215| }
Error: GCC_ANALYZER_WARNING (CWE-404):
FreeRDP-3.16.0/winpr/libwinpr/comm/comm.c:208:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
FreeRDP-3.16.0/winpr/libwinpr/comm/comm.c:201:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/winpr/libwinpr/comm/comm.c:204:14: branch_false: ...to here
FreeRDP-3.16.0/winpr/libwinpr/comm/comm.c:204:12: branch_false: following ‘false’ branch...
FreeRDP-3.16.0/winpr/libwinpr/comm/comm.c:206:17: branch_false: ...to here
FreeRDP-3.16.0/winpr/libwinpr/comm/comm.c:207:9: acquire_resource: ‘va_start’ called here
FreeRDP-3.16.0/winpr/libwinpr/comm/comm.c:208:9: throw: if ‘WLog_PrintMessageVA’ throws an exception...
FreeRDP-3.16.0/winpr/libwinpr/comm/comm.c:208:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 206| va_list ap = { 0 };
# 207| va_start(ap, fkt);
# 208|-> WLog_PrintMessageVA(sLog, WLOG_MESSAGE_TEXT, level, line, file, fkt, ap);
# 209| va_end(ap);
# 210| }
Error: COMPILER_WARNING (CWE-477):
FreeRDP-3.16.0/winpr/libwinpr/file/test/TestFileFindFirstFile.c:228:13: warning[-Wdeprecated-declarations]: ‘CreateFileA’ is deprecated: since 3.16.0, Use winpr_CreateFile
# 226|
# 227| HANDLE hdl =
# 228|-> CreateFileA(FilePath, GENERIC_ALL, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
# 229| if (hdl == INVALID_HANDLE_VALUE)
# 230| goto fail;
Error: CPPCHECK_WARNING (CWE-562):
FreeRDP-3.16.0/winpr/libwinpr/utils/wlog/CallbackAppender.c:52: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 50| return FALSE;
# 51|
# 52|-> message->PrefixString = prefix;
# 53| WLog_Layout_GetMessagePrefix(log, appender->Layout, message);
# 54|
Error: CPPCHECK_WARNING (CWE-562):
FreeRDP-3.16.0/winpr/libwinpr/utils/wlog/CallbackAppender.c:72: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 70| return FALSE;
# 71|
# 72|-> message->PrefixString = prefix;
# 73| WLog_Layout_GetMessagePrefix(log, appender->Layout, message);
# 74|
Error: CPPCHECK_WARNING (CWE-562):
FreeRDP-3.16.0/winpr/libwinpr/utils/wlog/CallbackAppender.c:91: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 89| return FALSE;
# 90|
# 91|-> message->PrefixString = prefix;
# 92| WLog_Layout_GetMessagePrefix(log, appender->Layout, message);
# 93|
Error: CPPCHECK_WARNING (CWE-562):
FreeRDP-3.16.0/winpr/libwinpr/utils/wlog/CallbackAppender.c:110: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 108| return FALSE;
# 109|
# 110|-> message->PrefixString = prefix;
# 111| WLog_Layout_GetMessagePrefix(log, appender->Layout, message);
# 112|
Error: CPPCHECK_WARNING (CWE-562):
FreeRDP-3.16.0/winpr/libwinpr/utils/wlog/ConsoleAppender.c:64: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 62| consoleAppender = (wLogConsoleAppender*)appender;
# 63|
# 64|-> message->PrefixString = prefix;
# 65| WLog_Layout_GetMessagePrefix(log, appender->Layout, message);
# 66|
Error: CPPCHECK_WARNING (CWE-562):
FreeRDP-3.16.0/winpr/libwinpr/utils/wlog/FileAppender.c:144: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 142| return FALSE;
# 143|
# 144|-> message->PrefixString = prefix;
# 145| WLog_Layout_GetMessagePrefix(log, appender->Layout, message);
# 146| (void)fprintf(fp, "%s%s\n", message->PrefixString, message->TextString);
Error: CPPCHECK_WARNING (CWE-562):
FreeRDP-3.16.0/winpr/libwinpr/utils/wlog/UdpAppender.c:99: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 97|
# 98| udpAppender = (wLogUdpAppender*)appender;
# 99|-> message->PrefixString = prefix;
# 100| WLog_Layout_GetMessagePrefix(log, appender->Layout, message);
# 101| (void)_sendto(udpAppender->sock, message->PrefixString,