Task #118743 - fixed.err
back to task #118743download
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:457:1: enter_function: entry to 'image_spec_schema_content_descriptor_parse_data'
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:464:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:467:5: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:472:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:478:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:478:11: call_function: calling 'make_image_spec_schema_content_descriptor' from 'image_spec_schema_content_descriptor_parse_data'
# 19| if (tree == NULL)
# 20| return NULL;
# 21|-> ret = calloc (1, sizeof (*ret));
# 22| if (ret == NULL)
# 23| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:457:1: enter_function: entry to 'image_spec_schema_content_descriptor_parse_data'
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:464:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:467:5: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:472:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:478:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:478:11: call_function: calling 'make_image_spec_schema_content_descriptor' from 'image_spec_schema_content_descriptor_parse_data'
# 19| if (tree == NULL)
# 20| return NULL;
# 21|-> ret = calloc (1, sizeof (*ret));
# 22| if (ret == NULL)
# 23| return NULL;
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/image_spec_schema_defs.c:89: error[memleak]: Memory leak: ret
# 87| ret->values = calloc (len + 1, sizeof (*ret->values));
# 88| if (ret->values == NULL)
# 89|-> return NULL;
# 90| for (i = 0; i < len; i++)
# 91| {
Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.27/libocispec/src/ocispec/image_spec_schema_defs.c:178:14: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'calloc(*src.len + 1, 8)'
crun-1.27/libocispec/src/ocispec/image_spec_schema_defs.c:170:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_defs.c:172:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_defs.c:172:8: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_defs.c:175:31: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_defs.c:175:23: acquire_memory: this call could return NULL
crun-1.27/libocispec/src/ocispec/image_spec_schema_defs.c:176:21: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_defs.c:178:98: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_defs.c:178:14: danger: 'calloc(*src.len + 1, 8) + i * 8' could be NULL: unchecked value from [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 176| for (i = 0; i < src->len; i++)
# 177| {
# 178|-> ret->values[i] = clone_image_spec_schema_defs_map_string_object_element (src->values[i]);
# 179| if (ret->values[i] == NULL)
# 180| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:200:1: enter_function: entry to 'image_spec_schema_image_layout_schema_parse_data'
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:207:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:210:5: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:215:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:221:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:221:11: call_function: calling 'make_image_spec_schema_image_layout_schema' from 'image_spec_schema_image_layout_schema_parse_data'
# 19| if (tree == NULL)
# 20| return NULL;
# 21|-> ret = calloc (1, sizeof (*ret));
# 22| if (ret == NULL)
# 23| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:200:1: enter_function: entry to 'image_spec_schema_image_layout_schema_parse_data'
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:207:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:210:5: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:215:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:221:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:221:11: call_function: calling 'make_image_spec_schema_image_layout_schema' from 'image_spec_schema_image_layout_schema_parse_data'
# 19| if (tree == NULL)
# 20| return NULL;
# 21|-> ret = calloc (1, sizeof (*ret));
# 22| if (ret == NULL)
# 23| return NULL;
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:713: error[memleak]: Memory leak: ret
# 711| if (ret->keys == NULL)
# 712| {
# 713|-> return NULL;
# 714| }
# 715| ret->values = calloc (len + 1, sizeof (bool));
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:718: error[memleak]: Memory leak: ret
# 716| if (ret->values == NULL)
# 717| {
# 718|-> return NULL;
# 719| }
# 720| for (i = 0; i < len; i++)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:888: error[memleak]: Memory leak: ret
# 886| if (ret->keys == NULL)
# 887| {
# 888|-> return NULL;
# 889| }
# 890|
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:894: error[memleak]: Memory leak: ret
# 892| if (ret->values == NULL)
# 893| {
# 894|-> return NULL;
# 895| }
# 896|
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:1050: error[memleak]: Memory leak: ret
# 1048| {
# 1049| *(err) = strdup ("error allocating memory");
# 1050|-> return NULL;
# 1051| }
# 1052| ret->values = calloc (len + 1, sizeof (int));
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:1056: error[memleak]: Memory leak: ret
# 1054| {
# 1055| *(err) = strdup ("error allocating memory");
# 1056|-> return NULL;
# 1057| }
# 1058| for (i = 0; i < len; i++)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:1345: error[memleak]: Memory leak: ret
# 1343| if (ret->keys == NULL)
# 1344| {
# 1345|-> return NULL;
# 1346| }
# 1347|
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:1351: error[memleak]: Memory leak: ret
# 1349| if (ret->values == NULL)
# 1350| {
# 1351|-> return NULL;
# 1352| }
# 1353| for (i = 0; i < len; i++)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:1521: error[memleak]: Memory leak: ret
# 1519| {
# 1520| *(err) = strdup ("error allocating memory");
# 1521|-> return NULL;
# 1522| }
# 1523|
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:1528: error[memleak]: Memory leak: ret
# 1526| {
# 1527| *(err) = strdup ("error allocating memory");
# 1528|-> return NULL;
# 1529| }
# 1530| for (i = 0; i < len; i++)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:1585: error[memleak]: Memory leak: ret
# 1583| ret->keys = calloc (src->len + 1, sizeof (char *));
# 1584| if (ret->keys == NULL)
# 1585|-> return NULL;
# 1586|
# 1587| ret->values = calloc (src->len + 1, sizeof (char *));
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/json_common.c:1589: error[memleak]: Memory leak: ret
# 1587| ret->values = calloc (src->len + 1, sizeof (char *));
# 1588| if (ret->values == NULL)
# 1589|-> return NULL;
# 1590|
# 1591| for (i = 0; i < src->len; i++)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3670: error[memleak]: Memory leak: ret
# 3668| ret->monotonic = make_runtime_spec_schema_defs_linux_time_offsets (get_val (tree, "monotonic", yajl_t_object), ctx, err);
# 3669| if (ret->monotonic == NULL && *err != 0)
# 3670|-> return NULL;
# 3671| if (tree->type == yajl_t_object)
# 3672| {
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3682: error[memleak]: Memory leak: ret
# 3680| resi = calloc (1, sizeof(*tree));
# 3681| if (resi == NULL)
# 3682|-> return NULL;
# 3683|
# 3684| resi->type = yajl_t_object;
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3689: error[memleak]: Memory leak: ret
# 3687| {
# 3688| yajl_tree_free (resi);
# 3689|-> return NULL;
# 3690| }
# 3691| resi->u.object.values = calloc (cnt, sizeof (yajl_val));
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3695: error[memleak]: Memory leak: ret
# 3693| {
# 3694| yajl_tree_free (resi);
# 3695|-> return NULL;
# 3696| }
# 3697| }
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3795: error[memleak]: Memory leak: ret
# 3793| ret->boottime = clone_runtime_spec_schema_defs_linux_time_offsets (src->boottime);
# 3794| if (ret->boottime == NULL)
# 3795|-> return NULL;
# 3796| }
# 3797| if (src->monotonic)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3801: error[memleak]: Memory leak: ret
# 3799| ret->monotonic = clone_runtime_spec_schema_defs_linux_time_offsets (src->monotonic);
# 3800| if (ret->monotonic == NULL)
# 3801|-> return NULL;
# 3802| }
# 3803| return move_ptr (ret);
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:4527: error[memleak]: Memory leak: ret
# 4525| ret->devices = calloc (src->devices_len + 1, sizeof (*ret->devices));
# 4526| if (ret->devices == NULL)
# 4527|-> return NULL;
# 4528| for (size_t i = 0; i < src->devices_len; i++)
# 4529| {
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1153: error[memleak]: Memory leak: ret
# 1151| if (asprintf (err, "Required field '%s' not present", "kernel") < 0)
# 1152| *err = strdup ("error allocating memory");
# 1153|-> return NULL;
# 1154| }
# 1155| if (tree->type == yajl_t_object)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1166: error[memleak]: Memory leak: ret
# 1164| resi = calloc (1, sizeof(*tree));
# 1165| if (resi == NULL)
# 1166|-> return NULL;
# 1167|
# 1168| resi->type = yajl_t_object;
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1173: error[memleak]: Memory leak: ret
# 1171| {
# 1172| yajl_tree_free (resi);
# 1173|-> return NULL;
# 1174| }
# 1175| resi->u.object.values = calloc (cnt, sizeof (yajl_val));
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1179: error[memleak]: Memory leak: ret
# 1177| {
# 1178| yajl_tree_free (resi);
# 1179|-> return NULL;
# 1180| }
# 1181| }
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1309: error[memleak]: Memory leak: ret
# 1307| ret->hypervisor = clone_runtime_spec_schema_config_vm_hypervisor (src->hypervisor);
# 1308| if (ret->hypervisor == NULL)
# 1309|-> return NULL;
# 1310| }
# 1311| if (src->kernel)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1315: error[memleak]: Memory leak: ret
# 1313| ret->kernel = clone_runtime_spec_schema_config_vm_kernel (src->kernel);
# 1314| if (ret->kernel == NULL)
# 1315|-> return NULL;
# 1316| }
# 1317| if (src->image)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1321: error[memleak]: Memory leak: ret
# 1319| ret->image = clone_runtime_spec_schema_config_vm_image (src->image);
# 1320| if (ret->image == NULL)
# 1321|-> return NULL;
# 1322| }
# 1323| if (src->hw_config)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1327: error[memleak]: Memory leak: ret
# 1325| ret->hw_config = clone_runtime_spec_schema_config_vm_hw_config (src->hw_config);
# 1326| if (ret->hw_config == NULL)
# 1327|-> return NULL;
# 1328| }
# 1329| return move_ptr (ret);
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:949: error[memleak]: Memory leak: ret
# 947| ret->memory = clone_runtime_spec_schema_config_windows_resources_memory (src->memory);
# 948| if (ret->memory == NULL)
# 949|-> return NULL;
# 950| }
# 951| if (src->cpu)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:955: error[memleak]: Memory leak: ret
# 953| ret->cpu = clone_runtime_spec_schema_config_windows_resources_cpu (src->cpu);
# 954| if (ret->cpu == NULL)
# 955|-> return NULL;
# 956| }
# 957| if (src->storage)
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:961: error[memleak]: Memory leak: ret
# 959| ret->storage = clone_runtime_spec_schema_config_windows_resources_storage (src->storage);
# 960| if (ret->storage == NULL)
# 961|-> return NULL;
# 962| }
# 963| return move_ptr (ret);
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1291: error[memleak]: Memory leak: ret
# 1289| ret->endpoint_list = calloc (src->endpoint_list_len + 1, sizeof (*ret->endpoint_list));
# 1290| if (ret->endpoint_list == NULL)
# 1291|-> return NULL;
# 1292| for (size_t i = 0; i < src->endpoint_list_len; i++)
# 1293| {
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1521: error[memleak]: Memory leak: ret
# 1519| ret->utility_vm_path = strdup (src->utility_vm_path);
# 1520| if (ret->utility_vm_path == NULL)
# 1521|-> return NULL;
# 1522| }
# 1523| return move_ptr (ret);
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1903: error[memleak]: Memory leak: ret
# 1901| ret->layer_folders = calloc (src->layer_folders_len + 1, sizeof (*ret->layer_folders));
# 1902| if (ret->layer_folders == NULL)
# 1903|-> return NULL;
# 1904| for (size_t i = 0; i < src->layer_folders_len; i++)
# 1905| {
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:241:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:489:1: enter_function: entry to 'make_runtime_spec_schema_defs_linux_syscall'
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:494:8: branch_false: following 'false' branch (when 'tree' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:496:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:497:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:501:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:528:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:539:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:540:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:561:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:562:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:569:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:569:16: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:571:25: branch_true: following 'true' branch (when 'i < len')...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:573:38: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:574:32: call_function: calling 'make_runtime_spec_schema_defs_linux_syscall_arg' from 'make_runtime_spec_schema_defs_linux_syscall'
# 239| if (tree == NULL)
# 240| return NULL;
# 241|-> ret = calloc (1, sizeof (*ret));
# 242| if (ret == NULL)
# 243| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2273:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2271:8: branch_false: following 'false' branch (when 'tree' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2273:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2274:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2278:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2291:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2294:19: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2294:17: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2299:23: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2300:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2306:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2310:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2316:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2316:8: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2320:16: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2323:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2325:20: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2325:20: acquire_memory: allocated here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2326:16: branch_false: following 'false' branch (when 'resi' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2329:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2331:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2336:37: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2337:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2344:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2344:21: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2346:25: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2346:16: branch_true: following 'true' branch (when the strings are non-equal)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2347:8: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2346:17: branch_true: following 'true' branch (when the strings are non-equal)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2348:20: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2348:20: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2350:21: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2363:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2363:12: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2273:11: danger: 'resi' leaks here; was allocated at [(17)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/16)
# 2271| if (tree == NULL)
# 2272| return NULL;
# 2273|-> ret = calloc (1, sizeof (*ret));
# 2274| if (ret == NULL)
# 2275| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2633:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2631:8: branch_false: following 'false' branch (when 'tree' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2633:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2634:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2638:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2639:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2641:25: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2643:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2650:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2651:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2660:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2660:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2666:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2666:8: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2670:16: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2673:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2675:20: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2676:16: branch_false: following 'false' branch (when 'resi' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2679:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2680:35: acquire_memory: allocated here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2681:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2686:37: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2687:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2694:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2694:21: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2710:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2713:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2713:12: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2633:11: danger: '<unknown>' leaks here; was allocated at [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18)
# 2631| if (tree == NULL)
# 2632| return NULL;
# 2633|-> ret = calloc (1, sizeof (*ret));
# 2634| if (ret == NULL)
# 2635| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2633:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2631:8: branch_false: following 'false' branch (when 'tree' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2633:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2634:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2638:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2639:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2641:25: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2643:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2650:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2651:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2660:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2660:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2666:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2666:8: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2670:16: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2673:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2675:20: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2675:20: acquire_memory: allocated here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2676:16: branch_false: following 'false' branch (when 'resi' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2679:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2681:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2686:37: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2687:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2694:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2694:21: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2710:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2713:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2713:12: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2633:11: danger: 'resi' leaks here; was allocated at [(17)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/16)
# 2631| if (tree == NULL)
# 2632| return NULL;
# 2633|-> ret = calloc (1, sizeof (*ret));
# 2634| if (ret == NULL)
# 2635| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:19:8: branch_false: following 'false' branch (when 'tree' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:21:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:22:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:26:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:27:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:31:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:38:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:39:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:41:25: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:43:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:48:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:48:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:54:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:54:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:60:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:60:8: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:64:16: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:67:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:69:20: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:70:16: branch_false: following 'false' branch (when 'resi' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:73:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:74:35: acquire_memory: allocated here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:75:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:80:37: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:81:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:88:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:107:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:107:12: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:21:11: danger: '<unknown>' leaks here; was allocated at [(23)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/22)
# 19| if (tree == NULL)
# 20| return NULL;
# 21|-> ret = calloc (1, sizeof (*ret));
# 22| if (ret == NULL)
# 23| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:19:8: branch_false: following 'false' branch (when 'tree' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:21:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:22:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:26:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:27:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:31:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:38:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:39:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:41:25: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:43:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:48:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:48:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:54:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:54:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:60:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:60:8: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:64:16: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:67:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:69:20: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:69:20: acquire_memory: allocated here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:70:16: branch_false: following 'false' branch (when 'resi' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:73:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:75:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:80:37: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:81:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:88:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:107:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:107:12: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:21:11: danger: 'resi' leaks here; was allocated at [(21)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/20)
# 19| if (tree == NULL)
# 20| return NULL;
# 21|-> ret = calloc (1, sizeof (*ret));
# 22| if (ret == NULL)
# 23| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:19:8: branch_false: following 'false' branch (when 'tree' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:21:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:22:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:26:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:27:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:29:25: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:31:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:38:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:39:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:48:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:48:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:54:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:54:8: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:58:16: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:61:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:63:20: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:64:16: branch_false: following 'false' branch (when 'resi' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:67:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:68:35: acquire_memory: allocated here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:69:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:74:37: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:75:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:82:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:82:21: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:98:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:101:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:101:12: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:21:11: danger: '<unknown>' leaks here; was allocated at [(19)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/18)
# 19| if (tree == NULL)
# 20| return NULL;
# 21|-> ret = calloc (1, sizeof (*ret));
# 22| if (ret == NULL)
# 23| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:19:8: branch_false: following 'false' branch (when 'tree' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:21:11: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:22:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:26:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:27:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:29:25: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:31:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:38:24: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:39:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:48:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:48:8: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:54:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:54:8: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:58:16: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:61:12: branch_true: following 'true' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:63:20: branch_true: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:63:20: acquire_memory: allocated here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:64:16: branch_false: following 'false' branch (when 'resi' is non-NULL)...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:67:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:69:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:74:37: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:75:16: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:82:9: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:82:21: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:98:13: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:101:12: branch_false: following 'false' branch...
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:101:12: branch_false: ...to here
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:21:11: danger: 'resi' leaks here; was allocated at [(17)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/16)
# 19| if (tree == NULL)
# 20| return NULL;
# 21|-> ret = calloc (1, sizeof (*ret));
# 22| if (ret == NULL)
# 23| return NULL;
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1425: error[memleak]: Memory leak: ret
# 1423| {
# 1424| yajl_tree_free (resi);
# 1425|-> return NULL;
# 1426| }
# 1427| resi->u.object.values = calloc (cnt, sizeof (yajl_val));
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1431: error[memleak]: Memory leak: ret
# 1429| {
# 1430| yajl_tree_free (resi);
# 1431|-> return NULL;
# 1432| }
# 1433| }
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1516: error[memleak]: Memory leak: ret
# 1514| ret->idmap = clone_runtime_spec_schema_features_linux_mount_extensions_idmap (src->idmap);
# 1515| if (ret->idmap == NULL)
# 1516|-> return NULL;
# 1517| }
# 1518| return move_ptr (ret);
Error: CPPCHECK_WARNING (CWE-401):
crun-1.27/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:2025: error[memleak]: Memory leak: ret
# 2023| ret->namespaces = calloc (src->namespaces_len + 1, sizeof (*ret->namespaces));
# 2024| if (ret->namespaces == NULL)
# 2025|-> return NULL;
# 2026| for (size_t i = 0; i < src->namespaces_len; i++)
# 2027| {
Error: COMPILER_WARNING (CWE-704):
crun-1.27/src/libcrun/cgroup-systemd.c: scope_hint: In function 'get_systemd_scope_and_slice'
crun-1.27/src/libcrun/cgroup-systemd.c:125:5: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 125 | n = strchr (cgroup_path, ':');
# | ^
# 123| }
# 124|
# 125|-> n = strchr (cgroup_path, ':');
# 126| if (n == NULL)
# 127| xasprintf (scope, "%s.scope", cgroup_path);
Error: COMPILER_WARNING (CWE-704):
crun-1.27/src/libcrun/cgroup-systemd.c:125:5: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 123| }
# 124|
# 125|-> n = strchr (cgroup_path, ':');
# 126| if (n == NULL)
# 127| xasprintf (scope, "%s.scope", cgroup_path);
Error: COMPILER_WARNING (CWE-704):
crun-1.27/src/libcrun/cgroup-systemd.c: scope_hint: In function 'append_systemd_annotation'
crun-1.27/src/libcrun/cgroup-systemd.c:641:11: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 641 | end = strchr (it + 1, '\'');
# | ^
# 639| it = v_start = xstrdup (value);
# 640|
# 641|-> end = strchr (it + 1, '\'');
# 642| if (end == NULL)
# 643| return crun_make_error (err, 0, "invalid variant `%s`", value);
Error: COMPILER_WARNING (CWE-704):
crun-1.27/src/libcrun/cgroup-systemd.c:641:11: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 639| it = v_start = xstrdup (value);
# 640|
# 641|-> end = strchr (it + 1, '\'');
# 642| if (end == NULL)
# 643| return crun_make_error (err, 0, "invalid variant `%s`", value);
Error: COMPILER_WARNING (CWE-704):
crun-1.27/src/libcrun/error.c: scope_hint: In function 'get_log_type'
crun-1.27/src/libcrun/error.c:194:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 194 | char *sep = strchr (log, ':');
# | ^~~~~~
# 192| get_log_type (const char *log, const char **data)
# 193| {
# 194|-> char *sep = strchr (log, ':');
# 195| if (sep == NULL)
# 196| {
Error: COMPILER_WARNING (CWE-704):
crun-1.27/src/libcrun/error.c:194:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
# 192| get_log_type (const char *log, const char **data)
# 193| {
# 194|-> char *sep = strchr (log, ':');
# 195| if (sep == NULL)
# 196| {
Error: GCC_ANALYZER_WARNING (CWE-457):
crun-1.27/src/libcrun/error.c:416:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'level'
crun-1.27/src/libcrun/error.c:373:1: branch_false: following 'false' branch...
crun-1.27/src/libcrun/error.c:373:1: branch_false: ...to here
crun-1.27/src/libcrun/error.c:397:6: branch_false: following 'false' branch...
crun-1.27/src/libcrun/error.c:400:3: branch_false: ...to here
crun-1.27/src/libcrun/error.c:416:3: danger: use of uninitialized value 'level' here
# 414|
# 415| yajl_gen_string (gen, YAJL_STR ("level"), strlen ("level"));
# 416|-> yajl_gen_string (gen, YAJL_STR (level), strlen (level));
# 417|
# 418| yajl_gen_string (gen, YAJL_STR ("time"), strlen ("time"));
Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.27/src/libcrun/linux.c:6471:1: warning[-Wanalyzer-malloc-leak]: leak of 'data'
crun-1.27/src/libcrun/linux.c:6402:1: enter_function: entry to 'libcrun_make_runtime_mounts'
crun-1.27/src/libcrun/linux.c:6411:9: call_function: calling 'make_libcrun_fd_map' from 'libcrun_make_runtime_mounts'
crun-1.27/src/libcrun/linux.c:6411:9: return_function: returning to 'libcrun_make_runtime_mounts' from 'make_libcrun_fd_map'
crun-1.27/src/libcrun/linux.c:6413:15: branch_true: following 'true' branch (when 'i < len')...
crun-1.27/src/libcrun/linux.c:6415:42: branch_true: ...to here
crun-1.27/src/libcrun/linux.c:6423:13: call_function: calling 'maybe_get_idmapped_mount' from 'libcrun_make_runtime_mounts'
crun-1.27/src/libcrun/linux.c:6423:13: return_function: returning to 'libcrun_make_runtime_mounts' from 'maybe_get_idmapped_mount'
crun-1.27/src/libcrun/linux.c:6424:10: branch_false: following 'false' branch...
crun-1.27/src/libcrun/linux.c:6427:11: branch_false: ...to here
crun-1.27/src/libcrun/linux.c:6427:10: branch_true: following 'true' branch...
crun-1.27/src/libcrun/linux.c:6429:16: branch_true: ...to here
crun-1.27/src/libcrun/linux.c:6432:15: call_function: calling 'is_bind_mount' from 'libcrun_make_runtime_mounts'
crun-1.27/src/libcrun/linux.c:6432:15: return_function: returning to 'libcrun_make_runtime_mounts' from 'is_bind_mount'
crun-1.27/src/libcrun/linux.c:6440:21: call_function: calling 'open_mount_of_type' from 'libcrun_make_runtime_mounts'
crun-1.27/src/libcrun/linux.c:6440:21: return_function: returning to 'libcrun_make_runtime_mounts' from 'open_mount_of_type'
crun-1.27/src/libcrun/linux.c:6441:18: branch_false: following 'false' branch...
crun-1.27/src/libcrun/linux.c:6471:1: branch_false: ...to here
crun-1.27/src/libcrun/linux.c:6446:10: branch_true: following 'true' branch...
crun-1.27/src/libcrun/linux.c:6447:47: branch_true: ...to here
crun-1.27/src/libcrun/linux.c:6447:17: call_function: calling 'get_default_flags' from 'libcrun_make_runtime_mounts'
crun-1.27/src/libcrun/linux.c:6447:17: return_function: returning to 'libcrun_make_runtime_mounts' from 'get_default_flags'
crun-1.27/src/libcrun/linux.c:6456:13: call_function: calling 'do_mount_setattr' from 'libcrun_make_runtime_mounts'
crun-1.27/src/libcrun/linux.c:6456:13: return_function: returning to 'libcrun_make_runtime_mounts' from 'do_mount_setattr'
crun-1.27/src/libcrun/linux.c:6471:1: danger: 'data' leaks here; was allocated at [(59)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/58)
# 6469|
# 6470| return run_in_container_namespace (status, do_mount_in_a_container, &args, err);
# 6471|-> }
# 6472|
# 6473| int
Error: COMPILER_WARNING (CWE-704):
crun-1.27/src/libcrun/utils.c: scope_hint: In function 'crun_safe_ensure_at'
crun-1.27/src/libcrun/utils.c:578:10: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 578 | it = strchr (cur, '/');
# | ^
# 576| cur = consume_slashes (it + 1);
# 577| *it = '/';
# 578|-> it = strchr (cur, '/');
# 579| }
# 580|
Error: COMPILER_WARNING (CWE-704):
crun-1.27/src/libcrun/utils.c:578:10: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 576| cur = consume_slashes (it + 1);
# 577| *it = '/';
# 578|-> it = strchr (cur, '/');
# 579| }
# 580|