Task #55516 - added.err
back to task #55516download
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_resources_cpu' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:212:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_cpu_affinity(get_val(tree, "affinity", 3), ctx, err)' # 210| while (0); # 211| # 212|-> if (tree->type == yajl_t_object) # 213| { # 214| size_t i; 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_resources' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:414:34: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_cpu(get_val(tree, "cpu", 3), ctx, err)' # 412| while (0); # 413| ret->affinity = make_runtime_spec_schema_config_windows_resources_cpu_affinity (get_val (tree, "affinity", yajl_t_object), ctx, err); # 414|-> if (ret->affinity == NULL && *err != 0) # 415| return NULL; # 416| Error: GCC_ANALYZER_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:417:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 415| return NULL; # 416| # 417|-> if (tree->type == yajl_t_object) # 418| { # 419| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'clone_runtime_spec_schema_config_windows_resources' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:561:21: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_windows_resources_cpu(*src.cpu)' # 559| if (ret == NULL) # 560| return NULL; # 561|-> ret->count = src->count; # 562| ret->count_present = src->count_present; # 563| ret->shares = src->shares; Error: GCC_ANALYZER_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:570:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 568| { # 569| ret->affinity = clone_runtime_spec_schema_config_windows_resources_cpu_affinity (src->affinity); # 570|-> if (ret->affinity == NULL) # 571| return NULL; # 572| } Error: CPPCHECK_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1913: error[memleak]: Memory leak: ret # 1911| ret->layer_folders = calloc (src->layer_folders_len + 1, sizeof (*ret->layer_folders)); # 1912| if (ret->layer_folders == NULL) # 1913|-> return NULL; # 1914| for (size_t i = 0; i < src->layer_folders_len; i++) # 1915| { Error: CPPCHECK_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2808: error[memleak]: Memory leak: ret # 2806| ret->path = strdup (src->path); # 2807| if (ret->path == NULL) # 2808|-> return NULL; # 2809| } # 2810| return move_ptr (ret); Error: GCC_ANALYZER_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c: scope_hint: In function 'make_runtime_spec_schema_defs_zos_namespace_reference' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:102:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.h:7: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:8: included_from: Included from here. crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 100| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 101| # 102|-> if (ctx->options & OPT_PARSE_FULLKEY) # 103| ret->_residual = resi; # 104| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:455:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:310:28: note: in expansion of macro 'YAJL_IS_TRUE' # 453| while (0); # 454| # 455|-> if (tree->type == yajl_t_object) # 456| { # 457| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:455:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_features_linux_seccomp(get_val(tree, "seccomp", 3), ctx, err)' # 453| while (0); # 454| # 455|-> if (tree->type == yajl_t_object) # 456| { # 457| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.h:7: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:8: included_from: Included from here. crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_cpu(get_val(tree, "cpu", 3), ctx, err)' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:173:19: note: in expansion of macro 'YAJL_IS_NUMBER' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:173:19: note: in expansion of macro 'YAJL_IS_NUMBER' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:173:19: note: in expansion of macro 'YAJL_IS_NUMBER' # 149| /* Various convenience macros to check the type of a `yajl_val` */ # 150| #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string)) # 151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number)) # 152| #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID)) # 153| #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_features_linux_seccomp(get_val(tree, "seccomp", 3), ctx, err)' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:310:28: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:310:28: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:310:28: note: in expansion of macro 'YAJL_IS_TRUE' # 154| #define YAJL_IS_OBJECT(v) (((v) != NULL) && ((v)->type == yajl_t_object)) # 155| #define YAJL_IS_ARRAY(v) (((v) != NULL) && ((v)->type == yajl_t_array )) # 156|-> #define YAJL_IS_TRUE(v) (((v) != NULL) && ((v)->type == yajl_t_true )) # 157| #define YAJL_IS_FALSE(v) (((v) != NULL) && ((v)->type == yajl_t_false )) # 158| #define YAJL_IS_NULL(v) (((v) != NULL) && ((v)->type == yajl_t_null )) 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(184)' 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;