Task #55516 - fixed.err
back to task #55516download
Error: CPPCHECK_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3993: error[memleak]: Memory leak: ret # 3991| ret->devices = calloc (src->devices_len + 1, sizeof (*ret->devices)); # 3992| if (ret->devices == NULL) # 3993|-> return NULL; # 3994| for (size_t i = 0; i < src->devices_len; i++) # 3995| { Error: GCC_ANALYZER_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'make_runtime_spec_schema_config_windows' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:602:32: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources(get_val(tree, "resources", 3), ctx, err)' # 600| return NULL; # 601| ret->memory = make_runtime_spec_schema_config_windows_resources_memory (get_val (tree, "memory", yajl_t_object), ctx, err); # 602|-> if (ret->memory == NULL && *err != 0) # 603| return NULL; # 604| ret->cpu = make_runtime_spec_schema_config_windows_resources_cpu (get_val (tree, "cpu", yajl_t_object), ctx, err); Error: GCC_ANALYZER_WARNING (CWE-401): crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_update' crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(176)' crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY' crun-HEAD/src/libcrun/container.c:582:7: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/container.c:1626:12: note: in expansion of macro 'crun_make_error' crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY' # 72| { # 73| void *res = calloc (1, size); # 74|-> if (UNLIKELY (res == NULL)) # 75| OOM (); # 76| return res;