Task #2900 - crun-1.15-1.20240802133727467274.pr1508.64.gc3f7360/scan-results.err
back to task #2900download
Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:46:12: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_double_array_objectarrays_element(*<unknown>, ctx, err)' # 44| { # 45| yajl_val val = get_val (tree, "second", yajl_t_string); # 46|-> if (val != NULL) # 47| { # 48| char *str = YAJL_GET_STRING (val); Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:50:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:29:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:48:25: note: in expansion of macro 'YAJL_GET_STRING' # 48| char *str = YAJL_GET_STRING (val); # 49| ret->second = strdup (str ? str : ""); # 50|-> if (ret->second == NULL) # 51| return NULL; # 52| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:309:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 307| while (0); # 308| # 309|-> if (tree->type == yajl_t_object) # 310| { # 311| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:309:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_double_array(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' # 307| while (0); # 308| # 309|-> if (tree->type == yajl_t_object) # 310| { # 311| size_t i; Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'free_basic_test_double_array' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:376:53: warning[-Wanalyzer-null-dereference]: dereference of NULL '*ptr.strarrays_item_lens + i * 8' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'free_basic_test_double_array' # 374| { # 375| size_t j; # 376|-> for (j = 0; j < ptr->strarrays_item_lens[i]; j++) # 377| { # 378| free (ptr->strarrays[i][j]); Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c: scope_hint: In function 'basic_test_double_array_item_parse_data' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:78:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_double_array_item(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' # 76| while (0); # 77| # 78|-> if (tree->type == yajl_t_object) # 79| { # 80| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c: scope_hint: In function 'basic_test_top_array_int_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:20:15: warning[-Wanalyzer-malloc-leak]: leak of 'basic_test_top_array_int_container_parse_data(fread_file(stream, & filesize), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:151:1: note: in expansion of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c: scope_hint: In function 'basic_test_top_array_int_container_parse_file_stream' # 18| size_t i, alen; # 19| (void) ctx; # 20|-> if (tree == NULL || err == NULL || YAJL_GET_ARRAY (tree) == NULL) # 21| return NULL; # 22| *err = NULL; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c: scope_hint: In function 'basic_test_top_array_int_container_parse_data' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:20:15: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_top_array_int_container(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' # 18| size_t i, alen; # 19| (void) ctx; # 20|-> if (tree == NULL || err == NULL || YAJL_GET_ARRAY (tree) == NULL) # 21| return NULL; # 22| *err = NULL; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:31: error[memleak]: Memory leak: ptr # 29| ptr->items = calloc (alen + 1, sizeof(*ptr->items)); # 30| if (ptr->items == NULL) # 31|-> return NULL; # 32| ptr->len = alen; # 33| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c: scope_hint: In function 'basic_test_top_array_int_container_parse_data' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:35:19: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 33| # 34| # 35|-> for (i = 0; i < alen; i++) # 36| { # 37| yajl_val work = YAJL_GET_ARRAY_NO_CHECK (tree)->values[i]; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:151:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c: scope_hint: In function 'basic_test_top_array_int_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:151:1: note: in expansion of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c: scope_hint: In function 'basic_test_top_array_int_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' # 149| } # 150| # 151|-> define_cleaner_function (yajl_val, yajl_tree_free) # 152| # 153| basic_test_top_array_int_container * basic_test_top_array_int_container_parse_data (const char *jsondata, const struct parser_context *ctx, parser_error *err) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c: scope_hint: In function 'basic_test_top_array_string_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c:20:15: warning[-Wanalyzer-malloc-leak]: leak of 'basic_test_top_array_string_container_parse_data(fread_file(stream, & filesize), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c:144:1: note: in expansion of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c: scope_hint: In function 'basic_test_top_array_string_container_parse_file_stream' # 18| size_t i, alen; # 19| (void) ctx; # 20|-> if (tree == NULL || err == NULL || YAJL_GET_ARRAY (tree) == NULL) # 21| return NULL; # 22| *err = NULL; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c:31: error[memleak]: Memory leak: ptr # 29| ptr->items = calloc (alen + 1, sizeof(*ptr->items)); # 30| if (ptr->items == NULL) # 31|-> return NULL; # 32| ptr->len = alen; # 33| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c: scope_hint: In function 'basic_test_top_double_array_int_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:20:15: warning[-Wanalyzer-malloc-leak]: leak of 'basic_test_top_double_array_int_container_parse_data(fread_file(stream, & filesize), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:174:1: note: in expansion of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c: scope_hint: In function 'basic_test_top_double_array_int_container_parse_file_stream' # 18| size_t i, alen; # 19| (void) ctx; # 20|-> if (tree == NULL || err == NULL || YAJL_GET_ARRAY (tree) == NULL) # 21| return NULL; # 22| *err = NULL; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c: scope_hint: In function 'basic_test_top_double_array_int_container_parse_data' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:20:15: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_top_double_array_int_container(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' # 18| size_t i, alen; # 19| (void) ctx; # 20|-> if (tree == NULL || err == NULL || YAJL_GET_ARRAY (tree) == NULL) # 21| return NULL; # 22| *err = NULL; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:31: error[memleak]: Memory leak: ptr # 29| ptr->items = calloc (alen + 1, sizeof(*ptr->items)); # 30| if (ptr->items == NULL) # 31|-> return NULL; # 32| ptr->len = alen; # 33| ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t)); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:35: error[memleak]: Memory leak: ptr # 33| ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t)); # 34| if (ptr->subitem_lens == NULL) # 35|-> return NULL; # 36| # 37| for (i = 0; i < alen; i++) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c: scope_hint: In function 'basic_test_top_double_array_int_container_parse_data' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:37:19: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 35| return NULL; # 36| # 37|-> for (i = 0; i < alen; i++) # 38| { # 39| yajl_val work = YAJL_GET_ARRAY_NO_CHECK (tree)->values[i]; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:174:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c: scope_hint: In function 'basic_test_top_double_array_int_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:174:1: note: in expansion of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c: scope_hint: In function 'basic_test_top_double_array_int_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' # 172| } # 173| # 174|-> define_cleaner_function (yajl_val, yajl_tree_free) # 175| # 176| basic_test_top_double_array_int_container * basic_test_top_double_array_int_container_parse_data (const char *jsondata, const struct parser_context *ctx, parser_error *err) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:68:12: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_top_double_array_obj_element(*<unknown>, ctx, err)' # 66| { # 67| yajl_val val = get_val (tree, "third", yajl_t_string); # 68|-> if (val != NULL) # 69| { # 70| char *str = YAJL_GET_STRING (val); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:161: error[memleak]: Memory leak: ptr # 159| ptr->items = calloc (alen + 1, sizeof(*ptr->items)); # 160| if (ptr->items == NULL) # 161|-> return NULL; # 162| ptr->len = alen; # 163| ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t)); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:165: error[memleak]: Memory leak: ptr # 163| ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t)); # 164| if (ptr->subitem_lens == NULL) # 165|-> return NULL; # 166| # 167| for (i = 0; i < alen; i++) Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c: scope_hint: In function 'free_basic_test_top_double_array_obj_container.part.0' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:199:44: warning[-Wanalyzer-null-dereference]: dereference of NULL '*ptr.subitem_lens + i * 8' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c: scope_hint: In function 'free_basic_test_top_double_array_obj_container.part.0' # 197| { # 198| size_t j; # 199|-> for (j = 0; j < ptr->subitem_lens[i]; j++) # 200| { # 201| free_basic_test_top_double_array_obj_element (ptr->items[i][j]); Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:201:15: warning[-Wanalyzer-null-dereference]: dereference of NULL '*<unknown> + j * 8' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c: scope_hint: In function 'free_basic_test_top_double_array_obj_container.part.0' # 199| for (j = 0; j < ptr->subitem_lens[i]; j++) # 200| { # 201|-> free_basic_test_top_double_array_obj_element (ptr->items[i][j]); # 202| ptr->items[i][j] = NULL; # 203| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c: scope_hint: In function 'basic_test_top_double_array_refobj_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:20:15: warning[-Wanalyzer-malloc-leak]: leak of 'basic_test_top_double_array_refobj_container_parse_data(fread_file(stream, & filesize), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:166:1: note: in expansion of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c: scope_hint: In function 'basic_test_top_double_array_refobj_container_parse_file_stream' # 18| size_t i, alen; # 19| (void) ctx; # 20|-> if (tree == NULL || err == NULL || YAJL_GET_ARRAY (tree) == NULL) # 21| return NULL; # 22| *err = NULL; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c: scope_hint: In function 'basic_test_top_double_array_refobj_container_parse_data' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:20:15: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_top_double_array_refobj_container(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' # 18| size_t i, alen; # 19| (void) ctx; # 20|-> if (tree == NULL || err == NULL || YAJL_GET_ARRAY (tree) == NULL) # 21| return NULL; # 22| *err = NULL; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:31: error[memleak]: Memory leak: ptr # 29| ptr->items = calloc (alen + 1, sizeof(*ptr->items)); # 30| if (ptr->items == NULL) # 31|-> return NULL; # 32| ptr->len = alen; # 33| ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t)); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:35: error[memleak]: Memory leak: ptr # 33| ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t)); # 34| if (ptr->subitem_lens == NULL) # 35|-> return NULL; # 36| # 37| for (i = 0; i < alen; i++) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c: scope_hint: In function 'basic_test_top_double_array_refobj_container_parse_data' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:37:19: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 35| return NULL; # 36| # 37|-> for (i = 0; i < alen; i++) # 38| { # 39| yajl_val work = YAJL_GET_ARRAY_NO_CHECK (tree)->values[i]; Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c: scope_hint: In function 'free_basic_test_top_double_array_refobj_container.part.0' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:69:44: warning[-Wanalyzer-null-dereference]: dereference of NULL '*ptr.subitem_lens + i * 8' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c: scope_hint: In function 'free_basic_test_top_double_array_refobj_container.part.0' # 67| { # 68| size_t j; # 69|-> for (j = 0; j < ptr->subitem_lens[i]; j++) # 70| { # 71| free_basic_test_double_array_item (ptr->items[i][j]); Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:166:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c: scope_hint: In function 'basic_test_top_double_array_refobj_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:166:1: note: in expansion of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c: scope_hint: In function 'basic_test_top_double_array_refobj_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' # 164| } # 165| # 166|-> define_cleaner_function (yajl_val, yajl_tree_free) # 167| # 168| basic_test_top_double_array_refobj_container * basic_test_top_double_array_refobj_container_parse_data (const char *jsondata, const struct parser_context *ctx, parser_error *err) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c: scope_hint: In function 'basic_test_top_double_array_string_container_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:20:15: warning[-Wanalyzer-malloc-leak]: leak of 'basic_test_top_double_array_string_container_parse_data(fread_file(stream, & filesize), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:171:1: note: in expansion of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c: scope_hint: In function 'basic_test_top_double_array_string_container_parse_file_stream' # 18| size_t i, alen; # 19| (void) ctx; # 20|-> if (tree == NULL || err == NULL || YAJL_GET_ARRAY (tree) == NULL) # 21| return NULL; # 22| *err = NULL; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:31: error[memleak]: Memory leak: ptr # 29| ptr->items = calloc (alen + 1, sizeof(*ptr->items)); # 30| if (ptr->items == NULL) # 31|-> return NULL; # 32| ptr->len = alen; # 33| ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t)); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:35: error[memleak]: Memory leak: ptr # 33| ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t)); # 34| if (ptr->subitem_lens == NULL) # 35|-> return NULL; # 36| # 37| for (i = 0; i < alen; i++) Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c: scope_hint: In function 'free_basic_test_top_double_array_string_container.part.0' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:74:42: warning[-Wanalyzer-null-dereference]: dereference of NULL '*ptr.subitem_lens + i * 8' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c: scope_hint: In function 'free_basic_test_top_double_array_string_container.part.0' # 72| { # 73| size_t j; # 74|-> for (j = 0; j < ptr->subitem_lens[i]; j++) # 75| { # 76| free (ptr->items[i][j]); Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:76:13: warning[-Wanalyzer-null-dereference]: dereference of NULL '*<unknown> + j * 8' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c: scope_hint: In function 'free_basic_test_top_double_array_string_container.part.0' # 74| for (j = 0; j < ptr->subitem_lens[i]; j++) # 75| { # 76|-> free (ptr->items[i][j]); # 77| ptr->items[i][j] = NULL; # 78| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:106:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 104| return NULL; # 105| } # 106|-> if (ret->layers == NULL) # 107| { # 108| if (asprintf (err, "Required field '%s' not present", "Layers") < 0) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:263: error[memleak]: Memory leak: ptr # 261| ptr->items = calloc (alen + 1, sizeof(*ptr->items)); # 262| if (ptr->items == NULL) # 263|-> return NULL; # 264| ptr->len = alen; # 265| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:182:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:167:33: note: in expansion of macro 'YAJL_IS_TRUE' # 180| while (0); # 181| # 182|-> if (tree->type == yajl_t_object) # 183| { # 184| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:745:38: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:696:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:744:32: note: in expansion of macro 'YAJL_IS_TRUE' # 743| { # 744| ret->empty_layer = YAJL_IS_TRUE(val); # 745|-> ret->empty_layer_present = 1; # 746| } # 747| else Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:151:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:63:25: note: in expansion of macro 'YAJL_GET_STRING' # 149| } # 150| # 151|-> if (tree->type == yajl_t_object) # 152| { # 153| size_t i; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:75: error[memleak]: Memory leak: ret # 73| ret->keys = calloc (len + 1, sizeof (*ret->keys)); # 74| if (ret->keys == NULL) # 75|-> return NULL; # 76| ret->values = calloc (len + 1, sizeof (*ret->values)); # 77| if (ret->values == NULL) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:78: error[memleak]: Memory leak: ret # 76| ret->values = calloc (len + 1, sizeof (*ret->values)); # 77| if (ret->values == NULL) # 78|-> return NULL; # 79| for (i = 0; i < len; i++) # 80| { Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c: scope_hint: In function 'free_image_spec_schema_defs_map_string_object' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:115:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:66:9: note: in expansion of macro 'YAJL_GET_OBJECT' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:66:9: note: in expansion of macro 'YAJL_GET_OBJECT' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c: scope_hint: In function 'free_image_spec_schema_defs_map_string_object' # 113| ptr->values = NULL; # 114| } # 115|-> free (ptr); # 116| } # 117| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:111:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:41:25: note: in expansion of macro 'YAJL_GET_STRING' # 109| } # 110| # 111|-> if (tree->type == yajl_t_object) # 112| { # 113| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:43:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 41| } # 42| # 43|-> if (tree->type == yajl_t_object) # 44| { # 45| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:129:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 127| } # 128| # 129|-> if (tree->type == yajl_t_object) # 130| { # 131| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c: scope_hint: In function 'make_image_spec_schema_image_manifest_schema' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:181:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:30:19: note: in expansion of macro 'YAJL_IS_NUMBER' # 179| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 180| } # 181|-> if (ctx->options & OPT_PARSE_FULLKEY) # 182| ret->_residual = resi; # 183| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:181:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:30:19: note: in expansion of macro 'YAJL_IS_NUMBER' # 179| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 180| } # 181|-> if (ctx->options & OPT_PARSE_FULLKEY) # 182| ret->_residual = resi; # 183| } Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:532: error[memleak]: Memory leak: ret # 530| if (ret->keys == NULL) # 531| { # 532|-> return NULL; # 533| } # 534| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:538: error[memleak]: Memory leak: ret # 536| if (ret->values == NULL) # 537| { # 538|-> return NULL; # 539| } # 540| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:610: error[memleak]: Memory leak: keys # 608| if (vals == NULL) # 609| { # 610|-> return -1; # 611| } # 612| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:711: error[memleak]: Memory leak: ret # 709| if (ret->keys == NULL) # 710| { # 711|-> return NULL; # 712| } # 713| ret->values = calloc (len + 1, sizeof (bool)); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:716: error[memleak]: Memory leak: ret # 714| if (ret->values == NULL) # 715| { # 716|-> return NULL; # 717| } # 718| for (i = 0; i < len; i++) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:780: error[memleak]: Memory leak: keys # 778| if (vals == NULL) # 779| { # 780|-> return -1; # 781| } # 782| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:885: error[memleak]: Memory leak: ret # 883| if (ret->keys == NULL) # 884| { # 885|-> return NULL; # 886| } # 887| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:891: error[memleak]: Memory leak: ret # 889| if (ret->values == NULL) # 890| { # 891|-> return NULL; # 892| } # 893| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1046: error[memleak]: Memory leak: ret # 1044| { # 1045| *(err) = strdup ("error allocating memory"); # 1046|-> return NULL; # 1047| } # 1048| ret->values = calloc (len + 1, sizeof (int)); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1052: error[memleak]: Memory leak: ret # 1050| { # 1051| *(err) = strdup ("error allocating memory"); # 1052|-> return NULL; # 1053| } # 1054| for (i = 0; i < len; i++) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1339: error[memleak]: Memory leak: ret # 1337| if (ret->keys == NULL) # 1338| { # 1339|-> return NULL; # 1340| } # 1341| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1345: error[memleak]: Memory leak: ret # 1343| if (ret->values == NULL) # 1344| { # 1345|-> return NULL; # 1346| } # 1347| for (i = 0; i < len; i++) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1402: error[memleak]: Memory leak: keys # 1400| if (vals == NULL) # 1401| { # 1402|-> return -1; # 1403| } # 1404| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1408: error[memleak]: Memory leak: keys # 1406| if (new_value == NULL) # 1407| { # 1408|-> return -1; # 1409| } # 1410| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1408: error[memleak]: Memory leak: vals # 1406| if (new_value == NULL) # 1407| { # 1408|-> return -1; # 1409| } # 1410| Error: GCC_ANALYZER_WARNING (CWE-457): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c: scope_hint: In function 'free_json_map_string_string.part.0' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1480:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*map.values' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1486:1: note: in expansion of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c: scope_hint: In function 'free_json_map_string_string.part.0' # 1478| free (map->keys); # 1479| map->keys = NULL; # 1480|-> free (map->values); # 1481| map->values = NULL; # 1482| free (map); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1514: error[memleak]: Memory leak: ret # 1512| { # 1513| *(err) = strdup ("error allocating memory"); # 1514|-> return NULL; # 1515| } # 1516| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1521: error[memleak]: Memory leak: ret # 1519| { # 1520| *(err) = strdup ("error allocating memory"); # 1521|-> return NULL; # 1522| } # 1523| for (i = 0; i < len; i++) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'make_runtime_spec_schema_config_linux_resources' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:47:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_linux_resources_pids(get_val(tree, "pids", 3), ctx, err)' # 45| while (0); # 46| # 47|-> if (tree->type == yajl_t_object) # 48| { # 49| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:309:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 307| while (0); # 308| # 309|-> if (tree->type == yajl_t_object) # 310| { # 311| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:309:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_linux_resources_block_io(get_val(tree, "blockIO", 3), ctx, err)' # 307| while (0); # 308| # 309|-> if (tree->type == yajl_t_object) # 310| { # 311| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'make_runtime_spec_schema_config_linux' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1800:30: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_linux_resources(get_val(tree, "resources", 3), ctx, err)' # 1798| while (0); # 1799| ret->pids = make_runtime_spec_schema_config_linux_resources_pids (get_val (tree, "pids", yajl_t_object), ctx, err); # 1800|-> if (ret->pids == NULL && *err != 0) # 1801| return NULL; # 1802| ret->block_io = make_runtime_spec_schema_config_linux_resources_block_io (get_val (tree, "blockIO", yajl_t_object), ctx, err); Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2253:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2119:25: note: in expansion of macro 'YAJL_GET_STRING' # 2251| } # 2252| # 2253|-> if (tree->type == yajl_t_object) # 2254| { # 2255| size_t i; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2768: error[memleak]: Memory leak: ret # 2766| ret->boottime = make_runtime_spec_schema_defs_linux_time_offsets (get_val (tree, "boottime", yajl_t_object), ctx, err); # 2767| if (ret->boottime == NULL && *err != 0) # 2768|-> return NULL; # 2769| ret->monotonic = make_runtime_spec_schema_defs_linux_time_offsets (get_val (tree, "monotonic", yajl_t_object), ctx, err); # 2770| if (ret->monotonic == NULL && *err != 0) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2771: error[memleak]: Memory leak: ret # 2769| ret->monotonic = make_runtime_spec_schema_defs_linux_time_offsets (get_val (tree, "monotonic", yajl_t_object), ctx, err); # 2770| if (ret->monotonic == NULL && *err != 0) # 2771|-> return NULL; # 2772| # 2773| if (tree->type == yajl_t_object) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2784: error[memleak]: Memory leak: ret # 2782| resi = calloc (1, sizeof(*tree)); # 2783| if (resi == NULL) # 2784|-> return NULL; # 2785| # 2786| resi->type = yajl_t_object; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2791: error[memleak]: Memory leak: ret # 2789| { # 2790| yajl_tree_free (resi); # 2791|-> return NULL; # 2792| } # 2793| resi->u.object.values = calloc (cnt, sizeof (yajl_val)); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2797: error[memleak]: Memory leak: ret # 2795| { # 2796| yajl_tree_free (resi); # 2797|-> return NULL; # 2798| } # 2799| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:157:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 155| while (0); # 156| # 157|-> if (tree->type == yajl_t_object) # 158| { # 159| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:157:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_hooks(get_val(tree, "hooks", 3), ctx, err)' # 155| while (0); # 156| # 157|-> if (tree->type == yajl_t_object) # 158| { # 159| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:523:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:490:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:502:29: note: in expansion of macro 'YAJL_IS_TRUE' # 521| } # 522| # 523|-> if (tree->type == yajl_t_object) # 524| { # 525| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'make_runtime_spec_schema_config_schema_process' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:691:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_process_console_size(get_val(tree, "consoleSize", 3), ctx, err)' # 689| while (0); # 690| # 691|-> if (tree->type == yajl_t_object) # 692| { # 693| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:925:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2282:29: note: in expansion of macro 'YAJL_IS_TRUE' # 923| while (0); # 924| # 925|-> if (tree->type == yajl_t_object) # 926| { # 927| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:925:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_process_user(get_val(tree, "user", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2282:29: note: in expansion of macro 'YAJL_IS_TRUE' # 923| while (0); # 924| # 925|-> if (tree->type == yajl_t_object) # 926| { # 927| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1234:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2282:29: note: in expansion of macro 'YAJL_IS_TRUE' # 1232| while (0); # 1233| # 1234|-> if (tree->type == yajl_t_object) # 1235| { # 1236| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1234:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_process_capabilities(get_val(tree, "capabilities", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2282:29: note: in expansion of macro 'YAJL_IS_TRUE' # 1232| while (0); # 1233| # 1234|-> if (tree->type == yajl_t_object) # 1235| { # 1236| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'make_runtime_spec_schema_config_solaris' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:37:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_solaris_capped_cpu(get_val(tree, "cappedCPU", 3), ctx, err)' # 35| while (0); # 36| # 37|-> if (tree->type == yajl_t_object) # 38| { # 39| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:171:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:151:25: note: in expansion of macro 'YAJL_GET_STRING' # 169| while (0); # 170| # 171|-> if (tree->type == yajl_t_object) # 172| { # 173| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:171:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_solaris_capped_memory(get_val(tree, "cappedMemory", 3), ctx, err)' # 169| while (0); # 170| # 171|-> if (tree->type == yajl_t_object) # 172| { # 173| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:370:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:300:25: note: in expansion of macro 'YAJL_GET_STRING' # 368| { # 369| yajl_val val = get_val (tree, "linkProtection", yajl_t_string); # 370|-> if (val != NULL) # 371| { # 372| char *str = YAJL_GET_STRING (val); Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:370:12: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_solaris_anet_element(val, ctx, err)' # 368| { # 369| yajl_val val = get_val (tree, "linkProtection", yajl_t_string); # 370|-> if (val != NULL) # 371| { # 372| char *str = YAJL_GET_STRING (val); Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:69:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 67| } # 68| # 69|-> if (tree->type == yajl_t_object) # 70| { # 71| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:275:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:223:25: note: in expansion of macro 'YAJL_GET_STRING' # 273| } # 274| # 275|-> if (tree->type == yajl_t_object) # 276| { # 277| size_t i; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:602: error[memleak]: Memory leak: ret # 600| ret->hypervisor = make_runtime_spec_schema_config_vm_hypervisor (get_val (tree, "hypervisor", yajl_t_object), ctx, err); # 601| if (ret->hypervisor == NULL && *err != 0) # 602|-> return NULL; # 603| ret->kernel = make_runtime_spec_schema_config_vm_kernel (get_val (tree, "kernel", yajl_t_object), ctx, err); # 604| if (ret->kernel == NULL && *err != 0) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:605: error[memleak]: Memory leak: ret # 603| ret->kernel = make_runtime_spec_schema_config_vm_kernel (get_val (tree, "kernel", yajl_t_object), ctx, err); # 604| if (ret->kernel == NULL && *err != 0) # 605|-> return NULL; # 606| ret->image = make_runtime_spec_schema_config_vm_image (get_val (tree, "image", yajl_t_object), ctx, err); # 607| if (ret->image == NULL && *err != 0) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:608: error[memleak]: Memory leak: ret # 606| ret->image = make_runtime_spec_schema_config_vm_image (get_val (tree, "image", yajl_t_object), ctx, err); # 607| if (ret->image == NULL && *err != 0) # 608|-> return NULL; # 609| if (ret->kernel == NULL) # 610| { Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:613: error[memleak]: Memory leak: ret # 611| if (asprintf (err, "Required field '%s' not present", "kernel") < 0) # 612| *err = strdup ("error allocating memory"); # 613|-> return NULL; # 614| } # 615| Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:627: error[memleak]: Memory leak: ret # 625| resi = calloc (1, sizeof(*tree)); # 626| if (resi == NULL) # 627|-> return NULL; # 628| # 629| resi->type = yajl_t_object; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:634: error[memleak]: Memory leak: ret # 632| { # 633| yajl_tree_free (resi); # 634|-> return NULL; # 635| } # 636| resi->u.object.values = calloc (cnt, sizeof (yajl_val)); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:640: error[memleak]: Memory leak: ret # 638| { # 639| yajl_tree_free (resi); # 640|-> return NULL; # 641| } # 642| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'make_runtime_spec_schema_config_windows_resources' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:47:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_memory(get_val(tree, "memory", 3), ctx, err)' # 45| while (0); # 46| # 47|-> if (tree->type == yajl_t_object) # 48| { # 49| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:221:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_cpu(get_val(tree, "cpu", 3), ctx, err)' # 219| while (0); # 220| # 221|-> if (tree->type == yajl_t_object) # 222| { # 223| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:269:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 267| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 268| } # 269|-> if (ctx->options & OPT_PARSE_FULLKEY) # 270| ret->_residual = resi; # 271| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'make_runtime_spec_schema_config_windows_resources_cpu' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:269:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' # 267| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 268| } # 269|-> if (ctx->options & OPT_PARSE_FULLKEY) # 270| ret->_residual = resi; # 271| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'make_runtime_spec_schema_config_windows_resources' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:421:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_storage(get_val(tree, "storage", 3), ctx, err)' # 419| while (0); # 420| # 421|-> if (tree->type == yajl_t_object) # 422| { # 423| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'make_runtime_spec_schema_config_windows_resources_storage' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:469:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 467| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 468| } # 469|-> if (ctx->options & OPT_PARSE_FULLKEY) # 470| ret->_residual = resi; # 471| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:469:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' # 467| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 468| } # 469|-> if (ctx->options & OPT_PARSE_FULLKEY) # 470| ret->_residual = resi; # 471| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'make_runtime_spec_schema_config_windows' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:555:32: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources(get_val(tree, "resources", 3), ctx, err)' # 553| return NULL; # 554| ret->memory = make_runtime_spec_schema_config_windows_resources_memory (get_val (tree, "memory", yajl_t_object), ctx, err); # 555|-> if (ret->memory == NULL && *err != 0) # 556| return NULL; # 557| ret->cpu = make_runtime_spec_schema_config_windows_resources_cpu (get_val (tree, "cpu", yajl_t_object), ctx, err); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:556: error[memleak]: Memory leak: ret # 554| ret->memory = make_runtime_spec_schema_config_windows_resources_memory (get_val (tree, "memory", yajl_t_object), ctx, err); # 555| if (ret->memory == NULL && *err != 0) # 556|-> return NULL; # 557| ret->cpu = make_runtime_spec_schema_config_windows_resources_cpu (get_val (tree, "cpu", yajl_t_object), ctx, err); # 558| if (ret->cpu == NULL && *err != 0) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:559: error[memleak]: Memory leak: ret # 557| ret->cpu = make_runtime_spec_schema_config_windows_resources_cpu (get_val (tree, "cpu", yajl_t_object), ctx, err); # 558| if (ret->cpu == NULL && *err != 0) # 559|-> return NULL; # 560| ret->storage = make_runtime_spec_schema_config_windows_resources_storage (get_val (tree, "storage", yajl_t_object), ctx, err); # 561| if (ret->storage == NULL && *err != 0) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:562: error[memleak]: Memory leak: ret # 560| ret->storage = make_runtime_spec_schema_config_windows_resources_storage (get_val (tree, "storage", yajl_t_object), ctx, err); # 561| if (ret->storage == NULL && *err != 0) # 562|-> return NULL; # 563| # 564| if (tree->type == yajl_t_object) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:575: error[memleak]: Memory leak: ret # 573| resi = calloc (1, sizeof(*tree)); # 574| if (resi == NULL) # 575|-> return NULL; # 576| # 577| resi->type = yajl_t_object; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:582: error[memleak]: Memory leak: ret # 580| { # 581| yajl_tree_free (resi); # 582|-> return NULL; # 583| } # 584| resi->u.object.values = calloc (cnt, sizeof (yajl_val)); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:588: error[memleak]: Memory leak: ret # 586| { # 587| yajl_tree_free (resi); # 588|-> return NULL; # 589| } # 590| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'make_runtime_spec_schema_defs_mount' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:386:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_defs_id_mapping(val, ctx, err)' # 384| while (0); # 385| # 386|-> if (tree->type == yajl_t_object) # 387| { # 388| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:434:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 432| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 433| } # 434|-> if (ctx->options & OPT_PARSE_FULLKEY) # 435| ret->_residual = resi; # 436| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'make_runtime_spec_schema_defs_id_mapping' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:434:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' # 432| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 433| } # 434|-> if (ctx->options & OPT_PARSE_FULLKEY) # 435| ret->_residual = resi; # 436| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'make_runtime_spec_schema_defs_mount' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:683:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:536:25: note: in expansion of macro 'YAJL_GET_STRING' # 681| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 682| } # 683|-> if (ctx->options & OPT_PARSE_FULLKEY) # 684| ret->_residual = resi; # 685| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:297:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:283:25: note: in expansion of macro 'YAJL_GET_STRING' # 295| } # 296| # 297|-> if (tree->type == yajl_t_object) # 298| { # 299| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_syscall_arg' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:346:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:283:25: note: in expansion of macro 'YAJL_GET_STRING' # 344| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 345| } # 346|-> if (ctx->options & OPT_PARSE_FULLKEY) # 347| ret->_residual = resi; # 348| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_block_io_device' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1169:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' # 1167| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 1168| } # 1169|-> if (ctx->options & OPT_PARSE_FULLKEY) # 1170| ret->_residual = resi; # 1171| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_block_io_device_weight' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1380:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' # 1378| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 1379| } # 1380|-> if (ctx->options & OPT_PARSE_FULLKEY) # 1381| ret->_residual = resi; # 1382| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_block_io_device_throttle' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1592:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' # 1590| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 1591| } # 1592|-> if (ctx->options & OPT_PARSE_FULLKEY) # 1593| ret->_residual = resi; # 1594| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_network_interface_priority' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2017:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1934:25: note: in expansion of macro 'YAJL_GET_STRING' # 2015| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 2016| } # 2017|-> if (ctx->options & OPT_PARSE_FULLKEY) # 2018| ret->_residual = resi; # 2019| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_rdma' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2184:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' # 2182| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 2183| } # 2184|-> if (ctx->options & OPT_PARSE_FULLKEY) # 2185| ret->_residual = resi; # 2186| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_namespace_reference' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2335:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2262:25: note: in expansion of macro 'YAJL_GET_STRING' # 2333| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 2334| } # 2335|-> if (ctx->options & OPT_PARSE_FULLKEY) # 2336| ret->_residual = resi; # 2337| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_time_offsets' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2504:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' # 2502| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 2503| } # 2504|-> if (ctx->options & OPT_PARSE_FULLKEY) # 2505| ret->_residual = resi; # 2506| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c: scope_hint: In function 'make_runtime_spec_schema_defs_windows_device' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:108:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:41:25: note: in expansion of macro 'YAJL_GET_STRING' # 106| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 107| } # 108|-> if (ctx->options & OPT_PARSE_FULLKEY) # 109| ret->_residual = resi; # 110| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:108:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:41:25: note: in expansion of macro 'YAJL_GET_STRING' # 106| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 107| } # 108|-> if (ctx->options & OPT_PARSE_FULLKEY) # 109| ret->_residual = resi; # 110| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:434:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:289:28: note: in expansion of macro 'YAJL_IS_TRUE' # 432| while (0); # 433| # 434|-> if (tree->type == yajl_t_object) # 435| { # 436| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:434:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_features_linux_seccomp(get_val(tree, "seccomp", 3), ctx, err)' # 432| while (0); # 433| # 434|-> if (tree->type == yajl_t_object) # 435| { # 436| size_t i; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1256: error[memleak]: Memory leak: ret # 1254| ret->idmap = make_runtime_spec_schema_features_linux_mount_extensions_idmap (get_val (tree, "idmap", yajl_t_object), ctx, err); # 1255| if (ret->idmap == NULL && *err != 0) # 1256|-> return NULL; # 1257| # 1258| if (tree->type == yajl_t_object) Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1269: error[memleak]: Memory leak: ret # 1267| resi = calloc (1, sizeof(*tree)); # 1268| if (resi == NULL) # 1269|-> return NULL; # 1270| # 1271| resi->type = yajl_t_object; Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1276: error[memleak]: Memory leak: ret # 1274| { # 1275| yajl_tree_free (resi); # 1276|-> return NULL; # 1277| } # 1278| resi->u.object.values = calloc (cnt, sizeof (yajl_val)); Error: CPPCHECK_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1282: error[memleak]: Memory leak: ret # 1280| { # 1281| yajl_tree_free (resi); # 1282|-> return NULL; # 1283| } # 1284| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:160:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:41:25: note: in expansion of macro 'YAJL_GET_STRING' # 158| } # 159| # 160|-> if (tree->type == yajl_t_object) # 161| { # 162| size_t i; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c: scope_hint: In function 'make_runtime_spec_schema_features_schema' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:212:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:41:25: note: in expansion of macro 'YAJL_GET_STRING' # 210| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 211| } # 212|-> if (ctx->options & OPT_PARSE_FULLKEY) # 213| ret->_residual = resi; # 214| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:212:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:41:25: note: in expansion of macro 'YAJL_GET_STRING' # 210| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 211| } # 212|-> if (ctx->options & OPT_PARSE_FULLKEY) # 213| ret->_residual = resi; # 214| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_double_array_objectarrays_element(*<unknown>, ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:48:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:48:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:48:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c: scope_hint: In function 'make_image_manifest_items_image_manifest_items_schema_container' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_image_manifest_items_image_manifest_items_schema_element(work, ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_image_spec_schema_config_schema_history_element(val, ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:696:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:696:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:744:32: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:696:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c: scope_hint: In function 'image_spec_schema_content_descriptor_parse_data' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_image_spec_schema_content_descriptor(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:63:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'make_image_spec_schema_image_index_schema_manifests_element' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_image_spec_schema_image_index_schema_manifests_platform(get_val(tree, "platform", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:41:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c: scope_hint: In function 'image_spec_schema_image_layout_schema_parse_data' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_image_spec_schema_image_layout_schema(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_linux_seccomp(get_val(tree, "seccomp", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2119:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2119:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2119:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_root(get_val(tree, "root", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:490:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:490:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:502:29: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:490:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_solaris_anet_element(val, ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:300:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:300:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:300:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_solaris_capped_memory(get_val(tree, "cappedMemory", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:151:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:151:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:151:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'make_runtime_spec_schema_config_vm' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_vm_hypervisor(get_val(tree, "hypervisor", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_vm_kernel(get_val(tree, "kernel", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:223:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:223:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:223:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_syscall' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_defs_linux_syscall_arg(val, ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:283:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:283:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:283:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c: scope_hint: In function 'runtime_spec_schema_features_schema_parse_data' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_features_schema(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:41:25: note: in expansion of macro 'YAJL_GET_STRING' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING' # 148| # 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)) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'basic_test_double_array_parse_data' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_double_array(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:123:28: note: in expansion of macro 'YAJL_GET_ARRAY' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:123:28: note: in expansion of macro 'YAJL_GET_ARRAY' # 153| #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) # 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 )) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'make_image_spec_schema_config_schema' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_image_spec_schema_config_schema_config(get_val(tree, "config", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:42:28: note: in expansion of macro 'YAJL_GET_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:167:33: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:42:28: note: in expansion of macro 'YAJL_GET_ARRAY' # 153| #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) # 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 )) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c: scope_hint: In function 'image_spec_schema_image_manifest_schema_parse_data' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_image_spec_schema_image_manifest_schema(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:79:28: note: in expansion of macro 'YAJL_GET_ARRAY' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:79:28: note: in expansion of macro 'YAJL_GET_ARRAY' # 153| #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) # 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 )) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_linux_resources_block_io(get_val(tree, "blockIO", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:201:28: note: in expansion of macro 'YAJL_GET_ARRAY' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:201:28: note: in expansion of macro 'YAJL_GET_ARRAY' # 153| #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) # 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 )) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'make_runtime_spec_schema_config_schema' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_hooks(get_val(tree, "hooks", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:27:28: note: in expansion of macro 'YAJL_GET_ARRAY' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:27:28: note: in expansion of macro 'YAJL_GET_ARRAY' # 153| #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) # 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 )) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_process_capabilities(get_val(tree, "capabilities", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1106:28: note: in expansion of macro 'YAJL_GET_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2282:29: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1106:28: note: in expansion of macro 'YAJL_GET_ARRAY' # 153| #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) # 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 )) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_process_user(get_val(tree, "user", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:880:28: note: in expansion of macro 'YAJL_GET_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2282:29: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:880:28: note: in expansion of macro 'YAJL_GET_ARRAY' # 153| #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) # 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 )) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_network(get_val(tree, "network", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:706:28: note: in expansion of macro 'YAJL_GET_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:734:48: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:706:28: note: in expansion of macro 'YAJL_GET_ARRAY' # 153| #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) # 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 )) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c: scope_hint: In function 'basic_test_double_array_item_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'basic_test_double_array_item_parse_data(fread_file(stream, & filesize), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:63:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:63:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:240:1: note: in expansion of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c: scope_hint: In function 'basic_test_double_array_item_parse_file_stream' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:63:26: 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-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c: scope_hint: In function 'basic_test_double_array_item_parse_data' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_double_array_item(yajl_tree_parse(jsondata, & errbuf, 1024), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:63:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:63:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:63:26: 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-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'make_basic_test_double_array' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_double_array_objectarrays_element(*<unknown>, ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:29:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:29:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:29:26: 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-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c: scope_hint: In function 'make_basic_test_top_double_array_obj_container' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_top_double_array_obj_element(*<unknown>, ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:29:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:29:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:29:26: 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-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_image_spec_schema_config_schema_config(get_val(tree, "config", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:167:33: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:167:33: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:167:33: 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-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_image_spec_schema_config_schema_history_element(val, ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:744:32: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:744:32: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:744:32: 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-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_network(get_val(tree, "network", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:734:48: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:734:48: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:734:48: 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-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:8: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'make_runtime_spec_schema_features_linux' crun-1.15-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_features_linux_cgroup(get_val(tree, "cgroup", 3), ctx, err)' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:29:23: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:29:23: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:48:23: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:67:28: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:86:33: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:105:25: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:29:23: 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-1.15-build/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-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:289:28: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:289:28: note: in expansion of macro 'YAJL_IS_TRUE' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:289: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: CPPCHECK_WARNING (CWE-457): crun-1.15-build/crun-HEAD/src/libcrun/blake3/blake3.c:229: warning[uninitvar]: Uninitialized variable: parents_array # 227| } # 228| # 229|-> blake3_hash_many(parents_array, parents_array_len, 1, key, # 230| 0, // Parents always use counter 0. # 231| false, flags | PARENT, Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-cgroupfs.c: scope_hint: In function 'libcrun_precreate_cgroup_cgroupfs' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-cgroupfs.c:82:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(cgroup_path, 720896)' # 80| return ret; # 81| # 82|-> *dirfd = open (cgroup_path, O_CLOEXEC | O_NOFOLLOW | O_DIRECTORY | O_RDONLY); # 83| if (UNLIKELY (*dirfd < 0)) # 84| return crun_make_error (err, errno, "open `%s`", cgroup_path); Error: GCC_ANALYZER_WARNING (CWE-688): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-resources.c:131:12: warning[-Wanalyzer-null-argument]: use of NULL 'controllers' where non-null expected <built-in>: note: argument 1 of '__builtin_strchr' must be non-null # 129| key = xstrdup (name); # 130| # 131|-> it = strchr (key, '.'); # 132| if (it == NULL) # 133| { Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'update_cgroup_v1_resources' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-resources.c:1076:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path_to_blkio, 589824)' # 1074| return ret; # 1075| # 1076|-> dirfd_blkio = open (path_to_blkio, O_DIRECTORY | O_RDONLY | O_CLOEXEC); # 1077| if (UNLIKELY (dirfd_blkio < 0)) # 1078| return crun_make_error (err, errno, "open `%s`", path_to_blkio); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-resources.c:1101:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path_to_netclass, 589824)' # 1099| return ret; # 1100| # 1101|-> dirfd_netclass = open (path_to_netclass, O_DIRECTORY | O_RDONLY | O_CLOEXEC); # 1102| if (UNLIKELY (dirfd_netclass < 0)) # 1103| return crun_make_error (err, errno, "open `%s`", path_to_netclass); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-resources.c:1105:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path_to_netprio, 589824)' # 1103| return crun_make_error (err, errno, "open `%s`", path_to_netclass); # 1104| # 1105|-> dirfd_netprio = open (path_to_netprio, O_DIRECTORY | O_RDONLY | O_CLOEXEC); # 1106| if (UNLIKELY (dirfd_netprio < 0)) # 1107| return crun_make_error (err, errno, "open `%s`", path_to_netprio); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-resources.c:1122:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path_to_htlb, 589824)' # 1120| if (UNLIKELY (ret < 0)) # 1121| return ret; # 1122|-> dirfd_htlb = open (path_to_htlb, O_DIRECTORY | O_RDONLY | O_CLOEXEC); # 1123| if (UNLIKELY (dirfd_htlb < 0)) # 1124| return crun_make_error (err, errno, "open `%s`", path_to_htlb); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'update_cgroup_v2_resources' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-resources.c:1263:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(cgroup_path, 589824)' # 1261| return ret; # 1262| # 1263|-> cgroup_dirfd = open (cgroup_path, O_DIRECTORY | O_CLOEXEC); # 1264| if (UNLIKELY (cgroup_dirfd < 0)) # 1265| return crun_make_error (err, errno, "open `%s`", cgroup_path); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'initialize_cpuset_subsystem_rec' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-setup.c:53:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path, 589824)' # 51| int b_len; # 52| # 53|-> dirfd = open (path, O_DIRECTORY | O_RDONLY | O_CLOEXEC); # 54| if (UNLIKELY (dirfd < 0)) # 55| return crun_make_error (err, errno, "open `%s`", path); Error: GCC_ANALYZER_WARNING (CWE-688): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'initialize_cpuset_subsystem' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-setup.c:155:10: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of '__builtin_strlen' must be non-null # 153| # 154| cpus_buf[0] = mems_buf[0] = '\0'; # 155|-> return initialize_cpuset_subsystem_rec (tmp_path, strlen (tmp_path), cpus_buf, mems_buf, NULL, err); # 156| } # 157| Error: GCC_ANALYZER_WARNING (CWE-688): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'enter_cgroup_v2' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-setup.c:461:15: warning[-Wanalyzer-null-argument]: use of NULL 'cgroup_crun_exec_path' where non-null expected crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-setup.c:309:12: note: in expansion of macro 'crun_make_error' crun-1.15-build/crun-HEAD/libocispec/src/ocispec/json_common.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.h:7: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/container.h:23: included_from: Included from here. /usr/include/string.h:159:12: note: argument 2 of 'strncmp' must be non-null # 459| # 460| /* Make sure the cgroup is below the initial cgroup specified for the container. */ # 461|-> if (strncmp (path, cgroup_crun_exec_path, strlen (path))) # 462| { # 463| free (cgroup_crun_exec_path); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'setup_cpuset_for_systemd_v1' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c:269:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path_to_cpuset, 589824)' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'setup_cpuset_for_systemd_v1' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'setup_cpuset_for_systemd_v1' # 267| return ret; # 268| # 269|-> dirfd_cpuset = open (path_to_cpuset, O_DIRECTORY | O_RDONLY | O_CLOEXEC); # 270| if (UNLIKELY (dirfd_cpuset < 0)) # 271| return crun_make_error (err, errno, "open `%s`", path_to_cpuset); Error: GCC_ANALYZER_WARNING (CWE-688): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'get_cgroup_scope_path' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c:1314:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of '__builtin_strchr' must be non-null # 1312| path_to_scope = xstrdup (cgroup_path); # 1313| # 1314|-> cur = strchr (path_to_scope, '/'); # 1315| while (cur) # 1316| { Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'libcrun_destroy_cgroup_systemd' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c:1315:10: warning[-Wanalyzer-malloc-leak]: leak of 'get_cgroup_scope_path(*cgroup_status.path, *cgroup_status.scope)' # 1313| # 1314| cur = strchr (path_to_scope, '/'); # 1315|-> while (cur) # 1316| { # 1317| char *next = strchr (cur + 1, '/'); Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c:1317:32: warning[-Wanalyzer-malloc-leak]: leak of 'get_cgroup_scope_path(*cgroup_status.path, *cgroup_status.scope)' # 1315| while (cur) # 1316| { # 1317|-> char *next = strchr (cur + 1, '/'); # 1318| if (next == NULL) # 1319| break; Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'libcrun_get_cgroup_dirfd' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-utils.c:963:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path_to_cgroup, 720896)' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'libcrun_get_cgroup_dirfd' # 961| return ret; # 962| # 963|-> cgroupdirfd = open (path_to_cgroup, O_CLOEXEC | O_NOFOLLOW | O_DIRECTORY | O_RDONLY); # 964| if (UNLIKELY (cgroupdirfd < 0)) # 965| return crun_make_error (err, errno, "open `%s`", path_to_cgroup); Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_cgroup_destroy' crun-1.15-build/crun-HEAD/src/libcrun/cgroup.c:204:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cgroup_manager' # 202| return ret; # 203| # 204|-> return cgroup_manager->destroy_cgroup (cgroup_status, err); # 205| } # 206| Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_update_cgroup_resources' crun-1.15-build/crun-HEAD/src/libcrun/cgroup.c:219:21: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cgroup_manager' # 217| return ret; # 218| # 219|-> if (cgroup_manager->update_resources) # 220| { # 221| ret = cgroup_manager->update_resources (cgroup_status, resources, err); Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_cgroup_preenter' crun-1.15-build/crun-HEAD/src/libcrun/cgroup.c:277:21: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cgroup_manager' # 275| return ret; # 276| # 277|-> if (cgroup_manager->precreate_cgroup == NULL) # 278| return 0; # 279| Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_cgroup_enter' crun-1.15-build/crun-HEAD/src/libcrun/cgroup.c:334:23: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cgroup_manager' # 332| status->manager = args->manager; # 333| # 334|-> ret = cgroup_manager->create_cgroup (args, status, err); # 335| if (UNLIKELY (ret < 0)) # 336| { Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/cloned_binary.c: scope_hint: In function 'fetchve' crun-1.15-build/crun-HEAD/src/libcrun/cloned_binary.c:190:40: warning[-Wanalyzer-malloc-leak]: leak of 'read_file("/proc/self/cmdline", &cmdline_size)' crun-1.15-build/crun-HEAD/src/libcrun/cloned_binary.c:61: included_from: Included from here. # 188| break; # 189| # 190|-> copy = xrealloc(copy, (*length + n) * sizeof(*copy)); # 191| memcpy(copy + *length, buf, n); # 192| *length += n; Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/cloned_binary.c: scope_hint: In function 'parse_xargs' crun-1.15-build/crun-HEAD/src/libcrun/cloned_binary.c:222:24: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' # 220| cur += strlen(cur) + 1; # 221| } # 222|-> (*output)[num] = NULL; # 223| return num; # 224| } Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_load_from_file' crun-1.15-build/crun-HEAD/src/libcrun/container.c:537:10: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 535| container->config_file_content = xstrdup (config); # 536| # 537|-> return container; # 538| } # 539| Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'container_delete_internal' crun-1.15-build/crun-HEAD/src/libcrun/container.c:1722:15: warning[-Wanalyzer-null-dereference]: dereference of NULL 'container' # 1720| return ret; # 1721| # 1722|-> def = container->container_def; # 1723| } # 1724| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'exec_process_entrypoint' crun-1.15-build/crun-HEAD/src/libcrun/container.c:3440:23: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd1' # 3438| # 3439| TEMP_FAILURE_RETRY (write (pipefd1, "0", 1)); # 3440|-> TEMP_FAILURE_RETRY (close (pipefd1)); # 3441| pipefd1 = -1; # 3442| Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' crun-1.15-build/crun-HEAD/src/libcrun/container.c:3609:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'process' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' # 3607| # 3608| /* This must be done before we enter a user namespace. */ # 3609|-> ret = libcrun_set_rlimits (process->rlimits, process->rlimits_len, err); # 3610| if (UNLIKELY (ret < 0)) # 3611| return ret; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/container.c:3624:32: warning[-Wanalyzer-malloc-leak]: leak of '*process.selinux_label' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' # 3622| { # 3623| if (process->selinux_label == NULL && container->container_def->process->selinux_label) # 3624|-> process->selinux_label = xstrdup (container->container_def->process->selinux_label); # 3625| # 3626| if (process->apparmor_profile == NULL && container->container_def->process->apparmor_profile) Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/container.c:3627:35: warning[-Wanalyzer-malloc-leak]: leak of '*process.apparmor_profile' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' # 3625| # 3626| if (process->apparmor_profile == NULL && container->container_def->process->apparmor_profile) # 3627|-> process->apparmor_profile = xstrdup (container->container_def->process->apparmor_profile); # 3628| } # 3629| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/container.c:3646:27: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd0' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' # 3644| if (pid == 0) # 3645| { # 3646|-> TEMP_FAILURE_RETRY (close (pipefd0)); # 3647| pipefd0 = -1; # 3648| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/container.c:3657:23: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd1' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' # 3655| } # 3656| # 3657|-> TEMP_FAILURE_RETRY (close (pipefd1)); # 3658| pipefd1 = -1; # 3659| Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'restore_cgroup_v1_mount' crun-1.15-build/crun-HEAD/src/libcrun/criu.c:294:22: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 292| subsystem = strchr (from, ':') + 1; # 293| subpath = strchr (subsystem, ':') + 1; # 294|-> *(subpath - 1) = '\0'; # 295| # 296| if (subsystem[0] == '\0') Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/criu.c:296:20: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 294| *(subpath - 1) = '\0'; # 295| # 296|-> if (subsystem[0] == '\0') # 297| continue; # 298| Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'checkpoint_cgroup_v1_mount' crun-1.15-build/crun-HEAD/src/libcrun/criu.c:361:22: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 359| subsystem = strchr (from, ':') + 1; # 360| subpath = strchr (subsystem, ':') + 1; # 361|-> *(subpath - 1) = '\0'; # 362| # 363| if (subsystem[0] == '\0') Error: GCC_ANALYZER_WARNING (CWE-476): crun-1.15-build/crun-HEAD/src/libcrun/criu.c:363:20: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 361| *(subpath - 1) = '\0'; # 362| # 363|-> if (subsystem[0] == '\0') # 364| continue; # 365| Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'libcrun_container_checkpoint_linux_criu' crun-1.15-build/crun-HEAD/src/libcrun/criu.c:438:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(*cr_options.image_path, 589824)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 436| return crun_make_error (err, errno, "error creating checkpoint directory `%s`", cr_options->image_path); # 437| # 438|-> image_fd = open (cr_options->image_path, O_DIRECTORY | O_CLOEXEC); # 439| if (UNLIKELY (image_fd == -1)) # 440| return crun_make_error (err, errno, "error opening checkpoint directory `%s`", cr_options->image_path); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/criu.c:458:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(*cr_options.work_path, 589824)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 456| if (cr_options->work_path != NULL) # 457| { # 458|-> work_fd = open (cr_options->work_path, O_DIRECTORY | O_CLOEXEC); # 459| if (UNLIKELY (work_fd == -1)) # 460| return crun_make_error (err, errno, "error opening CRIU work directory `%s`", cr_options->work_path); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'prepare_restore_mounts' crun-1.15-build/crun-HEAD/src/libcrun/criu.c:703:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(root, 524288)' # 701| } # 702| # 703|-> root_fd = open (root, O_RDONLY | O_CLOEXEC); # 704| if (UNLIKELY (root_fd == -1)) # 705| return crun_make_error (err, errno, "error opening container root directory `%s`", root); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'libcrun_container_restore_linux_criu' crun-1.15-build/crun-HEAD/src/libcrun/criu.c:761:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(*cr_options.image_path, 589824)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 759| return crun_make_error (err, 0, "image path not set"); # 760| # 761|-> image_fd = open (cr_options->image_path, O_DIRECTORY | O_CLOEXEC); # 762| if (UNLIKELY (image_fd == -1)) # 763| return crun_make_error (err, errno, "error opening checkpoint directory `%s`", cr_options->image_path); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/criu.c:817:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(*cr_options.work_path, 589824)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/criu.c:792:17: note: in expansion of macro 'YAJL_IS_ARRAY' # 815| if (cr_options->work_path != NULL) # 816| { # 817|-> work_fd = open (cr_options->work_path, O_DIRECTORY | O_CLOEXEC); # 818| if (UNLIKELY (work_fd == -1)) # 819| return crun_make_error (err, errno, "error opening CRIU work directory `%s`", cr_options->work_path); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/criu.c:906:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(**_134.path, 0)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/criu.c:792:17: note: in expansion of macro 'YAJL_IS_ARRAY' # 904| if (value == CLONE_NEWNET && def->linux->namespaces[i]->path != NULL) # 905| { # 906|-> inherit_new_net_fd = open (def->linux->namespaces[i]->path, open_flags_for_inherit); # 907| if (UNLIKELY (inherit_new_net_fd < 0)) # 908| return crun_make_error (err, errno, "unable to open(): `%s`", def->linux->namespaces[i]->path); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/criu.c:915:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(**_151.path, 0)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/criu.c:792:17: note: in expansion of macro 'YAJL_IS_ARRAY' # 913| if (value == CLONE_NEWPID && def->linux->namespaces[i]->path != NULL) # 914| { # 915|-> inherit_new_pid_fd = open (def->linux->namespaces[i]->path, open_flags_for_inherit); # 916| if (UNLIKELY (inherit_new_pid_fd < 0)) # 917| return crun_make_error (err, errno, "unable to open(): `%s`", def->linux->namespaces[i]->path); Error: GCC_ANALYZER_WARNING (CWE-835): crun-1.15-build/crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'read_all_progs' crun-1.15-build/crun-HEAD/src/libcrun/ebpf.c:294:18: warning[-Wanalyzer-infinite-loop]: infinite loop crun-1.15-build/crun-HEAD/src/libcrun/ebpf.h:25: included_from: Included from here. # 292| ret = bpf (BPF_PROG_QUERY, &attr, sizeof (attr)); # 293| } # 294|-> while (ret < 0 && errno == ENOSPC) # 295| ; # 296| Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/handlers/krun.c: scope_hint: In function 'libkrun_configure_container' crun-1.15-build/crun-HEAD/src/libcrun/handlers/krun.c:186:37: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(rootfs, 2621440)' # 184| else # 185| { # 186|-> rootfsfd = rootfsfd_cleanup = open (rootfs, O_PATH | O_CLOEXEC); # 187| if (UNLIKELY (rootfsfd < 0)) # 188| return crun_make_error (err, errno, "open `%s`", rootfs); Error: GCC_ANALYZER_WARNING (CWE-457): crun-1.15-build/crun-HEAD/src/libcrun/handlers/krun.c:248:6: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'create_sev' # 246| return ret; # 247| # 248|-> if (create_sev) # 249| { # 250| ret = libcrun_create_dev (container, devfd, -1, &sev_device, is_user_ns, true, err); Error: COMPILER_WARNING (CWE-457): crun-1.15-build/crun-HEAD/src/libcrun/handlers/krun.c: scope_hint: In function 'libkrun_configure_container' crun-1.15-build/crun-HEAD/src/libcrun/handlers/krun.c:248:6: warning[-Wmaybe-uninitialized]: 'create_sev' may be used uninitialized # 248 | if (create_sev) # | ^ crun-1.15-build/crun-HEAD/src/libcrun/handlers/krun.c:180:8: note: 'create_sev' was declared here # 180 | bool create_sev; # | ^~~~~~~~~~ # 246| return ret; # 247| # 248|-> if (create_sev) # 249| { # 250| ret = libcrun_create_dev (container, devfd, -1, &sev_device, is_user_ns, true, err); Error: COMPILER_WARNING (CWE-563): crun-1.15-build/crun-HEAD/src/libcrun/handlers/krun.c: scope_hint: In function 'libkrun_load' crun-1.15-build/crun-HEAD/src/libcrun/handlers/krun.c:262:9: warning[-Wunused-variable]: unused variable 'handle' # 262 | void *handle; # | ^~~~~~ # 260| { # 261| struct krun_config *kconf; # 262|-> void *handle; # 263| const char *libkrun_so = "libkrun.so.1"; # 264| const char *libkrun_sev_so = "libkrun-sev.so.1"; Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/intelrdt.c: scope_hint: In function 'resctl_update' crun-1.15-build/crun-HEAD/src/libcrun/intelrdt.c:313:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path, 524289)' # 311| l3_cache_schema = cleaned_l3_cache_schema = intelrdt_clean_l3_cache_schema (l3_cache_schema); # 312| # 313|-> fd = open (path, O_WRONLY | O_CLOEXEC); # 314| if (UNLIKELY (fd < 0)) # 315| return crun_make_error (err, errno, "open `%s`", path); Error: CPPCHECK_WARNING (CWE-457): crun-1.15-build/crun-HEAD/src/libcrun/linux.c:3687: error[uninitvar]: Uninitialized variable: code # 3685| if (UNLIKELY (ret < 0)) # 3686| return false; # 3687|-> *error = code; # 3688| } # 3689| Error: COMPILER_WARNING (CWE-252): crun-1.15-build/crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_safe_chdir' crun-1.15-build/crun-HEAD/src/libcrun/linux.c:5787:14: warning[-Wunused-result]: ignoring return value of 'chdir' declared with attribute 'warn_unused_result' # 5787 | (void) chdir ("/"); # | ^~~~~~~~~~~ # 5785| if (ret == 0 || buffer[0] != '/') # 5786| { # 5787|-> (void) chdir ("/"); # 5788| errno = ENOENT; # 5789| Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c:461:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open_rundir_dirfd(*container_44->context.state_root, err)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 459| # 460| dir = libcrun_get_state_directory (state_root, NULL); # 461|-> if (UNLIKELY (dir == NULL)) # 462| return crun_make_error (err, 0, "cannot get state directory"); # 463| Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'libcrun_open_seccomp_bpf' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c:461:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open_rundir_dirfd(*container_50->context.state_root, err)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'libcrun_open_seccomp_bpf' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 459| # 460| dir = libcrun_get_state_directory (state_root, NULL); # 461|-> if (UNLIKELY (dir == NULL)) # 462| return crun_make_error (err, 0, "cannot get state directory"); # 463| Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'open_rundir_dirfd' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c:464:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(libcrun_get_state_directory(state_root, 0), 2686976)' # 462| return crun_make_error (err, 0, "cannot get state directory"); # 463| # 464|-> dirfd = TEMP_FAILURE_RETRY (open (dir, O_PATH | O_DIRECTORY | O_CLOEXEC)); # 465| if (UNLIKELY (dirfd < 0)) # 466| return crun_make_error (err, errno, "open `%s`", dir); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c:465:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor '<unknown>' # 463| # 464| dirfd = TEMP_FAILURE_RETRY (open (dir, O_PATH | O_DIRECTORY | O_CLOEXEC)); # 465|-> if (UNLIKELY (dirfd < 0)) # 466| return crun_make_error (err, errno, "open `%s`", dir); # 467| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'evict_cache' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c:522:11: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(cache_dir_fd)' # 520| int dfd; # 521| # 522|-> d = fdopendir (cache_dir_fd); # 523| if (d == NULL) # 524| return crun_make_error (err, errno, "cannot open seccomp cache directory"); Error: GCC_ANALYZER_WARNING (CWE-688): crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c:562:7: warning[-Wanalyzer-null-argument]: use of NULL 'entries' where non-null expected crun-1.15-build/crun-HEAD/src/libcrun/seccomp.h:22: included_from: Included from here. /usr/include/stdlib.h:970:13: note: argument 1 of 'qsort' must be non-null # 560| } # 561| # 562|-> qsort (entries, n_entries, sizeof (struct cache_entry), compare_entries_by_atime); # 563| # 564| /* Attempt to delete half of them. */ Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_container_delete_status' crun-1.15-build/crun-HEAD/src/libcrun/status.c:50:12: warning[-Wanalyzer-malloc-leak]: leak of 'get_run_directory(state_root)' # 48| if (state_root) # 49| root = xstrdup (state_root); # 50|-> if (root == NULL) # 51| { # 52| const char *runtime_dir = getenv ("XDG_RUNTIME_DIR"); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'read_pid_stat' crun-1.15-build/crun-HEAD/src/libcrun/status.c:119:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&pid_stat_file, 524288)' # 117| sprintf (pid_stat_file, "/proc/%d/stat", pid); # 118| # 119|-> fd = open (pid_stat_file, O_RDONLY | O_CLOEXEC); # 120| if (fd < 0) # 121| { Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'rmdirfd' crun-1.15-build/crun-HEAD/src/libcrun/status.c:473:7: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(fd)' # 471| __attribute__ ((unused)) cleanup_close int fd_cleanup = fd; # 472| # 473|-> d = fdopendir (fd); # 474| if (d == NULL) # 475| return crun_make_error (err, errno, "cannot open directory `%s`", namedir); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_container_delete_status' crun-1.15-build/crun-HEAD/src/libcrun/status.c:535:36: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(get_run_directory(state_root), 589824)' # 533| return crun_make_error (err, 0, "cannot get state directory"); # 534| # 535|-> rundir_dfd = TEMP_FAILURE_RETRY (open (dir, O_DIRECTORY | O_RDONLY | O_CLOEXEC)); # 536| if (UNLIKELY (rundir_dfd < 0)) # 537| return crun_make_error (err, errno, "cannot open run directory `%s`", dir); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_container_delete_status' crun-1.15-build/crun-HEAD/src/libcrun/status.c:556:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'rundir_dfd' crun-1.15-build/crun-HEAD/src/libcrun/error.h:42: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/status.h:24: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/status.c:21: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h:24: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/status.c:22: included_from: Included from here. # 554| # 555| return 0; # 556|-> } # 557| # 558| void Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/status.c:582:9: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(get_run_directory(state_root))' # 580| # 581| *ret = NULL; # 582|-> dir = opendir (path); # 583| if (UNLIKELY (dir == NULL)) # 584| return crun_make_error (err, errno, "cannot opendir `%s`", path); Error: GCC_ANALYZER_WARNING (CWE-688): crun-1.15-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_get_containers_list' crun-1.15-build/crun-HEAD/src/libcrun/status.c:582:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected crun-1.15-build/crun-HEAD/src/libcrun/utils.h:27: included_from: Included from here. /usr/include/dirent.h:141:13: note: argument 1 of 'opendir' must be non-null # 580| # 581| *ret = NULL; # 582|-> dir = opendir (path); # 583| if (UNLIKELY (dir == NULL)) # 584| return crun_make_error (err, errno, "cannot opendir `%s`", path); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_status_create_exec_fifo' crun-1.15-build/crun-HEAD/src/libcrun/status.c:691:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(fifo_path, 526336)' # 689| return crun_make_error (err, errno, "mkfifo"); # 690| # 691|-> fd = open (fifo_path, O_NONBLOCK | O_CLOEXEC); # 692| if (UNLIKELY (fd < 0)) # 693| return crun_make_error (err, errno, "cannot open pipe `%s`", fifo_path); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_status_write_exec_fifo' crun-1.15-build/crun-HEAD/src/libcrun/status.c:713:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(fifo_path, 524289)' # 711| return ret; # 712| # 713|-> fd = open (fifo_path, O_WRONLY | O_CLOEXEC); # 714| if (UNLIKELY (fd < 0)) # 715| return crun_make_error (err, errno, "cannot open `%s`", fifo_path); Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'copy_recursive_fd_to_fd' crun-1.15-build/crun-HEAD/src/libcrun/utils.c:2078:12: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(srcdirfd)' # 2076| struct dirent *de; # 2077| # 2078|-> dsrcfd = fdopendir (srcdirfd); # 2079| if (UNLIKELY (dsrcfd == NULL)) # 2080| { Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.c:2081:27: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'srcdirfd' # 2079| if (UNLIKELY (dsrcfd == NULL)) # 2080| { # 2081|-> TEMP_FAILURE_RETRY (close (srcdirfd)); # 2082| return crun_make_error (err, errno, "cannot open directory `%s`", destname); # 2083| } Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.c:2125:31: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'destfd' # 2123| #endif # 2124| # 2125|-> TEMP_FAILURE_RETRY (close (destfd)); # 2126| destfd = -1; # 2127| break; Error: GCC_ANALYZER_WARNING (CWE-688): crun-1.15-build/crun-HEAD/src/libcrun/utils.c:2159:17: warning[-Wanalyzer-null-argument]: use of NULL 'target_buf' where non-null expected /usr/include/unistd.h:847:12: note: argument 1 of 'symlinkat' must be non-null # 2157| return ret; # 2158| # 2159|-> ret = symlinkat (target_buf, destdirfd, de->d_name); # 2160| if (UNLIKELY (ret < 0)) # 2161| return crun_make_error (err, errno, "create symlink `%s/%s`", destname, de->d_name); Error: GCC_ANALYZER_WARNING (CWE-688): crun-1.15-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'read_file_as_long_or_default' crun-1.15-build/crun-HEAD/src/libcrun/utils.c:2484:9: warning[-Wanalyzer-null-argument]: use of NULL 'content' where non-null expected /usr/include/features.h:511: included_from: Included from here. /usr/include/bits/libc-header-start.h:33: included_from: Included from here. /usr/include/stdio.h:28: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h:22: included_from: Included from here. /usr/include/stdlib.h:215:17: note: argument 1 of 'strtol' must be non-null # 2482| # 2483| errno = 0; # 2484|-> val = strtol (content, &endptr, 10); # 2485| if (UNLIKELY (errno)) # 2486| return def_value; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/intelrdt.c:23: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'resctl_update' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'intelrdt_clean_l3_cache_schema(l3_cache_schema)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'safe_read_xattr' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((long unsigned int)(current_size + 1))' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'copy_xattr' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((long unsigned int)(xattr_len + 1))' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/seccomp_notify.c:32: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_load_seccomp_notify_plugins' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((long unsigned int)*(struct seccomp_notify_context_s *)<unknown>.sizes.seccomp_notif)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((long unsigned int)*(struct seccomp_notify_context_s *)<unknown>.sizes.seccomp_notif_resp)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'compare_rdt_configurations' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((n_parts_a + 1) * 8)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'test_write_read_file' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(1024)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_get_containers_list' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(16)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(256)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/exec.c:29: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'crun_command_exec' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(88)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' /usr/include/bits/types/stack_t.h:23: included_from: Included from here. /usr/include/signal.h:313: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h:29: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.c:21: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'read_all_fd_with_size_hint' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(allocated + 1)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'read_all_fd_with_size_hint' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-internal.h:22: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/cgroup-utils.c:23: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'write_controller_file' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(controllers_len + 1)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'copy_from_fd_to_fd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(get_page_size())' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:24: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c:25: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_copy_seccomp' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(in_size + 1)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-internal.h:22: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c:23: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'append_systemd_annotation' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:62:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(name_len + 2)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 60| { # 61| void *res = malloc (size); # 62|-> if (UNLIKELY (res == NULL)) # 63| OOM (); # 64| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_restore' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'libcrun_container_load_from_file("config.json", err)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_update_intel_rdt' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'libcrun_container_load_from_file(config_file, err)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_load_from_file' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'make_container(runtime_spec_schema_config_schema_parse_file(path, 0, & oci_error), path, 0)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'crun_command_exec' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'make_oci_process_user(exec_options.user)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0((long unsigned int)(argc + 1) * 8)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'retrieve_mount_options' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0((num_mount_options + 1) * 8)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(120)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/container.c:24: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_get_features' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(144)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_update' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(176)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-internal.h:22: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/cgroup.c:24: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_cgroup_enter' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(24)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(48)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'make_oci_process_user' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(56)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 69| { # 70| void *res = calloc (1, size); # 71|-> if (UNLIKELY (res == NULL)) # 72| OOM (); # 73| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:80:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(buffer, (long unsigned int)(current_size + 1))' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 78| { # 79| void *res = realloc (ptr, size); # 80|-> if (UNLIKELY (res == NULL)) # 81| OOM (); # 82| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'evict_cache' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:80:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(entries, (n_entries + 1) * 88)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 78| { # 79| void *res = realloc (ptr, size); # 80|-> if (UNLIKELY (res == NULL)) # 81| OOM (); # 82| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_ebpf_load' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:80:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(log, log_size)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 78| { # 79| void *res = realloc (ptr, size); # 80|-> if (UNLIKELY (res == NULL)) # 81| OOM (); # 82| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/ebpf.c:23: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'read_all_progs' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:80:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(progs, cur_size * 4)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 78| { # 79| void *res = realloc (ptr, size); # 80|-> if (UNLIKELY (res == NULL)) # 81| OOM (); # 82| return res; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'safe_readlinkat' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:80:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(tmp_buf, (long unsigned int)(buf_size + 1))' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 78| { # 79| void *res = realloc (ptr, size); # 80|-> if (UNLIKELY (res == NULL)) # 81| OOM (); # 82| return res; Error: GCC_ANALYZER_WARNING (CWE-415): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:89:3: warning[-Wanalyzer-double-free]: double-'free' of 'buffer' crun-1.15-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'safe_read_xattr' # 87| { # 88| void **pp = (void **) p; # 89|-> free (*pp); # 90| } # 91| Error: GCC_ANALYZER_WARNING (CWE-415): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:89:3: warning[-Wanalyzer-double-free]: double-'free' of 'entries' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'evict_cache' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'evict_cache' # 87| { # 88| void **pp = (void **) p; # 89|-> free (*pp); # 90| } # 91| Error: GCC_ANALYZER_WARNING (CWE-415): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:89:3: warning[-Wanalyzer-double-free]: double-'free' of 'log' crun-1.15-build/crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'libcrun_ebpf_load' # 87| { # 88| void **pp = (void **) p; # 89|-> free (*pp); # 90| } # 91| Error: GCC_ANALYZER_WARNING (CWE-415): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:89:3: warning[-Wanalyzer-double-free]: double-'free' of 'progs' crun-1.15-build/crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'read_all_progs' # 87| { # 88| void **pp = (void **) p; # 89|-> free (*pp); # 90| } # 91| Error: GCC_ANALYZER_WARNING (CWE-415): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:89:3: warning[-Wanalyzer-double-free]: double-'free' of 'tmp_buf' crun-1.15-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'safe_readlinkat' # 87| { # 88| void **pp = (void **) p; # 89|-> free (*pp); # 90| } # 91| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:89:3: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_restore' # 87| { # 88| void **pp = (void **) p; # 89|-> free (*pp); # 90| } # 91| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/error.h:42: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/container.h:24: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/cgroup.h:21: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/cgroup-setup.c:22: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '*(void *)p' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '<unknown>' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'cfd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'cgroup_dirfd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'console_socket_fd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'destdirfd' crun-1.15-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'destfd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd_cpuset' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd_htlb' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd_netclass' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd_netprio' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd1' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:5: note: in expansion of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd_cleanup' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'image_fd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'memfd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/seccomp.h:24: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'outfd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/tests/tests_libcrun_fuzzer.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:5: note: in expansion of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/tests/tests_libcrun_utils.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:5: note: in expansion of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd1' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:5: note: in expansion of macro 'TEMP_FAILURE_RETRY' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:39:32: note: in definition of macro 'TEMP_FAILURE_RETRY' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'root_fd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'rootfsfd_cleanup' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'signalfd' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'srcfd' crun-1.15-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'cleanup_closep.part.0' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'wfd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0' # 103| int *pp = (int *) p; # 104| if (*pp >= 0) # 105|-> TEMP_FAILURE_RETRY (close (*pp)); # 106| } # 107| Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_set_stdio' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:106:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ret' # 104| if (*pp >= 0) # 105| TEMP_FAILURE_RETRY (close (*pp)); # 106|-> } # 107| # 108| static inline void Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'close_and_reset' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:207:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'memfd' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 205| if (*fd >= 0) # 206| { # 207|-> ret = TEMP_FAILURE_RETRY (close (*fd)); # 208| if (LIKELY (ret == 0)) # 209| *fd = -1; Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:207:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'own_seccomp_receiver_fd' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset' # 205| if (*fd >= 0) # 206| { # 207|-> ret = TEMP_FAILURE_RETRY (close (*fd)); # 208| if (LIKELY (ret == 0)) # 209| *fd = -1; Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:207:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'seccomp_fd' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset' # 205| if (*fd >= 0) # 206| { # 207|-> ret = TEMP_FAILURE_RETRY (close (*fd)); # 208| if (LIKELY (ret == 0)) # 209| *fd = -1; Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'close_and_reset' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:207:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'seccomp_receiver_fd' # 205| if (*fd >= 0) # 206| { # 207|-> ret = TEMP_FAILURE_RETRY (close (*fd)); # 208| if (LIKELY (ret == 0)) # 209| *fd = -1; Error: GCC_ANALYZER_WARNING (CWE-1341): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:207:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'terminal_fd' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset' # 205| if (*fd >= 0) # 206| { # 207|-> ret = TEMP_FAILURE_RETRY (close (*fd)); # 208| if (LIKELY (ret == 0)) # 209| *fd = -1; Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_get_features' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup("1.0.0")' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup("1.1.0+dev")' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_get_containers_list' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(&*next.d_name)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_new_terminal' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(&buf)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'crun_command_exec' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*<unknown>)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'retrieve_mount_options' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*<unknown>.name)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_exec_with_options' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*_70->process.selinux_label)' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*_75->process.apparmor_profile)' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' crun-1.15-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_restore_linux_criu' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*status.bundle)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' crun-1.15-build/crun-HEAD/src/libcrun/criu.c:792:17: note: in expansion of macro 'YAJL_IS_ARRAY' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'compare_rdt_configurations' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(<unknown>)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(exec_options.apparmor)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(exec_options.process_label)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(executable_path)' crun-1.15-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'find_executable' crun-1.15-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'find_executable' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/cgroup-internal.h:22: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/cgroup-setup.c:23: included_from: Included from here. crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'read_unified_cgroup_pid' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(from)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'find_executable' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(getenv("PATH"))' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'check_cgroup_v2_controller_available_wrapper' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(name)' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:24: included_from: Included from here. # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(plugins)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'maybe_make_cgroup_threaded' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(t)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(value + 1)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'append_systemd_annotation' crun-1.15-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(value)' # 220| # 221| ret = strdup (str); # 222|-> if (ret == NULL) # 223| OOM (); # 224| Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/src/spec.c: scope_hint: In function 'crun_command_spec' crun-1.15-build/crun-HEAD/src/spec.c:126:7: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(<unknown>, "w+e")' # 124| } # 125| # 126|-> f = fopen (where, "w+e"); # 127| if (f == NULL) # 128| return libcrun_make_error (err, errno, "cannot open `%s`", where); Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/src/spec.c:126:7: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(<unknown>, "w+e")' # 124| } # 125| # 126|-> f = fopen (where, "w+e"); # 127| if (f == NULL) # 128| return libcrun_make_error (err, errno, "cannot open `%s`", where); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/tests/init.c: scope_hint: In function 'write_to' crun-1.15-build/crun-HEAD/tests/init.c:165:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path, 1)' # 163| error (EXIT_FAILURE, errno, "open `%s`", path); # 164| # 165|-> if (write (fd, str, strlen (str)) < 0) # 166| error (EXIT_FAILURE, errno, "write to `%s`", path); # 167| if (close (fd) < 0) Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/tests/init.c: scope_hint: In function 'check_idmapped_mounts' crun-1.15-build/crun-HEAD/tests/init.c:209:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&proc_path, 0)' crun-1.15-build/crun-HEAD/tests/init.c: scope_hint: In function 'check_idmapped_mounts' # 207| open_tree_fd = syscall_open_tree (-1, path, # 208| AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW | OPEN_TREE_CLOEXEC | OPEN_TREE_CLONE); # 209|-> if (open_tree_fd < 0) # 210| error (EXIT_FAILURE, errno, "open `%s`", path); # 211| Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/tests/init.c: scope_hint: In function 'cat' crun-1.15-build/crun-HEAD/tests/init.c:241:11: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(file, "rbe")' # 239| error (EXIT_FAILURE, errno, "fread"); # 240| } # 241|-> s = fwrite (buf, 1, s, stdout); # 242| if (s == 0) # 243| error (EXIT_FAILURE, errno, "fwrite"); Error: GCC_ANALYZER_WARNING (CWE-401): crun-1.15-build/crun-HEAD/tests/init.c:241:11: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(file, "rbe")' # 239| error (EXIT_FAILURE, errno, "fread"); # 240| } # 241|-> s = fwrite (buf, 1, s, stdout); # 242| if (s == 0) # 243| error (EXIT_FAILURE, errno, "fwrite"); Error: COMPILER_WARNING: crun-1.15-build/crun-HEAD/tests/init.c: scope_hint: In function 'main' crun-1.15-build/crun-HEAD/tests/init.c:305:3: warning[-Wstringop-truncation]: 'strncpy' specified bound 108 equals destination size # 305 | strncpy (notify_socket_unix_name.sun_path, notify_socket_name, # | ^ # 303| # 304| notify_socket_unix_name.sun_family = AF_UNIX; # 305|-> strncpy (notify_socket_unix_name.sun_path, notify_socket_name, # 306| sizeof (notify_socket_unix_name.sun_path)); # 307| Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/tests/init.c: scope_hint: In function 'main' crun-1.15-build/crun-HEAD/tests/init.c:627:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&path, 1)' # 625| error (EXIT_FAILURE, errno, "open `%s`", path); # 626| ret = write (fd, "1", 1); # 627|-> if (ret < 0) # 628| error (EXIT_FAILURE, errno, "open `%s`", path); # 629| close (fd); Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/tests/tests_libcrun_fuzzer.c: scope_hint: In function 'test_generate_ebpf' crun-1.15-build/crun-HEAD/tests/tests_libcrun_fuzzer.c:105:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/null", 1)' crun-1.15-build/crun-HEAD/tests/tests_libcrun_fuzzer.c: scope_hint: In function 'test_generate_ebpf' # 103| program = new_program; # 104| # 105|-> fd = open ("/dev/null", O_WRONLY); # 106| if (fd < 0) # 107| return 0; Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/tests/tests_libcrun_fuzzer.c: scope_hint: In function 'generate_seccomp' crun-1.15-build/crun-HEAD/tests/tests_libcrun_fuzzer.c:164:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/null", 1)' # 162| } # 163| # 164|-> outfd = open ("/dev/null", O_WRONLY); # 165| if (outfd < 0) # 166| return 0; Error: GCC_ANALYZER_WARNING (CWE-775): crun-1.15-build/crun-HEAD/tests/tests_libcrun_utils.c: scope_hint: In function 'test_send_receive_fd' crun-1.15-build/crun-HEAD/tests/tests_libcrun_utils.c:144:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'pipes[1]' # 142| } # 143| return 0; # 144|-> } # 145| # 146| static int