Task #71361 - added.err
back to task #71361download
Error: GCC_ANALYZER_WARNING (CWE-401):
conmon-2.1.13/src/healthcheck.c: scope_hint: In function ‘healthcheck_execute_command’
conmon-2.1.13/src/healthcheck.c:338:24: warning[-Wanalyzer-malloc-leak]: leak of ‘runtime_argv’
# 336| {
# 337| if (config == NULL || config->test == NULL || container_id == NULL || runtime_path == NULL || exit_code == NULL) {
# 338|-> return false;
# 339| }
# 340|
Error: GCC_ANALYZER_WARNING (CWE-401):
conmon-2.1.13/src/healthcheck.c: scope_hint: In function ‘healthcheck_parse_oci_annotations’
conmon-2.1.13/src/healthcheck.c:647:28: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(json_object_get_string(json_object_array_get_idx(test_array, (long unsigned int)i)))’
# 645|
# 646| config->test[i - 1] = strdup(json_object_get_string(arg));
# 647|-> if (config->test[i - 1] == NULL) {
# 648| nwarn("Failed to duplicate healthcheck command argument");
# 649| for (int j = 0; j < i - 1; j++) {
Error: GCC_ANALYZER_WARNING (CWE-401):
conmon-2.1.13/src/healthcheck.c:701:33: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(json_object_get_string(json_object_array_get_idx(test_array, 1)))’
# 699| config->test[2] = strdup(json_object_get_string(cmd_value));
# 700|
# 701|-> if (config->test[0] == NULL || config->test[1] == NULL || config->test[2] == NULL) {
# 702| nwarn("Failed to duplicate healthcheck test command strings");
# 703| for (int i = 0; i < 3; i++) {