Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:50:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:29:26: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:122: error[memleak]: Memory leak: ret
#  120|           ret->second = strdup (src->second);
#  121|           if (ret->second == NULL)
#  122|->           return NULL;
#  123|         }
#  124|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:328:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  326|       while (0);
#  327|   
#  328|->     if (tree->type == yajl_t_object)
#  329|         {
#  330|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:328:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_basic_test_double_array(yajl_tree_parse(jsondata, & errbuf, 1024), ctx,  err)'
#  326|       while (0);
#  327|   
#  328|->     if (tree->type == yajl_t_object)
#  329|         {
#  330|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'free_basic_test_double_array'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:395:53: warning[-Wanalyzer-null-dereference]: dereference of NULL '*ptr.strarrays_item_lens + i * 8'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'free_basic_test_double_array'
#  393|             {
#  394|               size_t j;
#  395|->             for (j = 0; j < ptr->strarrays_item_lens[i]; j++)
#  396|                 {
#  397|                   free (ptr->strarrays[i][j]);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:675: error[memleak]: Memory leak: ret
#  673|           ret->strarrays = calloc (src->strarrays_len + 1, sizeof (*ret->strarrays));
#  674|           if (ret->strarrays == NULL)
#  675|->           return NULL;
#  676|           for (size_t i = 0; i < src->strarrays_len; i++)
#  677|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-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: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:214: error[memleak]: Memory leak: ret
#  212|           ret->item1 = strdup (src->item1);
#  213|           if (ret->item1 == NULL)
#  214|->           return NULL;
#  215|         }
#  216|       ret->item2 = src->item2;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-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.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:151:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:151:1: note: in expansion of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:159:18: warning[-Wanalyzer-malloc-leak]: leak of 'basic_test_top_array_int_container_parse_data(fread_file(stream, & filesize), ctx,  err)'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:151:1: note: in expansion of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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'
#  157|       struct parser_context tmp_ctx = { 0 };
#  158|   
#  159|->     if (jsondata == NULL || err == NULL)
#  160|         return NULL;
#  161|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c:152:18: warning[-Wanalyzer-malloc-leak]: leak of 'basic_test_top_array_string_container_parse_data(fread_file(stream, & filesize), ctx,  err)'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c:144:1: note: in expansion of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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'
#  150|       struct parser_context tmp_ctx = { 0 };
#  151|   
#  152|->     if (jsondata == NULL || err == NULL)
#  153|         return NULL;
#  154|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-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.20-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.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:174:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:182:18: warning[-Wanalyzer-malloc-leak]: leak of 'basic_test_top_double_array_int_container_parse_data(fread_file(stream, & filesize), ctx,  err)'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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'
#  180|       struct parser_context tmp_ctx = { 0 };
#  181|   
#  182|->     if (jsondata == NULL || err == NULL)
#  183|         return NULL;
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:158: error[memleak]: Memory leak: ret
#  156|           ret->third = strdup (src->third);
#  157|           if (ret->third == NULL)
#  158|->           return NULL;
#  159|         }
#  160|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:182: error[memleak]: Memory leak: ptr
#  180|       ptr->items = calloc (alen + 1, sizeof(*ptr->items));
#  181|       if (ptr->items == NULL)
#  182|->       return NULL;
#  183|       ptr->len = alen;
#  184|       ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t));

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:186: error[memleak]: Memory leak: ptr
#  184|       ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t));
#  185|       if (ptr->subitem_lens == NULL)
#  186|->       return NULL;
#  187|   
#  188|       for (i = 0; i < alen; i++)

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:220:44: warning[-Wanalyzer-null-dereference]: dereference of NULL '*ptr.subitem_lens + i * 8'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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'
#  218|         {
#  219|             size_t j;
#  220|->           for (j = 0; j < ptr->subitem_lens[i]; j++)
#  221|               {
#  222|                 free_basic_test_top_double_array_obj_element (ptr->items[i][j]);

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:222:15: warning[-Wanalyzer-null-dereference]: dereference of NULL '*<unknown> + j * 8'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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'
#  220|             for (j = 0; j < ptr->subitem_lens[i]; j++)
#  221|               {
#  222|->               free_basic_test_top_double_array_obj_element (ptr->items[i][j]);
#  223|                 ptr->items[i][j] = NULL;
#  224|               }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-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.20-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.20-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.20-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.20-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.20-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.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:166:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-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: CPPCHECK_WARNING (CWE-401):
crun-1.20-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.20-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.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:8: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:179:18: warning[-Wanalyzer-malloc-leak]: leak of 'basic_test_top_double_array_string_container_parse_data(fread_file(stream, & filesize), ctx,  err)'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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'
#  177|       struct parser_context tmp_ctx = { 0 };
#  178|   
#  179|->     if (jsondata == NULL || err == NULL)
#  180|         return NULL;
#  181|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:256: error[memleak]: Memory leak: ret
#  254|           ret->config = strdup (src->config);
#  255|           if (ret->config == NULL)
#  256|->           return NULL;
#  257|         }
#  258|       if (src->layers)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:263: error[memleak]: Memory leak: ret
#  261|           ret->layers = calloc (src->layers_len + 1, sizeof (*ret->layers));
#  262|           if (ret->layers == NULL)
#  263|->           return NULL;
#  264|           for (size_t i = 0; i < src->layers_len; i++)
#  265|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:318: error[memleak]: Memory leak: ptr
#  316|       ptr->items = calloc (alen + 1, sizeof(*ptr->items));
#  317|       if (ptr->items == NULL)
#  318|->       return NULL;
#  319|       ptr->len = alen;
#  320|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:182:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-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: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:491: error[memleak]: Memory leak: ret
#  489|           ret->user = strdup (src->user);
#  490|           if (ret->user == NULL)
#  491|->           return NULL;
#  492|         }
#  493|       if (src->exposed_ports)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:497: error[memleak]: Memory leak: ret
#  495|           ret->exposed_ports = calloc (1, sizeof (image_spec_schema_defs_map_string_object));
#  496|           if (ret->exposed_ports == NULL)
#  497|->             return NULL;
#  498|           ret->exposed_ports->len = src->exposed_ports->len;
#  499|           ret->exposed_ports->keys = calloc (src->exposed_ports->len + 1, sizeof (char *));

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:501: error[memleak]: Memory leak: ret
#  499|           ret->exposed_ports->keys = calloc (src->exposed_ports->len + 1, sizeof (char *));
#  500|           if (ret->exposed_ports->keys == NULL)
#  501|->             return NULL;
#  502|           ret->exposed_ports->values = calloc (src->exposed_ports->len + 1, sizeof (*ret->exposed_ports->values));
#  503|           if (ret->exposed_ports->values == NULL)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:504: error[memleak]: Memory leak: ret
#  502|           ret->exposed_ports->values = calloc (src->exposed_ports->len + 1, sizeof (*ret->exposed_ports->values));
#  503|           if (ret->exposed_ports->values == NULL)
#  504|->             return NULL;
#  505|           for (size_t i = 0; i < ret->exposed_ports->len; i++)
#  506|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:818: error[memleak]: Memory leak: ret
#  816|           ret->diff_ids = calloc (src->diff_ids_len + 1, sizeof (*ret->diff_ids));
#  817|           if (ret->diff_ids == NULL)
#  818|->           return NULL;
#  819|           for (size_t i = 0; i < src->diff_ids_len; i++)
#  820|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:904:38: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:855:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:903:32: note: in expansion of macro 'YAJL_IS_TRUE'
#  902|             {
#  903|               ret->empty_layer = YAJL_IS_TRUE(val);
#  904|->             ret->empty_layer_present = 1;
#  905|             }
#  906|           else

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1024: error[memleak]: Memory leak: ret
# 1022|           ret->created = strdup (src->created);
# 1023|           if (ret->created == NULL)
# 1024|->           return NULL;
# 1025|         }
# 1026|       if (src->author)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1030: error[memleak]: Memory leak: ret
# 1028|           ret->author = strdup (src->author);
# 1029|           if (ret->author == NULL)
# 1030|->           return NULL;
# 1031|         }
# 1032|       if (src->created_by)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1036: error[memleak]: Memory leak: ret
# 1034|           ret->created_by = strdup (src->created_by);
# 1035|           if (ret->created_by == NULL)
# 1036|->           return NULL;
# 1037|         }
# 1038|       if (src->comment)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1042: error[memleak]: Memory leak: ret
# 1040|           ret->comment = strdup (src->comment);
# 1041|           if (ret->comment == NULL)
# 1042|->           return NULL;
# 1043|         }
# 1044|       ret->empty_layer = src->empty_layer;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1499: error[memleak]: Memory leak: ret
# 1497|           ret->created = strdup (src->created);
# 1498|           if (ret->created == NULL)
# 1499|->           return NULL;
# 1500|         }
# 1501|       if (src->author)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1505: error[memleak]: Memory leak: ret
# 1503|           ret->author = strdup (src->author);
# 1504|           if (ret->author == NULL)
# 1505|->           return NULL;
# 1506|         }
# 1507|       if (src->architecture)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1511: error[memleak]: Memory leak: ret
# 1509|           ret->architecture = strdup (src->architecture);
# 1510|           if (ret->architecture == NULL)
# 1511|->           return NULL;
# 1512|         }
# 1513|       if (src->variant)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1517: error[memleak]: Memory leak: ret
# 1515|           ret->variant = strdup (src->variant);
# 1516|           if (ret->variant == NULL)
# 1517|->           return NULL;
# 1518|         }
# 1519|       if (src->os)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1523: error[memleak]: Memory leak: ret
# 1521|           ret->os = strdup (src->os);
# 1522|           if (ret->os == NULL)
# 1523|->           return NULL;
# 1524|         }
# 1525|       if (src->os_version)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1529: error[memleak]: Memory leak: ret
# 1527|           ret->os_version = strdup (src->os_version);
# 1528|           if (ret->os_version == NULL)
# 1529|->           return NULL;
# 1530|         }
# 1531|       if (src->os_features)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1536: error[memleak]: Memory leak: ret
# 1534|           ret->os_features = calloc (src->os_features_len + 1, sizeof (*ret->os_features));
# 1535|           if (ret->os_features == NULL)
# 1536|->           return NULL;
# 1537|           for (size_t i = 0; i < src->os_features_len; i++)
# 1538|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:151:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:370: error[memleak]: Memory leak: ret
#  368|           ret->media_type = strdup (src->media_type);
#  369|           if (ret->media_type == NULL)
#  370|->           return NULL;
#  371|         }
#  372|       ret->size = src->size;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:378: error[memleak]: Memory leak: ret
#  376|           ret->digest = strdup (src->digest);
#  377|           if (ret->digest == NULL)
#  378|->           return NULL;
#  379|         }
#  380|       if (src->urls)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:385: error[memleak]: Memory leak: ret
#  383|           ret->urls = calloc (src->urls_len + 1, sizeof (*ret->urls));
#  384|           if (ret->urls == NULL)
#  385|->           return NULL;
#  386|           for (size_t i = 0; i < src->urls_len; i++)
#  387|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:86: error[memleak]: Memory leak: ret
#   84|           ret->keys = calloc (len + 1, sizeof (*ret->keys));
#   85|           if (ret->keys == NULL)
#   86|->           return NULL;
#   87|           ret->values = calloc (len + 1, sizeof (*ret->values));
#   88|           if (ret->values == NULL)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:89: error[memleak]: Memory leak: ret
#   87|           ret->values = calloc (len + 1, sizeof (*ret->values));
#   88|           if (ret->values == NULL)
#   89|->           return NULL;
#   90|           for (i = 0; i < len; i++)
#   91|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:126:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:8: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:77:9: note: in expansion of macro 'YAJL_GET_OBJECT'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:77:9: note: in expansion of macro 'YAJL_GET_OBJECT'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c: scope_hint: In function 'free_image_spec_schema_defs_map_string_object'
#  124|           ptr->values = NULL;
#  125|         }
#  126|->     free (ptr);
#  127|   }
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:111:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:305: error[memleak]: Memory leak: ret
#  303|           ret->architecture = strdup (src->architecture);
#  304|           if (ret->architecture == NULL)
#  305|->           return NULL;
#  306|         }
#  307|       if (src->os)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:311: error[memleak]: Memory leak: ret
#  309|           ret->os = strdup (src->os);
#  310|           if (ret->os == NULL)
#  311|->           return NULL;
#  312|         }
#  313|       if (src->os_version)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:317: error[memleak]: Memory leak: ret
#  315|           ret->os_version = strdup (src->os_version);
#  316|           if (ret->os_version == NULL)
#  317|->           return NULL;
#  318|         }
#  319|       if (src->os_features)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:324: error[memleak]: Memory leak: ret
#  322|           ret->os_features = calloc (src->os_features_len + 1, sizeof (*ret->os_features));
#  323|           if (ret->os_features == NULL)
#  324|->           return NULL;
#  325|           for (size_t i = 0; i < src->os_features_len; i++)
#  326|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:603: error[memleak]: Memory leak: ret
#  601|           ret->media_type = strdup (src->media_type);
#  602|           if (ret->media_type == NULL)
#  603|->           return NULL;
#  604|         }
#  605|       ret->size = src->size;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:611: error[memleak]: Memory leak: ret
#  609|           ret->digest = strdup (src->digest);
#  610|           if (ret->digest == NULL)
#  611|->           return NULL;
#  612|         }
#  613|       if (src->urls)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:618: error[memleak]: Memory leak: ret
#  616|           ret->urls = calloc (src->urls_len + 1, sizeof (*ret->urls));
#  617|           if (ret->urls == NULL)
#  618|->           return NULL;
#  619|           for (size_t i = 0; i < src->urls_len; i++)
#  620|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:954: error[memleak]: Memory leak: ret
#  952|           ret->media_type = strdup (src->media_type);
#  953|           if (ret->media_type == NULL)
#  954|->           return NULL;
#  955|         }
#  956|       if (src->artifact_type)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:960: error[memleak]: Memory leak: ret
#  958|           ret->artifact_type = strdup (src->artifact_type);
#  959|           if (ret->artifact_type == NULL)
#  960|->           return NULL;
#  961|         }
#  962|       if (src->subject)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:966: error[memleak]: Memory leak: ret
#  964|           ret->subject = clone_image_spec_schema_content_descriptor (src->subject);
#  965|           if (ret->subject == NULL)
#  966|->           return NULL;
#  967|         }
#  968|       if (src->manifests)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:973: error[memleak]: Memory leak: ret
#  971|           ret->manifests = calloc (src->manifests_len + 1, sizeof (*ret->manifests));
#  972|           if (ret->manifests == NULL)
#  973|->           return NULL;
#  974|           for (size_t i = 0; i < src->manifests_len; i++)
#  975|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:43:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:152: error[memleak]: Memory leak: ret
#  150|           ret->image_layout_version = strdup (src->image_layout_version);
#  151|           if (ret->image_layout_version == NULL)
#  152|->           return NULL;
#  153|         }
#  154|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:181:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:181:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:349: error[memleak]: Memory leak: ret
#  347|           ret->media_type = strdup (src->media_type);
#  348|           if (ret->media_type == NULL)
#  349|->           return NULL;
#  350|         }
#  351|       if (src->artifact_type)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:355: error[memleak]: Memory leak: ret
#  353|           ret->artifact_type = strdup (src->artifact_type);
#  354|           if (ret->artifact_type == NULL)
#  355|->           return NULL;
#  356|         }
#  357|       if (src->config)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:361: error[memleak]: Memory leak: ret
#  359|           ret->config = clone_image_spec_schema_content_descriptor (src->config);
#  360|           if (ret->config == NULL)
#  361|->           return NULL;
#  362|         }
#  363|       if (src->subject)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:367: error[memleak]: Memory leak: ret
#  365|           ret->subject = clone_image_spec_schema_content_descriptor (src->subject);
#  366|           if (ret->subject == NULL)
#  367|->           return NULL;
#  368|         }
#  369|       if (src->layers)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:374: error[memleak]: Memory leak: ret
#  372|           ret->layers = calloc (src->layers_len + 1, sizeof (*ret->layers));
#  373|           if (ret->layers == NULL)
#  374|->           return NULL;
#  375|           for (size_t i = 0; i < src->layers_len; i++)
#  376|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:533: error[memleak]: Memory leak: ret
#  531|     if (ret->keys == NULL)
#  532|       {
#  533|->       return NULL;
#  534|       }
#  535|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:539: error[memleak]: Memory leak: ret
#  537|     if (ret->values == NULL)
#  538|       {
#  539|->       return NULL;
#  540|       }
#  541|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:611: error[memleak]: Memory leak: keys
#  609|     if (vals == NULL)
#  610|       {
#  611|->       return -1;
#  612|       }
#  613|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:713: error[memleak]: Memory leak: ret
#  711|     if (ret->keys == NULL)
#  712|       {
#  713|->       return NULL;
#  714|       }
#  715|     ret->values = calloc (len + 1, sizeof (bool));

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:718: error[memleak]: Memory leak: ret
#  716|     if (ret->values == NULL)
#  717|       {
#  718|->       return NULL;
#  719|       }
#  720|     for (i = 0; i < len; i++)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:782: error[memleak]: Memory leak: keys
#  780|     if (vals == NULL)
#  781|       {
#  782|->       return -1;
#  783|       }
#  784|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:888: error[memleak]: Memory leak: ret
#  886|     if (ret->keys == NULL)
#  887|       {
#  888|->       return NULL;
#  889|       }
#  890|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:894: error[memleak]: Memory leak: ret
#  892|     if (ret->values == NULL)
#  893|       {
#  894|->       return NULL;
#  895|       }
#  896|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1050: error[memleak]: Memory leak: ret
# 1048|       {
# 1049|         *(err) = strdup ("error allocating memory");
# 1050|->       return NULL;
# 1051|       }
# 1052|     ret->values = calloc (len + 1, sizeof (int));

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1056: error[memleak]: Memory leak: ret
# 1054|       {
# 1055|         *(err) = strdup ("error allocating memory");
# 1056|->       return NULL;
# 1057|       }
# 1058|     for (i = 0; i < len; i++)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1345: error[memleak]: Memory leak: ret
# 1343|     if (ret->keys == NULL)
# 1344|       {
# 1345|->       return NULL;
# 1346|       }
# 1347|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1351: error[memleak]: Memory leak: ret
# 1349|     if (ret->values == NULL)
# 1350|       {
# 1351|->       return NULL;
# 1352|       }
# 1353|     for (i = 0; i < len; i++)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1408: error[memleak]: Memory leak: keys
# 1406|     if (vals == NULL)
# 1407|       {
# 1408|->       return -1;
# 1409|       }
# 1410|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1414: error[memleak]: Memory leak: keys
# 1412|     if (new_value == NULL)
# 1413|       {
# 1414|->       return -1;
# 1415|       }
# 1416|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1414: error[memleak]: Memory leak: vals
# 1412|     if (new_value == NULL)
# 1413|       {
# 1414|->       return -1;
# 1415|       }
# 1416|   

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c: scope_hint: In function 'free_json_map_string_string.part.0'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1479:11: warning[-Wanalyzer-null-dereference]: dereference of NULL '*map.keys + i * 8'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:6: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c: scope_hint: In function 'free_json_map_string_string.part.0'
# 1477|         for (i = 0; i < map->len; i++)
# 1478|           {
# 1479|->           free (map->keys[i]);
# 1480|             map->keys[i] = NULL;
# 1481|             free (map->values[i]);

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1481:11: warning[-Wanalyzer-null-dereference]: dereference of NULL '*map.values + i * 8'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c: scope_hint: In function 'free_json_map_string_string.part.0'
# 1479|             free (map->keys[i]);
# 1480|             map->keys[i] = NULL;
# 1481|->           free (map->values[i]);
# 1482|             map->values[i] = NULL;
# 1483|           }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-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|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1528: error[memleak]: Memory leak: ret
# 1526|       {
# 1527|         *(err) = strdup ("error allocating memory");
# 1528|->       return NULL;
# 1529|       }
# 1530|     for (i = 0; i < len; i++)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1585: error[memleak]: Memory leak: ret
# 1583|     ret->keys = calloc (src->len + 1, sizeof (char *));
# 1584|     if (ret->keys == NULL)
# 1585|->     return NULL;
# 1586|   
# 1587|     ret->values = calloc (src->len + 1, sizeof (char *));

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.c:1589: error[memleak]: Memory leak: ret
# 1587|     ret->values = calloc (src->len + 1, sizeof (char *));
# 1588|     if (ret->values == NULL)
# 1589|->     return NULL;
# 1590|   
# 1591|     for (i = 0; i < src->len; i++)

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:322:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  320|       while (0);
#  321|   
#  322|->     if (tree->type == yajl_t_object)
#  323|         {
#  324|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:322:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_linux_resources_block_io(get_val(tree, "blockIO", 3), ctx,  err)'
#  320|       while (0);
#  321|   
#  322|->     if (tree->type == yajl_t_object)
#  323|         {
#  324|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'clone_runtime_spec_schema_config_linux_resources'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:633:22: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_linux_resources_block_io(*src.block_io)'
#  631|       if (ret == NULL)
#  632|         return NULL;
#  633|->     ret->weight = src->weight;
#  634|       ret->weight_present = src->weight_present;
#  635|       ret->leaf_weight = src->leaf_weight;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:642: error[memleak]: Memory leak: ret
#  640|           ret->throttle_read_bps_device = calloc (src->throttle_read_bps_device_len + 1, sizeof (*ret->throttle_read_bps_device));
#  641|           if (ret->throttle_read_bps_device == NULL)
#  642|->           return NULL;
#  643|           for (size_t i = 0; i < src->throttle_read_bps_device_len; i++)
#  644|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:689:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  687|             }
#  688|         }
#  689|->     if (src->weight_device)
#  690|         {
#  691|           ret->weight_device_len = src->weight_device_len;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1107:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_linux_resources_cpu(*src.cpu)'
# 1105|       if (ret == NULL)
# 1106|         return NULL;
# 1107|->     if (src->cpus)
# 1108|         {
# 1109|           ret->cpus = strdup (src->cpus);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1111: error[memleak]: Memory leak: ret
# 1109|           ret->cpus = strdup (src->cpus);
# 1110|           if (ret->cpus == NULL)
# 1111|->           return NULL;
# 1112|         }
# 1113|       if (src->mems)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1117: error[memleak]: Memory leak: ret
# 1115|           ret->mems = strdup (src->mems);
# 1116|           if (ret->mems == NULL)
# 1117|->           return NULL;
# 1118|         }
# 1119|       ret->period = src->period;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1132:23: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 1130|       ret->shares_present = src->shares_present;
# 1131|       ret->idle = src->idle;
# 1132|->     ret->idle_present = src->idle_present;
# 1133|       return move_ptr (ret);
# 1134|   }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1252: error[memleak]: Memory leak: ret
# 1250|           ret->page_size = strdup (src->page_size);
# 1251|           if (ret->page_size == NULL)
# 1252|->           return NULL;
# 1253|         }
# 1254|       ret->limit = src->limit;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1891:24: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_linux_resources_network(*src.network)'
# 1889|       if (ret == NULL)
# 1890|         return NULL;
# 1891|->     ret->class_id = src->class_id;
# 1892|       ret->class_id_present = src->class_id_present;
# 1893|       if (src->priorities)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1898: error[memleak]: Memory leak: ret
# 1896|           ret->priorities = calloc (src->priorities_len + 1, sizeof (*ret->priorities));
# 1897|           if (ret->priorities == NULL)
# 1898|->           return NULL;
# 1899|           for (size_t i = 0; i < src->priorities_len; i++)
# 1900|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1899:30: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 1897|           if (ret->priorities == NULL)
# 1898|             return NULL;
# 1899|->         for (size_t i = 0; i < src->priorities_len; i++)
# 1900|             {
# 1901|               ret->priorities[i] = clone_runtime_spec_schema_defs_linux_network_interface_priority (src->priorities[i]);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'clone_runtime_spec_schema_config_linux'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2325:20: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_linux_resources(*src.resources)'
# 2323|       if (ret == NULL)
# 2324|         return NULL;
# 2325|->     ret->unified = clone_map_string_string (src->unified);
# 2326|       if (ret->unified == NULL)
# 2327|           return NULL;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2327: error[memleak]: Memory leak: ret
# 2325|       ret->unified = clone_map_string_string (src->unified);
# 2326|       if (ret->unified == NULL)
# 2327|->         return NULL;
# 2328|       if (src->devices)
# 2329|         {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2333: error[memleak]: Memory leak: ret
# 2331|           ret->devices = calloc (src->devices_len + 1, sizeof (*ret->devices));
# 2332|           if (ret->devices == NULL)
# 2333|->           return NULL;
# 2334|           for (size_t i = 0; i < src->devices_len; i++)
# 2335|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2384:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 2382|             return NULL;
# 2383|         }
# 2384|->     if (src->rdma)
# 2385|         {
# 2386|           ret->rdma = clone_runtime_spec_schema_config_linux_resources_rdma (src->rdma);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2811:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_linux_seccomp(*src.seccomp)'
# 2809|       if (ret == NULL)
# 2810|         return NULL;
# 2811|->     if (src->default_action)
# 2812|         {
# 2813|           ret->default_action = strdup (src->default_action);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2815: error[memleak]: Memory leak: ret
# 2813|           ret->default_action = strdup (src->default_action);
# 2814|           if (ret->default_action == NULL)
# 2815|->           return NULL;
# 2816|         }
# 2817|       ret->default_errno_ret = src->default_errno_ret;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2824: error[memleak]: Memory leak: ret
# 2822|           ret->flags = calloc (src->flags_len + 1, sizeof (*ret->flags));
# 2823|           if (ret->flags == NULL)
# 2824|->           return NULL;
# 2825|           for (size_t i = 0; i < src->flags_len; i++)
# 2826|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2863:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 2861|             }
# 2862|         }
# 2863|->     if (src->syscalls)
# 2864|         {
# 2865|           ret->syscalls_len = src->syscalls_len;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3129:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_linux_intel_rdt(*src.intel_rdt)'
# 3127|       if (ret == NULL)
# 3128|         return NULL;
# 3129|->     if (src->clos_id)
# 3130|         {
# 3131|           ret->clos_id = strdup (src->clos_id);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3133: error[memleak]: Memory leak: ret
# 3131|           ret->clos_id = strdup (src->clos_id);
# 3132|           if (ret->clos_id == NULL)
# 3133|->           return NULL;
# 3134|         }
# 3135|       if (src->l3cache_schema)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3139: error[memleak]: Memory leak: ret
# 3137|           ret->l3cache_schema = strdup (src->l3cache_schema);
# 3138|           if (ret->l3cache_schema == NULL)
# 3139|->           return NULL;
# 3140|         }
# 3141|       if (src->mem_bw_schema)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3145: error[memleak]: Memory leak: ret
# 3143|           ret->mem_bw_schema = strdup (src->mem_bw_schema);
# 3144|           if (ret->mem_bw_schema == NULL)
# 3145|->           return NULL;
# 3146|         }
# 3147|       ret->enable_cmt = src->enable_cmt;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3150:29: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 3148|       ret->enable_cmt_present = src->enable_cmt_present;
# 3149|       ret->enable_mbm = src->enable_mbm;
# 3150|->     ret->enable_mbm_present = src->enable_mbm_present;
# 3151|       return move_ptr (ret);
# 3152|   }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3168: error[memleak]: Memory leak: ret
# 3166|       ret->boottime = make_runtime_spec_schema_defs_linux_time_offsets (get_val (tree, "boottime", yajl_t_object), ctx, err);
# 3167|       if (ret->boottime == NULL && *err != 0)
# 3168|->       return NULL;
# 3169|       ret->monotonic = make_runtime_spec_schema_defs_linux_time_offsets (get_val (tree, "monotonic", yajl_t_object), ctx, err);
# 3170|       if (ret->monotonic == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3171: error[memleak]: Memory leak: ret
# 3169|       ret->monotonic = make_runtime_spec_schema_defs_linux_time_offsets (get_val (tree, "monotonic", yajl_t_object), ctx, err);
# 3170|       if (ret->monotonic == NULL && *err != 0)
# 3171|->       return NULL;
# 3172|   
# 3173|       if (tree->type == yajl_t_object)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3184: error[memleak]: Memory leak: ret
# 3182|               resi = calloc (1, sizeof(*tree));
# 3183|               if (resi == NULL)
# 3184|->               return NULL;
# 3185|   
# 3186|               resi->type = yajl_t_object;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3191: error[memleak]: Memory leak: ret
# 3189|                 {
# 3190|                   yajl_tree_free (resi);
# 3191|->                 return NULL;
# 3192|                 }
# 3193|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3197: error[memleak]: Memory leak: ret
# 3195|                 {
# 3196|                   yajl_tree_free (resi);
# 3197|->                 return NULL;
# 3198|                 }
# 3199|             }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3293:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_linux_time_offsets(*src.time_offsets)'
# 3291|       if (ret == NULL)
# 3292|         return NULL;
# 3293|->     if (src->boottime)
# 3294|         {
# 3295|           ret->boottime = clone_runtime_spec_schema_defs_linux_time_offsets (src->boottime);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3297: error[memleak]: Memory leak: ret
# 3295|           ret->boottime = clone_runtime_spec_schema_defs_linux_time_offsets (src->boottime);
# 3296|           if (ret->boottime == NULL)
# 3297|->           return NULL;
# 3298|         }
# 3299|       if (src->monotonic)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3303: error[memleak]: Memory leak: ret
# 3301|           ret->monotonic = clone_runtime_spec_schema_defs_linux_time_offsets (src->monotonic);
# 3302|           if (ret->monotonic == NULL)
# 3303|->           return NULL;
# 3304|         }
# 3305|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3993: error[memleak]: Memory leak: ret
# 3991|           ret->devices = calloc (src->devices_len + 1, sizeof (*ret->devices));
# 3992|           if (ret->devices == NULL)
# 3993|->           return NULL;
# 3994|           for (size_t i = 0; i < src->devices_len; i++)
# 3995|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-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: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:486: error[memleak]: Memory leak: ret
#  484|           ret->prestart = calloc (src->prestart_len + 1, sizeof (*ret->prestart));
#  485|           if (ret->prestart == NULL)
#  486|->           return NULL;
#  487|           for (size_t i = 0; i < src->prestart_len; i++)
#  488|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:612:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:579:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:591:29: note: in expansion of macro 'YAJL_IS_TRUE'
#  610|         }
#  611|   
#  612|->     if (tree->type == yajl_t_object)
#  613|         {
#  614|           size_t i;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:735: error[memleak]: Memory leak: ret
#  733|           ret->path = strdup (src->path);
#  734|           if (ret->path == NULL)
#  735|->           return NULL;
#  736|         }
#  737|       ret->readonly = src->readonly;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:799:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_process_console_size(get_val(tree, "consoleSize", 3), ctx,  err)'
#  797|       while (0);
#  798|   
#  799|->     if (tree->type == yajl_t_object)
#  800|         {
#  801|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1048:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2785:29: note: in expansion of macro 'YAJL_IS_TRUE'
# 1046|       while (0);
# 1047|   
# 1048|->     if (tree->type == yajl_t_object)
# 1049|         {
# 1050|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1048:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_process_user(get_val(tree, "user", 3), ctx,  err)'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2785:29: note: in expansion of macro 'YAJL_IS_TRUE'
# 1046|       while (0);
# 1047|   
# 1048|->     if (tree->type == yajl_t_object)
# 1049|         {
# 1050|           size_t i;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1233: error[memleak]: Memory leak: ret
# 1231|           ret->additional_gids = calloc (src->additional_gids_len + 1, sizeof (*ret->additional_gids));
# 1232|           if (ret->additional_gids == NULL)
# 1233|->           return NULL;
# 1234|           for (size_t i = 0; i < src->additional_gids_len; i++)
# 1235|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1391:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2785:29: note: in expansion of macro 'YAJL_IS_TRUE'
# 1389|       while (0);
# 1390|   
# 1391|->     if (tree->type == yajl_t_object)
# 1392|         {
# 1393|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1391:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_schema_process_capabilities(get_val(tree, "capabilities", 3), ctx,  err)'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2785:29: note: in expansion of macro 'YAJL_IS_TRUE'
# 1389|       while (0);
# 1390|   
# 1391|->     if (tree->type == yajl_t_object)
# 1392|         {
# 1393|           size_t i;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1686: error[memleak]: Memory leak: ret
# 1684|           ret->bounding = calloc (src->bounding_len + 1, sizeof (*ret->bounding));
# 1685|           if (ret->bounding == NULL)
# 1686|->           return NULL;
# 1687|           for (size_t i = 0; i < src->bounding_len; i++)
# 1688|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1939: error[memleak]: Memory leak: ret
# 1937|           ret->_class = strdup (src->_class);
# 1938|           if (ret->_class == NULL)
# 1939|->           return NULL;
# 1940|         }
# 1941|       ret->priority = src->priority;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2327: error[memleak]: Memory leak: ret
# 2325|           ret->policy = strdup (src->policy);
# 2326|           if (ret->policy == NULL)
# 2327|->           return NULL;
# 2328|         }
# 2329|       ret->nice = src->nice;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2338: error[memleak]: Memory leak: ret
# 2336|           ret->flags = calloc (src->flags_len + 1, sizeof (*ret->flags));
# 2337|           if (ret->flags == NULL)
# 2338|->           return NULL;
# 2339|           for (size_t i = 0; i < src->flags_len; i++)
# 2340|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2512: error[memleak]: Memory leak: ret
# 2510|           ret->type = strdup (src->type);
# 2511|           if (ret->type == NULL)
# 2512|->           return NULL;
# 2513|         }
# 2514|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2678: error[memleak]: Memory leak: ret
# 2676|           ret->initial = strdup (src->initial);
# 2677|           if (ret->initial == NULL)
# 2678|->           return NULL;
# 2679|         }
# 2680|       if (src->final)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2684: error[memleak]: Memory leak: ret
# 2682|           ret->final = strdup (src->final);
# 2683|           if (ret->final == NULL)
# 2684|->           return NULL;
# 2685|         }
# 2686|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3313: error[memleak]: Memory leak: ret
# 3311|           ret->args = calloc (src->args_len + 1, sizeof (*ret->args));
# 3312|           if (ret->args == NULL)
# 3313|->           return NULL;
# 3314|           for (size_t i = 0; i < src->args_len; i++)
# 3315|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3851: error[memleak]: Memory leak: ret
# 3849|           ret->oci_version = strdup (src->oci_version);
# 3850|           if (ret->oci_version == NULL)
# 3851|->           return NULL;
# 3852|         }
# 3853|       if (src->hooks)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3857: error[memleak]: Memory leak: ret
# 3855|           ret->hooks = clone_runtime_spec_schema_config_schema_hooks (src->hooks);
# 3856|           if (ret->hooks == NULL)
# 3857|->           return NULL;
# 3858|         }
# 3859|       ret->annotations = clone_map_string_string (src->annotations);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3861: error[memleak]: Memory leak: ret
# 3859|       ret->annotations = clone_map_string_string (src->annotations);
# 3860|       if (ret->annotations == NULL)
# 3861|->         return NULL;
# 3862|       if (src->hostname)
# 3863|         {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3866: error[memleak]: Memory leak: ret
# 3864|           ret->hostname = strdup (src->hostname);
# 3865|           if (ret->hostname == NULL)
# 3866|->           return NULL;
# 3867|         }
# 3868|       if (src->domainname)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3872: error[memleak]: Memory leak: ret
# 3870|           ret->domainname = strdup (src->domainname);
# 3871|           if (ret->domainname == NULL)
# 3872|->           return NULL;
# 3873|         }
# 3874|       if (src->mounts)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3879: error[memleak]: Memory leak: ret
# 3877|           ret->mounts = calloc (src->mounts_len + 1, sizeof (*ret->mounts));
# 3878|           if (ret->mounts == NULL)
# 3879|->           return NULL;
# 3880|           for (size_t i = 0; i < src->mounts_len; i++)
# 3881|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'make_runtime_spec_schema_config_solaris'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'clone_runtime_spec_schema_config_solaris'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:142:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_solaris_capped_cpu(*src.capped_cpu)'
#  140|       if (ret == NULL)
#  141|         return NULL;
#  142|->     if (src->ncpus)
#  143|         {
#  144|           ret->ncpus = strdup (src->ncpus);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:145:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  143|         {
#  144|           ret->ncpus = strdup (src->ncpus);
#  145|->         if (ret->ncpus == NULL)
#  146|             return NULL;
#  147|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:146: error[memleak]: Memory leak: ret
#  144|           ret->ncpus = strdup (src->ncpus);
#  145|           if (ret->ncpus == NULL)
#  146|->           return NULL;
#  147|         }
#  148|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:188:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:168:25: note: in expansion of macro 'YAJL_GET_STRING'
#  186|       while (0);
#  187|   
#  188|->     if (tree->type == yajl_t_object)
#  189|         {
#  190|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:188:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_solaris_capped_memory(get_val(tree, "cappedMemory", 3), ctx,  err)'
#  186|       while (0);
#  187|   
#  188|->     if (tree->type == yajl_t_object)
#  189|         {
#  190|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'clone_runtime_spec_schema_config_solaris'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:308:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_solaris_capped_memory(*src.capped_memory)'
#  306|       if (ret == NULL)
#  307|         return NULL;
#  308|->     if (src->physical)
#  309|         {
#  310|           ret->physical = strdup (src->physical);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:312: error[memleak]: Memory leak: ret
#  310|           ret->physical = strdup (src->physical);
#  311|           if (ret->physical == NULL)
#  312|->           return NULL;
#  313|         }
#  314|       if (src->swap)

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:314:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  312|             return NULL;
#  313|         }
#  314|->     if (src->swap)
#  315|         {
#  316|           ret->swap = strdup (src->swap);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:317:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  315|         {
#  316|           ret->swap = strdup (src->swap);
#  317|->         if (ret->swap == NULL)
#  318|             return NULL;
#  319|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:318: error[memleak]: Memory leak: ret
#  316|           ret->swap = strdup (src->swap);
#  317|           if (ret->swap == NULL)
#  318|->           return NULL;
#  319|         }
#  320|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:410:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:340:25: note: in expansion of macro 'YAJL_GET_STRING'
#  408|         {
#  409|           yajl_val val = get_val (tree, "linkProtection", yajl_t_string);
#  410|->         if (val != NULL)
#  411|             {
#  412|               char *str = YAJL_GET_STRING (val);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:410:12: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_solaris_anet_element(val,  ctx,  err)'
#  408|         {
#  409|           yajl_val val = get_val (tree, "linkProtection", yajl_t_string);
#  410|->         if (val != NULL)
#  411|             {
#  412|               char *str = YAJL_GET_STRING (val);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:555: error[memleak]: Memory leak: ret
#  553|           ret->linkname = strdup (src->linkname);
#  554|           if (ret->linkname == NULL)
#  555|->           return NULL;
#  556|         }
#  557|       if (src->lower_link)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:561: error[memleak]: Memory leak: ret
#  559|           ret->lower_link = strdup (src->lower_link);
#  560|           if (ret->lower_link == NULL)
#  561|->           return NULL;
#  562|         }
#  563|       if (src->allowed_address)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:567: error[memleak]: Memory leak: ret
#  565|           ret->allowed_address = strdup (src->allowed_address);
#  566|           if (ret->allowed_address == NULL)
#  567|->           return NULL;
#  568|         }
#  569|       if (src->configure_allowed_address)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:573: error[memleak]: Memory leak: ret
#  571|           ret->configure_allowed_address = strdup (src->configure_allowed_address);
#  572|           if (ret->configure_allowed_address == NULL)
#  573|->           return NULL;
#  574|         }
#  575|       if (src->defrouter)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:579: error[memleak]: Memory leak: ret
#  577|           ret->defrouter = strdup (src->defrouter);
#  578|           if (ret->defrouter == NULL)
#  579|->           return NULL;
#  580|         }
#  581|       if (src->mac_address)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:585: error[memleak]: Memory leak: ret
#  583|           ret->mac_address = strdup (src->mac_address);
#  584|           if (ret->mac_address == NULL)
#  585|->           return NULL;
#  586|         }
#  587|       if (src->link_protection)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:591: error[memleak]: Memory leak: ret
#  589|           ret->link_protection = strdup (src->link_protection);
#  590|           if (ret->link_protection == NULL)
#  591|->           return NULL;
#  592|         }
#  593|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:881: error[memleak]: Memory leak: ret
#  879|           ret->milestone = strdup (src->milestone);
#  880|           if (ret->milestone == NULL)
#  881|->           return NULL;
#  882|         }
#  883|       if (src->limitpriv)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:887: error[memleak]: Memory leak: ret
#  885|           ret->limitpriv = strdup (src->limitpriv);
#  886|           if (ret->limitpriv == NULL)
#  887|->           return NULL;
#  888|         }
#  889|       if (src->max_shm_memory)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:893: error[memleak]: Memory leak: ret
#  891|           ret->max_shm_memory = strdup (src->max_shm_memory);
#  892|           if (ret->max_shm_memory == NULL)
#  893|->           return NULL;
#  894|         }
#  895|       if (src->capped_cpu)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:899: error[memleak]: Memory leak: ret
#  897|           ret->capped_cpu = clone_runtime_spec_schema_config_solaris_capped_cpu (src->capped_cpu);
#  898|           if (ret->capped_cpu == NULL)
#  899|->           return NULL;
#  900|         }
#  901|       if (src->capped_memory)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:905: error[memleak]: Memory leak: ret
#  903|           ret->capped_memory = clone_runtime_spec_schema_config_solaris_capped_memory (src->capped_memory);
#  904|           if (ret->capped_memory == NULL)
#  905|->           return NULL;
#  906|         }
#  907|       if (src->anet)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:912: error[memleak]: Memory leak: ret
#  910|           ret->anet = calloc (src->anet_len + 1, sizeof (*ret->anet));
#  911|           if (ret->anet == NULL)
#  912|->           return NULL;
#  913|           for (size_t i = 0; i < src->anet_len; i++)
#  914|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:69:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'clone_runtime_spec_schema_config_vm'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:214:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_vm_hypervisor(*src.hypervisor)'
#  212|       if (ret == NULL)
#  213|         return NULL;
#  214|->     if (src->path)
#  215|         {
#  216|           ret->path = strdup (src->path);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:218: error[memleak]: Memory leak: ret
#  216|           ret->path = strdup (src->path);
#  217|           if (ret->path == NULL)
#  218|->           return NULL;
#  219|         }
#  220|       if (src->parameters)

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:220:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  218|             return NULL;
#  219|         }
#  220|->     if (src->parameters)
#  221|         {
#  222|           ret->parameters_len = src->parameters_len;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:225: error[memleak]: Memory leak: ret
#  223|           ret->parameters = calloc (src->parameters_len + 1, sizeof (*ret->parameters));
#  224|           if (ret->parameters == NULL)
#  225|->           return NULL;
#  226|           for (size_t i = 0; i < src->parameters_len; i++)
#  227|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:226:30: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  224|           if (ret->parameters == NULL)
#  225|             return NULL;
#  226|->         for (size_t i = 0; i < src->parameters_len; i++)
#  227|             {
#  228|               if (src->parameters[i])

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:308:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:256:25: note: in expansion of macro 'YAJL_GET_STRING'
#  306|         }
#  307|   
#  308|->     if (tree->type == yajl_t_object)
#  309|         {
#  310|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'clone_runtime_spec_schema_config_vm'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:468:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_vm_kernel(*src.kernel)'
#  466|       if (ret == NULL)
#  467|         return NULL;
#  468|->     if (src->path)
#  469|         {
#  470|           ret->path = strdup (src->path);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:472: error[memleak]: Memory leak: ret
#  470|           ret->path = strdup (src->path);
#  471|           if (ret->path == NULL)
#  472|->           return NULL;
#  473|         }
#  474|       if (src->parameters)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:479: error[memleak]: Memory leak: ret
#  477|           ret->parameters = calloc (src->parameters_len + 1, sizeof (*ret->parameters));
#  478|           if (ret->parameters == NULL)
#  479|->           return NULL;
#  480|           for (size_t i = 0; i < src->parameters_len; i++)
#  481|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:490:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  488|             }
#  489|         }
#  490|->     if (src->initrd)
#  491|         {
#  492|           ret->initrd = strdup (src->initrd);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:668:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_vm_image(*src.image)'
#  666|       if (ret == NULL)
#  667|         return NULL;
#  668|->     if (src->path)
#  669|         {
#  670|           ret->path = strdup (src->path);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:672: error[memleak]: Memory leak: ret
#  670|           ret->path = strdup (src->path);
#  671|           if (ret->path == NULL)
#  672|->           return NULL;
#  673|         }
#  674|       if (src->format)

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:674:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  672|             return NULL;
#  673|         }
#  674|->     if (src->format)
#  675|         {
#  676|           ret->format = strdup (src->format);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:677:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  675|         {
#  676|           ret->format = strdup (src->format);
#  677|->         if (ret->format == NULL)
#  678|             return NULL;
#  679|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:678: error[memleak]: Memory leak: ret
#  676|           ret->format = strdup (src->format);
#  677|           if (ret->format == NULL)
#  678|->           return NULL;
#  679|         }
#  680|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:697: error[memleak]: Memory leak: ret
#  695|       ret->hypervisor = make_runtime_spec_schema_config_vm_hypervisor (get_val (tree, "hypervisor", yajl_t_object), ctx, err);
#  696|       if (ret->hypervisor == NULL && *err != 0)
#  697|->       return NULL;
#  698|       ret->kernel = make_runtime_spec_schema_config_vm_kernel (get_val (tree, "kernel", yajl_t_object), ctx, err);
#  699|       if (ret->kernel == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:700: error[memleak]: Memory leak: ret
#  698|       ret->kernel = make_runtime_spec_schema_config_vm_kernel (get_val (tree, "kernel", yajl_t_object), ctx, err);
#  699|       if (ret->kernel == NULL && *err != 0)
#  700|->       return NULL;
#  701|       ret->image = make_runtime_spec_schema_config_vm_image (get_val (tree, "image", yajl_t_object), ctx, err);
#  702|       if (ret->image == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:703: error[memleak]: Memory leak: ret
#  701|       ret->image = make_runtime_spec_schema_config_vm_image (get_val (tree, "image", yajl_t_object), ctx, err);
#  702|       if (ret->image == NULL && *err != 0)
#  703|->       return NULL;
#  704|       if (ret->kernel == NULL)
#  705|         {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:708: error[memleak]: Memory leak: ret
#  706|           if (asprintf (err, "Required field '%s' not present",  "kernel") < 0)
#  707|               *err = strdup ("error allocating memory");
#  708|->         return NULL;
#  709|         }
#  710|   

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:722: error[memleak]: Memory leak: ret
#  720|               resi = calloc (1, sizeof(*tree));
#  721|               if (resi == NULL)
#  722|->               return NULL;
#  723|   
#  724|               resi->type = yajl_t_object;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:729: error[memleak]: Memory leak: ret
#  727|                 {
#  728|                   yajl_tree_free (resi);
#  729|->                 return NULL;
#  730|                 }
#  731|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:735: error[memleak]: Memory leak: ret
#  733|                 {
#  734|                   yajl_tree_free (resi);
#  735|->                 return NULL;
#  736|                 }
#  737|             }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:850: error[memleak]: Memory leak: ret
#  848|           ret->hypervisor = clone_runtime_spec_schema_config_vm_hypervisor (src->hypervisor);
#  849|           if (ret->hypervisor == NULL)
#  850|->           return NULL;
#  851|         }
#  852|       if (src->kernel)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:856: error[memleak]: Memory leak: ret
#  854|           ret->kernel = clone_runtime_spec_schema_config_vm_kernel (src->kernel);
#  855|           if (ret->kernel == NULL)
#  856|->           return NULL;
#  857|         }
#  858|       if (src->image)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:862: error[memleak]: Memory leak: ret
#  860|           ret->image = clone_runtime_spec_schema_config_vm_image (src->image);
#  861|           if (ret->image == NULL)
#  862|->           return NULL;
#  863|         }
#  864|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:234:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_cpu(get_val(tree, "cpu", 3), ctx,  err)'
#  232|       while (0);
#  233|   
#  234|->     if (tree->type == yajl_t_object)
#  235|         {
#  236|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:282:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  280|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
#  281|   
#  282|->         if (ctx->options & OPT_PARSE_FULLKEY)
#  283|             ret->_residual = resi;
#  284|         }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:282:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
#  280|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
#  281|   
#  282|->         if (ctx->options & OPT_PARSE_FULLKEY)
#  283|             ret->_residual = resi;
#  284|         }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:451:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources_storage(get_val(tree, "storage", 3), ctx,  err)'
#  449|       while (0);
#  450|   
#  451|->     if (tree->type == yajl_t_object)
#  452|         {
#  453|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:499:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  497|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
#  498|   
#  499|->         if (ctx->options & OPT_PARSE_FULLKEY)
#  500|             ret->_residual = resi;
#  501|         }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:499:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
#  497|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
#  498|   
#  499|->         if (ctx->options & OPT_PARSE_FULLKEY)
#  500|             ret->_residual = resi;
#  501|         }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'make_runtime_spec_schema_config_windows'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:602:32: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_windows_resources(get_val(tree, "resources", 3), ctx,  err)'
#  600|         return NULL;
#  601|       ret->memory = make_runtime_spec_schema_config_windows_resources_memory (get_val (tree, "memory", yajl_t_object), ctx, err);
#  602|->     if (ret->memory == NULL && *err != 0)
#  603|         return NULL;
#  604|       ret->cpu = make_runtime_spec_schema_config_windows_resources_cpu (get_val (tree, "cpu", yajl_t_object), ctx, err);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:603: error[memleak]: Memory leak: ret
#  601|       ret->memory = make_runtime_spec_schema_config_windows_resources_memory (get_val (tree, "memory", yajl_t_object), ctx, err);
#  602|       if (ret->memory == NULL && *err != 0)
#  603|->       return NULL;
#  604|       ret->cpu = make_runtime_spec_schema_config_windows_resources_cpu (get_val (tree, "cpu", yajl_t_object), ctx, err);
#  605|       if (ret->cpu == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:606: error[memleak]: Memory leak: ret
#  604|       ret->cpu = make_runtime_spec_schema_config_windows_resources_cpu (get_val (tree, "cpu", yajl_t_object), ctx, err);
#  605|       if (ret->cpu == NULL && *err != 0)
#  606|->       return NULL;
#  607|       ret->storage = make_runtime_spec_schema_config_windows_resources_storage (get_val (tree, "storage", yajl_t_object), ctx, err);
#  608|       if (ret->storage == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:609: error[memleak]: Memory leak: ret
#  607|       ret->storage = make_runtime_spec_schema_config_windows_resources_storage (get_val (tree, "storage", yajl_t_object), ctx, err);
#  608|       if (ret->storage == NULL && *err != 0)
#  609|->       return NULL;
#  610|   
#  611|       if (tree->type == yajl_t_object)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:622: error[memleak]: Memory leak: ret
#  620|               resi = calloc (1, sizeof(*tree));
#  621|               if (resi == NULL)
#  622|->               return NULL;
#  623|   
#  624|               resi->type = yajl_t_object;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:629: error[memleak]: Memory leak: ret
#  627|                 {
#  628|                   yajl_tree_free (resi);
#  629|->                 return NULL;
#  630|                 }
#  631|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:635: error[memleak]: Memory leak: ret
#  633|                 {
#  634|                   yajl_tree_free (resi);
#  635|->                 return NULL;
#  636|                 }
#  637|             }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'clone_runtime_spec_schema_config_windows'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:746:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_windows_resources(*src.resources)'
#  744|       if (ret == NULL)
#  745|         return NULL;
#  746|->     if (src->memory)
#  747|         {
#  748|           ret->memory = clone_runtime_spec_schema_config_windows_resources_memory (src->memory);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:750: error[memleak]: Memory leak: ret
#  748|           ret->memory = clone_runtime_spec_schema_config_windows_resources_memory (src->memory);
#  749|           if (ret->memory == NULL)
#  750|->           return NULL;
#  751|         }
#  752|       if (src->cpu)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:756: error[memleak]: Memory leak: ret
#  754|           ret->cpu = clone_runtime_spec_schema_config_windows_resources_cpu (src->cpu);
#  755|           if (ret->cpu == NULL)
#  756|->           return NULL;
#  757|         }
#  758|       if (src->storage)

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:758:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  756|             return NULL;
#  757|         }
#  758|->     if (src->storage)
#  759|         {
#  760|           ret->storage = clone_runtime_spec_schema_config_windows_resources_storage (src->storage);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:761:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  759|         {
#  760|           ret->storage = clone_runtime_spec_schema_config_windows_resources_storage (src->storage);
#  761|->         if (ret->storage == NULL)
#  762|             return NULL;
#  763|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:762: error[memleak]: Memory leak: ret
#  760|           ret->storage = clone_runtime_spec_schema_config_windows_resources_storage (src->storage);
#  761|           if (ret->storage == NULL)
#  762|->           return NULL;
#  763|         }
#  764|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1089:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_windows_network(*src.network)'
# 1087|       if (ret == NULL)
# 1088|         return NULL;
# 1089|->     if (src->endpoint_list)
# 1090|         {
# 1091|           ret->endpoint_list_len = src->endpoint_list_len;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1094: error[memleak]: Memory leak: ret
# 1092|           ret->endpoint_list = calloc (src->endpoint_list_len + 1, sizeof (*ret->endpoint_list));
# 1093|           if (ret->endpoint_list == NULL)
# 1094|->           return NULL;
# 1095|           for (size_t i = 0; i < src->endpoint_list_len; i++)
# 1096|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1129:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 1127|             return NULL;
# 1128|         }
# 1129|->     if (src->network_namespace)
# 1130|         {
# 1131|           ret->network_namespace = strdup (src->network_namespace);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1321:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_windows_hyperv(*src.hyperv)'
# 1319|       if (ret == NULL)
# 1320|         return NULL;
# 1321|->     if (src->utility_vm_path)
# 1322|         {
# 1323|           ret->utility_vm_path = strdup (src->utility_vm_path);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1324:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 1322|         {
# 1323|           ret->utility_vm_path = strdup (src->utility_vm_path);
# 1324|->         if (ret->utility_vm_path == NULL)
# 1325|             return NULL;
# 1326|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1325: error[memleak]: Memory leak: ret
# 1323|           ret->utility_vm_path = strdup (src->utility_vm_path);
# 1324|           if (ret->utility_vm_path == NULL)
# 1325|->           return NULL;
# 1326|         }
# 1327|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1709: error[memleak]: Memory leak: ret
# 1707|           ret->layer_folders = calloc (src->layer_folders_len + 1, sizeof (*ret->layer_folders));
# 1708|           if (ret->layer_folders == NULL)
# 1709|->           return NULL;
# 1710|           for (size_t i = 0; i < src->layer_folders_len; i++)
# 1711|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c:181: error[memleak]: Memory leak: ret
#  179|           ret->devices = calloc (src->devices_len + 1, sizeof (*ret->devices));
#  180|           if (ret->devices == NULL)
#  181|->           return NULL;
#  182|           for (size_t i = 0; i < src->devices_len; i++)
#  183|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:319: error[memleak]: Memory leak: ret
#  317|           ret->path = strdup (src->path);
#  318|           if (ret->path == NULL)
#  319|->           return NULL;
#  320|         }
#  321|       if (src->args)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:326: error[memleak]: Memory leak: ret
#  324|           ret->args = calloc (src->args_len + 1, sizeof (*ret->args));
#  325|           if (ret->args == NULL)
#  326|->           return NULL;
#  327|           for (size_t i = 0; i < src->args_len; i++)
#  328|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'make_runtime_spec_schema_defs_mount'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:437:13: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_defs_id_mapping(val,  ctx,  err)'
#  435|       while (0);
#  436|   
#  437|->     if (tree->type == yajl_t_object)
#  438|         {
#  439|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'make_runtime_spec_schema_defs_id_mapping'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:485:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  483|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
#  484|   
#  485|->         if (ctx->options & OPT_PARSE_FULLKEY)
#  486|             ret->_residual = resi;
#  487|         }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:485:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
#  483|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
#  484|   
#  485|->         if (ctx->options & OPT_PARSE_FULLKEY)
#  486|             ret->_residual = resi;
#  487|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:957: error[memleak]: Memory leak: ret
#  955|           ret->source = strdup (src->source);
#  956|           if (ret->source == NULL)
#  957|->           return NULL;
#  958|         }
#  959|       if (src->destination)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:963: error[memleak]: Memory leak: ret
#  961|           ret->destination = strdup (src->destination);
#  962|           if (ret->destination == NULL)
#  963|->           return NULL;
#  964|         }
#  965|       if (src->options)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:970: error[memleak]: Memory leak: ret
#  968|           ret->options = calloc (src->options_len + 1, sizeof (*ret->options));
#  969|           if (ret->options == NULL)
#  970|->           return NULL;
#  971|           for (size_t i = 0; i < src->options_len; i++)
#  972|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:212: error[memleak]: Memory leak: ret
#  210|           ret->domain = strdup (src->domain);
#  211|           if (ret->domain == NULL)
#  212|->           return NULL;
#  213|         }
#  214|       if (src->flags)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:219: error[memleak]: Memory leak: ret
#  217|           ret->flags = calloc (src->flags_len + 1, sizeof (*ret->flags));
#  218|           if (ret->flags == NULL)
#  219|->           return NULL;
#  220|           for (size_t i = 0; i < src->flags_len; i++)
#  221|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:330:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:316:25: note: in expansion of macro 'YAJL_GET_STRING'
#  328|         }
#  329|   
#  330|->     if (tree->type == yajl_t_object)
#  331|         {
#  332|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:379:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:316:25: note: in expansion of macro 'YAJL_GET_STRING'
#  377|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
#  378|   
#  379|->         if (ctx->options & OPT_PARSE_FULLKEY)
#  380|             ret->_residual = resi;
#  381|         }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'clone_runtime_spec_schema_defs_linux_syscall'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:474:21: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_defs_linux_syscall_arg(*<unknown>)'
#  472|       if (ret == NULL)
#  473|         return NULL;
#  474|->     ret->index = src->index;
#  475|       ret->index_present = src->index_present;
#  476|       ret->value = src->value;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:483:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  481|         {
#  482|           ret->op = strdup (src->op);
#  483|->         if (ret->op == NULL)
#  484|             return NULL;
#  485|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:484: error[memleak]: Memory leak: ret
#  482|           ret->op = strdup (src->op);
#  483|           if (ret->op == NULL)
#  484|->           return NULL;
#  485|         }
#  486|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:798: error[memleak]: Memory leak: ret
#  796|           ret->names = calloc (src->names_len + 1, sizeof (*ret->names));
#  797|           if (ret->names == NULL)
#  798|->           return NULL;
#  799|           for (size_t i = 0; i < src->names_len; i++)
#  800|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1181: error[memleak]: Memory leak: ret
# 1179|           ret->type = strdup (src->type);
# 1180|           if (ret->type == NULL)
# 1181|->           return NULL;
# 1182|         }
# 1183|       if (src->path)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1187: error[memleak]: Memory leak: ret
# 1185|           ret->path = strdup (src->path);
# 1186|           if (ret->path == NULL)
# 1187|->           return NULL;
# 1188|         }
# 1189|       ret->file_mode = src->file_mode;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1306:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
# 1304|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
# 1305|   
# 1306|->         if (ctx->options & OPT_PARSE_FULLKEY)
# 1307|             ret->_residual = resi;
# 1308|         }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1532:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
# 1530|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
# 1531|   
# 1532|->         if (ctx->options & OPT_PARSE_FULLKEY)
# 1533|             ret->_residual = resi;
# 1534|         }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1763:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
# 1761|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
# 1762|   
# 1763|->         if (ctx->options & OPT_PARSE_FULLKEY)
# 1764|             ret->_residual = resi;
# 1765|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2119: error[memleak]: Memory leak: ret
# 2117|           ret->type = strdup (src->type);
# 2118|           if (ret->type == NULL)
# 2119|->           return NULL;
# 2120|         }
# 2121|       ret->major = src->major;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2129: error[memleak]: Memory leak: ret
# 2127|           ret->access = strdup (src->access);
# 2128|           if (ret->access == NULL)
# 2129|->           return NULL;
# 2130|         }
# 2131|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2234:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2151:25: note: in expansion of macro 'YAJL_GET_STRING'
# 2232|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
# 2233|   
# 2234|->         if (ctx->options & OPT_PARSE_FULLKEY)
# 2235|             ret->_residual = resi;
# 2236|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2309: error[memleak]: Memory leak: ret
# 2307|           ret->name = strdup (src->name);
# 2308|           if (ret->name == NULL)
# 2309|->           return NULL;
# 2310|         }
# 2311|       ret->priority = src->priority;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2420:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
# 2418|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
# 2419|   
# 2420|->         if (ctx->options & OPT_PARSE_FULLKEY)
# 2421|             ret->_residual = resi;
# 2422|         }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2586:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2513:25: note: in expansion of macro 'YAJL_GET_STRING'
# 2584|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
# 2585|   
# 2586|->         if (ctx->options & OPT_PARSE_FULLKEY)
# 2587|             ret->_residual = resi;
# 2588|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2663: error[memleak]: Memory leak: ret
# 2661|           ret->type = strdup (src->type);
# 2662|           if (ret->type == NULL)
# 2663|->           return NULL;
# 2664|         }
# 2665|       if (src->path)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2669: error[memleak]: Memory leak: ret
# 2667|           ret->path = strdup (src->path);
# 2668|           if (ret->path == NULL)
# 2669|->           return NULL;
# 2670|         }
# 2671|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2778:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
# 2776|             (void) fprintf (ctx->errfile, "WARNING: unknown key found\n");
# 2777|   
# 2778|->         if (ctx->options & OPT_PARSE_FULLKEY)
# 2779|             ret->_residual = resi;
# 2780|         }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:108:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:8: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:108:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:185: error[memleak]: Memory leak: ret
#  183|           ret->id = strdup (src->id);
#  184|           if (ret->id == NULL)
#  185|->           return NULL;
#  186|         }
#  187|       if (src->id_type)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:191: error[memleak]: Memory leak: ret
#  189|           ret->id_type = strdup (src->id_type);
#  190|           if (ret->id_type == NULL)
#  191|->           return NULL;
#  192|         }
#  193|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:360: error[memleak]: Memory leak: ret
#  358|           ret->path = strdup (src->path);
#  359|           if (ret->path == NULL)
#  360|->           return NULL;
#  361|         }
#  362|       if (src->type)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:366: error[memleak]: Memory leak: ret
#  364|           ret->type = strdup (src->type);
#  365|           if (ret->type == NULL)
#  366|->           return NULL;
#  367|         }
#  368|       ret->major = src->major;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'clone_runtime_spec_schema_features_linux'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:759:23: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_features_linux_seccomp(*src.seccomp)'
#  757|       if (ret == NULL)
#  758|         return NULL;
#  759|->     ret->enabled = src->enabled;
#  760|       ret->enabled_present = src->enabled_present;
#  761|       if (src->actions)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:766: error[memleak]: Memory leak: ret
#  764|           ret->actions = calloc (src->actions_len + 1, sizeof (*ret->actions));
#  765|           if (ret->actions == NULL)
#  766|->           return NULL;
#  767|           for (size_t i = 0; i < src->actions_len; i++)
#  768|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:825:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  823|             }
#  824|         }
#  825|->     if (src->supported_flags)
#  826|         {
#  827|           ret->supported_flags_len = src->supported_flags_len;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1422: error[memleak]: Memory leak: ret
# 1420|       ret->idmap = make_runtime_spec_schema_features_linux_mount_extensions_idmap (get_val (tree, "idmap", yajl_t_object), ctx, err);
# 1421|       if (ret->idmap == NULL && *err != 0)
# 1422|->       return NULL;
# 1423|   
# 1424|       if (tree->type == yajl_t_object)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1435: error[memleak]: Memory leak: ret
# 1433|               resi = calloc (1, sizeof(*tree));
# 1434|               if (resi == NULL)
# 1435|->               return NULL;
# 1436|   
# 1437|               resi->type = yajl_t_object;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1442: error[memleak]: Memory leak: ret
# 1440|                 {
# 1441|                   yajl_tree_free (resi);
# 1442|->                 return NULL;
# 1443|                 }
# 1444|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1448: error[memleak]: Memory leak: ret
# 1446|                 {
# 1447|                   yajl_tree_free (resi);
# 1448|->                 return NULL;
# 1449|                 }
# 1450|             }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1529:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_features_linux_mount_extensions(*src.mount_extensions)'
# 1527|       if (ret == NULL)
# 1528|         return NULL;
# 1529|->     if (src->idmap)
# 1530|         {
# 1531|           ret->idmap = clone_runtime_spec_schema_features_linux_mount_extensions_idmap (src->idmap);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1532:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 1530|         {
# 1531|           ret->idmap = clone_runtime_spec_schema_features_linux_mount_extensions_idmap (src->idmap);
# 1532|->         if (ret->idmap == NULL)
# 1533|             return NULL;
# 1534|         }

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1533: error[memleak]: Memory leak: ret
# 1531|           ret->idmap = clone_runtime_spec_schema_features_linux_mount_extensions_idmap (src->idmap);
# 1532|           if (ret->idmap == NULL)
# 1533|->           return NULL;
# 1534|         }
# 1535|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1886: error[memleak]: Memory leak: ret
# 1884|           ret->namespaces = calloc (src->namespaces_len + 1, sizeof (*ret->namespaces));
# 1885|           if (ret->namespaces == NULL)
# 1886|->           return NULL;
# 1887|           for (size_t i = 0; i < src->namespaces_len; i++)
# 1888|             {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:160:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c: scope_hint: In function 'make_runtime_spec_schema_features_schema'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:212:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:212:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:431: error[memleak]: Memory leak: ret
#  429|           ret->oci_version_min = strdup (src->oci_version_min);
#  430|           if (ret->oci_version_min == NULL)
#  431|->           return NULL;
#  432|         }
#  433|       if (src->oci_version_max)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:437: error[memleak]: Memory leak: ret
#  435|           ret->oci_version_max = strdup (src->oci_version_max);
#  436|           if (ret->oci_version_max == NULL)
#  437|->           return NULL;
#  438|         }
#  439|       if (src->hooks)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:444: error[memleak]: Memory leak: ret
#  442|           ret->hooks = calloc (src->hooks_len + 1, sizeof (*ret->hooks));
#  443|           if (ret->hooks == NULL)
#  444|->           return NULL;
#  445|           for (size_t i = 0; i < src->hooks_len; i++)
#  446|             {

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_state_schema.c:316: error[memleak]: Memory leak: ret
#  314|           ret->oci_version = strdup (src->oci_version);
#  315|           if (ret->oci_version == NULL)
#  316|->           return NULL;
#  317|         }
#  318|       if (src->id)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_state_schema.c:322: error[memleak]: Memory leak: ret
#  320|           ret->id = strdup (src->id);
#  321|           if (ret->id == NULL)
#  322|->           return NULL;
#  323|         }
#  324|       if (src->status)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_state_schema.c:328: error[memleak]: Memory leak: ret
#  326|           ret->status = strdup (src->status);
#  327|           if (ret->status == NULL)
#  328|->           return NULL;
#  329|         }
#  330|       ret->pid = src->pid;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_state_schema.c:336: error[memleak]: Memory leak: ret
#  334|           ret->bundle = strdup (src->bundle);
#  335|           if (ret->bundle == NULL)
#  336|->           return NULL;
#  337|         }
#  338|       ret->annotations = clone_map_string_string (src->annotations);

Error: CPPCHECK_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_state_schema.c:340: error[memleak]: Memory leak: ret
#  338|       ret->annotations = clone_map_string_string (src->annotations);
#  339|       if (ret->annotations == NULL)
#  340|->         return NULL;
#  341|       return move_ptr (ret);
#  342|   }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:48:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:48:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:855:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:855:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:903:32: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:855: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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:8: included_from: Included from here.
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:63:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:8: included_from: Included from here.
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:8: included_from: Included from here.
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:579:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:579:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:591:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:579: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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'make_runtime_spec_schema_config_solaris'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:340:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:340:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:340: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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:8: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'make_runtime_spec_schema_config_solaris'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:168:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:168:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:168: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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:8: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'make_runtime_spec_schema_config_vm'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'make_runtime_spec_schema_config_vm'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:256:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:256:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:256: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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:8: included_from: Included from here.
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:316:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:316:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:316: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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:8: included_from: Included from here.
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:41:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c: scope_hint: In function 'image_spec_schema_image_manifest_schema_parse_file_stream'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'image_spec_schema_image_manifest_schema_parse_data(fread_file(stream, & filesize), ctx,  err)'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:426:1: note: in expansion of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c: scope_hint: In function 'image_spec_schema_image_manifest_schema_parse_file_stream'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'basic_test_double_array_parse_data'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:142:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:142: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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:8: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'make_image_spec_schema_config_schema'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:42:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:167:33: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:8: included_from: Included from here.
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:8: included_from: Included from here.
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:214:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:214: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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:8: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'make_runtime_spec_schema_config_schema'
crun-1.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:27:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1263:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2785:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1263: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.20-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.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1003:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2785:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1003: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.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:63:26: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:63:26: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:261:1: note: in expansion of macro 'define_cleaner_function'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:8: included_from: Included from here.
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:63:26: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:63:26: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:8: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'make_basic_test_double_array'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:29:26: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:29:26: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:8: included_from: Included from here.
crun-1.20-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.20-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.20-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.20-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.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:167:33: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:167:33: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-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.20-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.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:903:32: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:903:32: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:903: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.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:8: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'make_runtime_spec_schema_features_linux'
crun-1.20-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.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:29:23: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:29:23: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:48:23: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:67:28: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:86:33: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:105:25: note: in expansion of macro 'YAJL_IS_TRUE'
crun-1.20-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: CPPCHECK_WARNING (CWE-457):
crun-1.20-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.20-build/crun-HEAD/src/libcrun/cgroup-cgroupfs.c: scope_hint: In function 'libcrun_precreate_cgroup_cgroupfs'
crun-1.20-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.20-build/crun-HEAD/src/libcrun/cgroup-resources.c:153:12: warning[-Wanalyzer-null-argument]: use of NULL 'controllers' where non-null expected
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'check_cgroup_v2_controller_available_wrapper'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-resources.c:325:16: note: in expansion of macro 'crun_make_error'
<built-in>: note: argument 1 of '__builtin_strchr' must be non-null
#  151|         key = xstrdup (name);
#  152|   
#  153|->       it = strchr (key, '.');
#  154|         if (it == NULL)
#  155|           {

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'update_cgroup_v2_resources'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-resources.c:1311:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(cgroup_path, 589824)'
# 1309|       return ret;
# 1310|   
# 1311|->   cgroup_dirfd = open (cgroup_path, O_DIRECTORY | O_CLOEXEC);
# 1312|     if (UNLIKELY (cgroup_dirfd < 0))
# 1313|       return crun_make_error (err, errno, "open `%s`", cgroup_path);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'initialize_cpuset_subsystem_rec'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-setup.c:53:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path, 2686976)'
#   51|     int b_len;
#   52|   
#   53|->   dirfd = open (path, O_DIRECTORY | O_PATH | 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.20-build/crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'initialize_cpuset_subsystem'
crun-1.20-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.20-build/crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'enter_cgroup_v2'
crun-1.20-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.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-setup.c:309:12: note: in expansion of macro 'crun_make_error'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.h:7: included_from: Included from here.
crun-1.20-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-401):
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'enter_cgroup_v2'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-setup.c:490:1: warning[-Wanalyzer-malloc-leak]: leak of 'cgroup_crun_exec_path'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-internal.h:22: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-setup.c:23: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  488|       }
#  489|     return ret;
#  490|-> }
#  491|   
#  492|   int

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'libcrun_get_cgroup_dirfd'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c:968:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path_to_cgroup, 2818048)'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'libcrun_get_cgroup_dirfd'
#  966|       return ret;
#  967|   
#  968|->   cgroupdirfd = open (path_to_cgroup, O_CLOEXEC | O_NOFOLLOW | O_DIRECTORY | O_PATH);
#  969|     if (UNLIKELY (cgroupdirfd < 0))
#  970|       return crun_make_error (err, errno, "open `%s`", path_to_cgroup);

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_cgroup_destroy'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.c:208:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cgroup_manager'
#  206|       return ret;
#  207|   
#  208|->   return cgroup_manager->destroy_cgroup (cgroup_status, err);
#  209|   }
#  210|   

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_update_cgroup_resources'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.c:224:21: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cgroup_manager'
#  222|       return ret;
#  223|   
#  224|->   if (cgroup_manager->update_resources)
#  225|       {
#  226|         ret = cgroup_manager->update_resources (cgroup_status, state_root, resources, err);

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_cgroup_preenter'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.c:282:21: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cgroup_manager'
#  280|       return ret;
#  281|   
#  282|->   if (cgroup_manager->precreate_cgroup == NULL)
#  283|       return 0;
#  284|   

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_cgroup_enter'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.c:323:23: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cgroup_manager'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-internal.h:22: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.c:24: included_from: Included from here.
#  321|     status->manager = args->manager;
#  322|   
#  323|->   ret = cgroup_manager->create_cgroup (args, status, err);
#  324|     if (UNLIKELY (ret < 0))
#  325|       {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/cloned_binary.c: scope_hint: In function 'fetchve'
crun-1.20-build/crun-HEAD/src/libcrun/cloned_binary.c:191:40: warning[-Wanalyzer-malloc-leak]: leak of 'read_file("/proc/self/cmdline", &cmdline_size)'
crun-1.20-build/crun-HEAD/src/libcrun/cloned_binary.c:61: included_from: Included from here.
#  189|   			break;
#  190|   
#  191|-> 		copy = xrealloc(copy, (*length + n) * sizeof(*copy));
#  192|   		memcpy(copy + *length, buf, n);
#  193|   		*length += n;

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/cloned_binary.c: scope_hint: In function 'parse_xargs'
crun-1.20-build/crun-HEAD/src/libcrun/cloned_binary.c:223:24: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
#  221|   		cur += strlen(cur) + 1;
#  222|   	}
#  223|-> 	(*output)[num] = NULL;
#  224|   	return num;
#  225|   }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_load_from_file'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:553:10: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  551|       container->config_file_content = xstrdup (config);
#  552|   
#  553|->   return container;
#  554|   }
#  555|   

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'container_delete_internal'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:1735:15: warning[-Wanalyzer-null-dereference]: dereference of NULL 'container'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:579:7: note: in expansion of macro 'crun_make_error'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:1616:12: note: in expansion of macro 'crun_make_error'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:579:7: note: in expansion of macro 'crun_make_error'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:1616:12: note: in expansion of macro 'crun_make_error'
# 1733|               return ret;
# 1734|   
# 1735|->           def = container->container_def;
# 1736|           }
# 1737|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'exec_process_entrypoint'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:3524:23: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd1'
# 3522|   
# 3523|     TEMP_FAILURE_RETRY (write (pipefd1, "0", 1));
# 3524|->   TEMP_FAILURE_RETRY (close (pipefd1));
# 3525|     pipefd1 = -1;
# 3526|   

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:3693:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'process'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
# 3691|   
# 3692|     /* This must be done before we enter a user namespace.  */
# 3693|->   ret = libcrun_set_rlimits (process->rlimits, process->rlimits_len, err);
# 3694|     if (UNLIKELY (ret < 0))
# 3695|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/container.c:3708:32: warning[-Wanalyzer-malloc-leak]: leak of '*process.selinux_label'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
# 3706|       {
# 3707|         if (process->selinux_label == NULL && container->container_def->process->selinux_label)
# 3708|->         process->selinux_label = xstrdup (container->container_def->process->selinux_label);
# 3709|   
# 3710|         if (process->apparmor_profile == NULL && container->container_def->process->apparmor_profile)

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/container.c:3711:35: warning[-Wanalyzer-malloc-leak]: leak of '*process.apparmor_profile'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
# 3709|   
# 3710|         if (process->apparmor_profile == NULL && container->container_def->process->apparmor_profile)
# 3711|->         process->apparmor_profile = xstrdup (container->container_def->process->apparmor_profile);
# 3712|   
# 3713|         if (process->user == NULL && container->container_def->process->user)

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/container.c:3737:27: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd0'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
# 3735|     if (pid == 0)
# 3736|       {
# 3737|->       TEMP_FAILURE_RETRY (close (pipefd0));
# 3738|         pipefd0 = -1;
# 3739|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/container.c:3748:23: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd1'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
# 3746|       }
# 3747|   
# 3748|->   TEMP_FAILURE_RETRY (close (pipefd1));
# 3749|     pipefd1 = -1;
# 3750|   

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'restore_cgroup_v1_mount'
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:300:22: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  298|         subsystem = strchr (from, ':') + 1;
#  299|         subpath = strchr (subsystem, ':') + 1;
#  300|->       *(subpath - 1) = '\0';
#  301|   
#  302|         if (subsystem[0] == '\0')

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:302:20: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  300|         *(subpath - 1) = '\0';
#  301|   
#  302|->       if (subsystem[0] == '\0')
#  303|           continue;
#  304|   

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'checkpoint_cgroup_v1_mount'
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:369:22: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  367|         subsystem = strchr (from, ':') + 1;
#  368|         subpath = strchr (subsystem, ':') + 1;
#  369|->       *(subpath - 1) = '\0';
#  370|   
#  371|         if (subsystem[0] == '\0')

Error: GCC_ANALYZER_WARNING (CWE-476):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:371:20: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  369|         *(subpath - 1) = '\0';
#  370|   
#  371|->       if (subsystem[0] == '\0')
#  372|           continue;
#  373|   

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'libcrun_container_checkpoint_linux_criu'
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:448:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(*cr_options.image_path, 589824)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  446|       return crun_make_error (err, errno, "error creating checkpoint directory `%s`", cr_options->image_path);
#  447|   
#  448|->   image_fd = open (cr_options->image_path, O_DIRECTORY | O_CLOEXEC);
#  449|     if (UNLIKELY (image_fd == -1))
#  450|       return crun_make_error (err, errno, "error opening checkpoint directory `%s`", cr_options->image_path);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:468:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(*cr_options.work_path, 589824)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  466|     if (cr_options->work_path != NULL)
#  467|       {
#  468|->       work_fd = open (cr_options->work_path, O_DIRECTORY | O_CLOEXEC);
#  469|         if (UNLIKELY (work_fd == -1))
#  470|           return crun_make_error (err, errno, "error opening CRIU work directory `%s`", cr_options->work_path);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'prepare_restore_mounts'
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:733:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(root, 524288)'
#  731|           }
#  732|   
#  733|->       root_fd = open (root, O_RDONLY | O_CLOEXEC);
#  734|         if (UNLIKELY (root_fd == -1))
#  735|           return crun_make_error (err, errno, "error opening container root directory `%s`", root);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'libcrun_container_restore_linux_criu'
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:791:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(*cr_options.image_path, 589824)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  789|       return crun_make_error (err, 0, "image path not set");
#  790|   
#  791|->   image_fd = open (cr_options->image_path, O_DIRECTORY | O_CLOEXEC);
#  792|     if (UNLIKELY (image_fd == -1))
#  793|       return crun_make_error (err, errno, "error opening checkpoint directory `%s`", cr_options->image_path);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:847:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(*cr_options.work_path, 589824)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:822:17: note: in expansion of macro 'YAJL_IS_ARRAY'
#  845|     if (cr_options->work_path != NULL)
#  846|       {
#  847|->       work_fd = open (cr_options->work_path, O_DIRECTORY | O_CLOEXEC);
#  848|         if (UNLIKELY (work_fd == -1))
#  849|           return crun_make_error (err, errno, "error opening CRIU work directory `%s`", cr_options->work_path);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:956:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(**_163.path, 0)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:822:17: note: in expansion of macro 'YAJL_IS_ARRAY'
#  954|         if (value == CLONE_NEWNET && def->linux->namespaces[i]->path != NULL)
#  955|           {
#  956|->           inherit_new_net_fd = open (def->linux->namespaces[i]->path, open_flags_for_inherit);
#  957|             if (UNLIKELY (inherit_new_net_fd < 0))
#  958|               return crun_make_error (err, errno, "unable to open(): `%s`", def->linux->namespaces[i]->path);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:967:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(**_184.path, 0)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:822:17: note: in expansion of macro 'YAJL_IS_ARRAY'
#  965|         if (value == CLONE_NEWPID && def->linux->namespaces[i]->path != NULL)
#  966|           {
#  967|->           inherit_new_pid_fd = open (def->linux->namespaces[i]->path, open_flags_for_inherit);
#  968|             if (UNLIKELY (inherit_new_pid_fd < 0))
#  969|               return crun_make_error (err, errno, "unable to open(): `%s`", def->linux->namespaces[i]->path);

Error: GCC_ANALYZER_WARNING (CWE-835):
crun-1.20-build/crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'read_all_progs'
crun-1.20-build/crun-HEAD/src/libcrun/ebpf.c:294:18: warning[-Wanalyzer-infinite-loop]: infinite loop
crun-1.20-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-457):
crun-1.20-build/crun-HEAD/src/libcrun/error.c: scope_hint: In function 'log_write_to_syslog'
crun-1.20-build/crun-HEAD/src/libcrun/error.c:308:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'priority'
#  306|       }
#  307|     if (errno_ == 0)
#  308|->     syslog (priority, "%s", msg);
#  309|     else
#  310|       syslog (priority, "%s: %s", msg, strerror (errno_));

Error: GCC_ANALYZER_WARNING (CWE-457):
crun-1.20-build/crun-HEAD/src/libcrun/error.c:310:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'priority'
#  308|       syslog (priority, "%s", msg);
#  309|     else
#  310|->     syslog (priority, "%s: %s", msg, strerror (errno_));
#  311|   }
#  312|   

Error: GCC_ANALYZER_WARNING (CWE-457):
crun-1.20-build/crun-HEAD/src/libcrun/error.c: scope_hint: In function 'make_json_error'
crun-1.20-build/crun-HEAD/src/libcrun/error.c:407:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'level'
#  405|   
#  406|     yajl_gen_string (gen, YAJL_STR ("level"), strlen ("level"));
#  407|->   yajl_gen_string (gen, YAJL_STR (level), strlen (level));
#  408|   
#  409|     yajl_gen_string (gen, YAJL_STR ("time"), strlen ("time"));

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/handlers/krun.c: scope_hint: In function 'libkrun_configure_container'
crun-1.20-build/crun-HEAD/src/libcrun/handlers/krun.c:188:37: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(rootfs, 2621440)'
#  186|     else
#  187|       {
#  188|->       rootfsfd = rootfsfd_cleanup = open (rootfs, O_PATH | O_CLOEXEC);
#  189|         if (UNLIKELY (rootfsfd < 0))
#  190|           return crun_make_error (err, errno, "open `%s`", rootfs);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/intelrdt.c: scope_hint: In function 'resctl_update'
crun-1.20-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.20-build/crun-HEAD/src/libcrun/linux.c:3654: error[uninitvar]: Uninitialized variable: code
# 3652|         if (UNLIKELY (ret < 0))
# 3653|           return false;
# 3654|->       *error = code;
# 3655|       }
# 3656|   

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c:462:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open_rundir_dirfd(*container_44->context.state_root,  err)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  460|   
#  461|     ret = libcrun_get_state_directory (&dir, state_root, NULL, err);
#  462|->   if (UNLIKELY (ret < 0))
#  463|       return ret;
#  464|   

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'libcrun_open_seccomp_bpf'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c:462:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open_rundir_dirfd(*container_50->context.state_root,  err)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'libcrun_open_seccomp_bpf'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  460|   
#  461|     ret = libcrun_get_state_directory (&dir, state_root, NULL, err);
#  462|->   if (UNLIKELY (ret < 0))
#  463|       return ret;
#  464|   

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'open_rundir_dirfd'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c:465:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(dir, 2686976)'
#  463|       return ret;
#  464|   
#  465|->   dirfd = TEMP_FAILURE_RETRY (open (dir, O_PATH | O_DIRECTORY | O_CLOEXEC));
#  466|     if (UNLIKELY (dirfd < 0))
#  467|       return crun_make_error (err, errno, "open `%s`", dir);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c:466:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor '<unknown>'
#  464|   
#  465|     dirfd = TEMP_FAILURE_RETRY (open (dir, O_PATH | O_DIRECTORY | O_CLOEXEC));
#  466|->   if (UNLIKELY (dirfd < 0))
#  467|       return crun_make_error (err, errno, "open `%s`", dir);
#  468|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'evict_cache'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c:523:11: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(cache_dir_fd)'
#  521|         int dfd;
#  522|   
#  523|->       d = fdopendir (cache_dir_fd);
#  524|         if (d == NULL)
#  525|           return crun_make_error (err, errno, "cannot open seccomp cache directory");

Error: GCC_ANALYZER_WARNING (CWE-688):
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c:563:7: warning[-Wanalyzer-null-argument]: use of NULL 'entries' where non-null expected
crun-1.20-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
#  561|           }
#  562|   
#  563|->       qsort (entries, n_entries, sizeof (struct cache_entry), compare_entries_by_atime);
#  564|   
#  565|         /* Attempt to delete half of them.  */

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'get_run_directory'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:86:1: warning[-Wanalyzer-malloc-leak]: leak of 'root'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:22: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'get_run_directory'
#   84|   
#   85|     return 0;
#   86|-> }
#   87|   
#   88|   int

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'read_pid_stat'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:147:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&pid_stat_file, 524288)'
#  145|     sprintf (pid_stat_file, "/proc/%d/stat", pid);
#  146|   
#  147|->   fd = open (pid_stat_file, O_RDONLY | O_CLOEXEC);
#  148|     if (fd < 0)
#  149|       {

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'rmdirfd'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:512:7: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(fd)'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
#  510|     __attribute__ ((unused)) cleanup_close int fd_cleanup = fd;
#  511|   
#  512|->   d = fdopendir (fd);
#  513|     if (d == NULL)
#  514|       return crun_make_error (err, errno, "cannot open directory `%s`", namedir);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_container_delete_status'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:578:36: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(dir, 2686976)'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
#  576|       return ret;
#  577|   
#  578|->   rundir_dfd = TEMP_FAILURE_RETRY (open (dir, O_DIRECTORY | O_PATH | O_CLOEXEC));
#  579|     if (UNLIKELY (rundir_dfd < 0))
#  580|       return crun_make_error (err, errno, "cannot open run directory `%s`", dir);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_container_delete_status'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:599:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'rundir_dfd'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-1.20-build/crun-HEAD/src/libcrun/error.h:42: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/status.h:24: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/status.c:21: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:24: included_from: Included from here.
#  597|   
#  598|     return 0;
#  599|-> }
#  600|   
#  601|   void

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_get_containers_list'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:631:9: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(root)'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
#  629|       return ret;
#  630|   
#  631|->   dir = opendir (root);
#  632|     if (UNLIKELY (dir == NULL))
#  633|       return crun_make_error (err, errno, "cannot opendir `%s`", root);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_status_create_exec_fifo'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:746:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(fifo_path, 526336)'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:107:3: note: in expansion of macro 'STEAL_POINTER'
#  744|       return crun_make_error (err, errno, "mkfifo");
#  745|   
#  746|->   fd = open (fifo_path, O_NONBLOCK | O_CLOEXEC);
#  747|     if (UNLIKELY (fd < 0))
#  748|       return crun_make_error (err, errno, "cannot open pipe `%s`", fifo_path);

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_status_write_exec_fifo'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:772:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(fifo_path, 524289)'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:107:3: note: in expansion of macro 'STEAL_POINTER'
#  770|       return ret;
#  771|   
#  772|->   fd = open (fifo_path, O_WRONLY | O_CLOEXEC);
#  773|     if (UNLIKELY (fd < 0))
#  774|       return crun_make_error (err, errno, "cannot open `%s`", fifo_path);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'copy_recursive_fd_to_fd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c:2085:12: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(srcdirfd)'
# 2083|     struct dirent *de;
# 2084|   
# 2085|->   dsrcfd = fdopendir (srcdirfd);
# 2086|     if (UNLIKELY (dsrcfd == NULL))
# 2087|       {

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.c:2088:27: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'srcdirfd'
# 2086|     if (UNLIKELY (dsrcfd == NULL))
# 2087|       {
# 2088|->       TEMP_FAILURE_RETRY (close (srcdirfd));
# 2089|         return crun_make_error (err, errno, "cannot open directory `%s`", destname);
# 2090|       }

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.c:2132:31: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'destfd'
# 2130|   #endif
# 2131|   
# 2132|->           TEMP_FAILURE_RETRY (close (destfd));
# 2133|             destfd = -1;
# 2134|             break;

Error: GCC_ANALYZER_WARNING (CWE-688):
crun-1.20-build/crun-HEAD/src/libcrun/utils.c:2166: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
# 2164|               return ret;
# 2165|   
# 2166|->           ret = symlinkat (target_buf, destdirfd, de->d_name);
# 2167|             if (UNLIKELY (ret < 0))
# 2168|               return crun_make_error (err, errno, "create symlink `%s/%s`", destname, de->d_name);

Error: GCC_ANALYZER_WARNING (CWE-688):
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'read_file_as_long_or_default'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c:2486:9: warning[-Wanalyzer-null-argument]: use of NULL 'content' where non-null expected
/usr/include/features.h:524: 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.20-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
# 2484|   
# 2485|     errno = 0;
# 2486|->   val = strtol (content, &endptr, 10);
# 2487|     if (UNLIKELY (errno))
# 2488|       return def_value;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/intelrdt.c:23: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'resctl_update'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'intelrdt_clean_l3_cache_schema(l3_cache_schema)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'safe_read_xattr'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((long unsigned int)(current_size + 1))'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'copy_xattr'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((long unsigned int)(xattr_len + 1))'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/seccomp_notify.c:32: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_load_seccomp_notify_plugins'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((long unsigned int)*(struct seccomp_notify_context_s *)<unknown>.sizes.seccomp_notif)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((long unsigned int)*(struct seccomp_notify_context_s *)<unknown>.sizes.seccomp_notif_resp)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'compare_rdt_configurations'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((n_parts_a + 1) * 8)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.c:21: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'read_dir_entries'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(128)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_get_containers_list'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(16)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/exec.c:30: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'crun_command_exec'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(88)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57: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.20-build/crun-HEAD/src/libcrun/utils.h:29: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'read_all_fd_with_size_hint'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(allocated + 1)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'read_all_fd_with_size_hint'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-internal.h:22: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c:23: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'write_controller_file'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(controllers_len + 1)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'copy_from_fd_to_fd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(get_page_size())'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:24: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c:25: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_copy_seccomp'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(in_size + 1)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   63|   {
#   64|     void *res = malloc (size);
#   65|->   if (UNLIKELY (res == NULL))
#   66|       OOM ();
#   67|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_restore'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'libcrun_container_load_from_file("config.json", err)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_update_intel_rdt'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'libcrun_container_load_from_file(config_file,  err)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_load_from_file'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'make_container(runtime_spec_schema_config_schema_parse_file(path, 0, & oci_error), path, 0)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'crun_command_exec'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'make_oci_process_user(exec_options.user)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0((long unsigned int)(argc + 1) * 8)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'retrieve_mount_options'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0((num_mount_options + 1) * 8)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(120)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:579:7: note: in expansion of macro 'crun_make_error'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:1616:12: note: in expansion of macro 'crun_make_error'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/container.c:24: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_get_features'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(144)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_update'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(176)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/container.h:24: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/container.c:23: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/container.c:579:7: note: in expansion of macro 'crun_make_error'
crun-1.20-build/crun-HEAD/src/libcrun/container.c:1616:12: note: in expansion of macro 'crun_make_error'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(48)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'make_oci_process_user'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(56)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   {
#   73|     void *res = calloc (1, size);
#   74|->   if (UNLIKELY (res == NULL))
#   75|       OOM ();
#   76|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'safe_read_xattr'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:83:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(buffer, (long unsigned int)(current_size + 1))'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   81|   {
#   82|     void *res = realloc (ptr, size);
#   83|->   if (UNLIKELY (res == NULL))
#   84|       OOM ();
#   85|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:83:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(entries,  entries_size * 16)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   81|   {
#   82|     void *res = realloc (ptr, size);
#   83|->   if (UNLIKELY (res == NULL))
#   84|       OOM ();
#   85|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'read_dir_entries'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:83:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(entries, (n_entries + 1) * 8)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   81|   {
#   82|     void *res = realloc (ptr, size);
#   83|->   if (UNLIKELY (res == NULL))
#   84|       OOM ();
#   85|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'evict_cache'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:83:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(entries, (n_entries + 1) * 88)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   81|   {
#   82|     void *res = realloc (ptr, size);
#   83|->   if (UNLIKELY (res == NULL))
#   84|       OOM ();
#   85|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_ebpf_load'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:83:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(log,  log_size)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   81|   {
#   82|     void *res = realloc (ptr, size);
#   83|->   if (UNLIKELY (res == NULL))
#   84|       OOM ();
#   85|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cpuset_string_to_bitmask'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:83:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(mask,  new_mask_size)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   81|   {
#   82|     void *res = realloc (ptr, size);
#   83|->   if (UNLIKELY (res == NULL))
#   84|       OOM ();
#   85|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/ebpf.c:23: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'read_all_progs'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:83:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(progs,  cur_size * 4)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   81|   {
#   82|     void *res = realloc (ptr, size);
#   83|->   if (UNLIKELY (res == NULL))
#   84|       OOM ();
#   85|     return res;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'safe_readlinkat'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:83:21: warning[-Wanalyzer-malloc-leak]: leak of 'xrealloc(tmp_buf, (long unsigned int)buf_size)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   81|   {
#   82|     void *res = realloc (ptr, size);
#   83|->   if (UNLIKELY (res == NULL))
#   84|       OOM ();
#   85|     return res;

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of '*(void **)&cgroup_path_type'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'maybe_make_cgroup_threaded'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'maybe_make_cgroup_threaded'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'maybe_make_cgroup_threaded'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'maybe_make_cgroup_threaded'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of '*(void **)&content'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'maybe_make_cgroup_threaded'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'maybe_make_cgroup_threaded'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'maybe_make_cgroup_threaded'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'maybe_make_cgroup_threaded'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of '*(void **)&controllers'
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'check_cgroup_v2_controller_available_wrapper'
crun-1.20-build/crun-HEAD/src/libcrun/container.h:24: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.h:21: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-resources.c:22: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-resources.c:1031:16: note: in expansion of macro 'crun_make_error'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:24: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'check_cgroup_v2_controller_available_wrapper'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of '*(void **)&target_buf'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'copy_recursive_fd_to_fd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'copy_recursive_fd_to_fd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'copy_recursive_fd_to_fd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'copy_recursive_fd_to_fd'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of 'buffer'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'safe_read_xattr'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of 'bundle_cleanup'
crun-1.20-build/crun-HEAD/src/restore.c: scope_hint: In function 'crun_command_restore'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of 'entries'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'evict_cache'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'evict_cache'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of 'log'
crun-1.20-build/crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'libcrun_ebpf_load'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of 'mask'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'cpuset_string_to_bitmask'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of 'progs'
crun-1.20-build/crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'read_all_progs'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-415):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of 'tmp_buf'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'safe_readlinkat'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_restore'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/error.h:42: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/container.h:24: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/cgroup.h:21: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/cgroup-setup.c:22: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '*(void *)p'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'cfd'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'cleanup_closep.part.0'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'console_socket_fd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'destdirfd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'cleanup_closep.part.0'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd_cleanup'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'image_fd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'memfd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/src/libcrun/seccomp.h:24: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'root_fd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'rootfsfd_cleanup'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'rundir_dfd'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-1.20-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'cleanup_closep.part.0'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'srcfd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'cleanup_closep.part.0'
crun-1.20-build/crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'cleanup_closep.part.0'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'wfd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_set_stdio'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:109:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ret'
#  107|     if (*pp >= 0)
#  108|       TEMP_FAILURE_RETRY (close (*pp));
#  109|-> }
#  110|   
#  111|   static inline void

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'close_and_reset'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:210:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'memfd'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  208|     if (*fd >= 0)
#  209|       {
#  210|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  211|         if (LIKELY (ret == 0))
#  212|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:210:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'own_seccomp_receiver_fd'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  208|     if (*fd >= 0)
#  209|       {
#  210|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  211|         if (LIKELY (ret == 0))
#  212|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:210:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'seccomp_fd'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  208|     if (*fd >= 0)
#  209|       {
#  210|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  211|         if (LIKELY (ret == 0))
#  212|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'close_and_reset'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:210:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'seccomp_receiver_fd'
#  208|     if (*fd >= 0)
#  209|       {
#  210|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  211|         if (LIKELY (ret == 0))
#  212|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:210:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'terminal_fd'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  208|     if (*fd >= 0)
#  209|       {
#  210|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  211|         if (LIKELY (ret == 0))
#  212|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup("/run/crun")'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_get_features'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup("1.0.0")'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup("1.1.0+dev")'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'read_dir_entries'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(&*<unknown>.d_name)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_get_containers_list'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(&*next.d_name)'
crun-1.20-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_new_terminal'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(&buf)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'crun_command_exec'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*<unknown>)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'retrieve_mount_options'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*<unknown>.name)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*_70->process.selinux_label)'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*_76->process.apparmor_profile)'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.20-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_restore_linux_criu'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*status.bundle)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-1.20-build/crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.h:7: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/container.h:23: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:32: included_from: Included from here.
crun-1.20-build/crun-HEAD/src/libcrun/criu.c:822:17: note: in expansion of macro 'YAJL_IS_ARRAY'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'compare_rdt_configurations'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(a)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(b)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(exec_options.apparmor)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(exec_options.process_label)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'read_unified_cgroup_pid'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(from)'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'check_cgroup_v2_controller_available_wrapper'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(name)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(plugins)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'get_run_directory'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(state_root)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.20-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'maybe_make_cgroup_threaded'
crun-1.20-build/crun-HEAD/src/libcrun/utils.h:225:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(t)'
#  223|   
#  224|     ret = strdup (str);
#  225|->   if (ret == NULL)
#  226|       OOM ();
#  227|   

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.20-build/crun-HEAD/src/spec.c: scope_hint: In function 'crun_command_spec'
crun-1.20-build/crun-HEAD/src/spec.c:126:7: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(where, "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.20-build/crun-HEAD/src/spec.c:126:7: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(where, "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);
