crun-1.26-1.20260201201124532167.main.47.gb05680e3

List of Findings

Error: CPPCHECK_WARNING (CWE-401): [#def1]
crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:121: error[memleak]: Memory leak: ret
#  119|           ret->second = strdup (src->second);
#  120|           if (ret->second == NULL)
#  121|->           return NULL;
#  122|         }
#  123|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:387:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 128)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'free_basic_test_double_array'
#  385|       if (ptr == NULL)
#  386|           return;
#  387|->     if (ptr->strarrays != NULL)
#  388|         {
#  389|           size_t i;

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

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

Error: CPPCHECK_WARNING (CWE-401): [#def5]
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): [#def6]
crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:795:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c: scope_hint: In function 'basic_test_double_array_parse_data'
crun-HEAD/libocispec/src/ocispec/basic_test_double_array.c:795:1: note: in expansion of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
#  793|       return ptr;
#  794|   }
#  795|-> define_cleaner_function (yajl_val, yajl_tree_free)
#  796|   
#  797|   basic_test_double_array *

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:77:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c: scope_hint: In function 'free_basic_test_double_array_item.part.0'
#   75|       }
#   76|       while (0);
#   77|->     if (tree->type == yajl_t_object)
#   78|         {
#   79|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:136:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c: scope_hint: In function 'free_basic_test_double_array_item.part.0'
#  134|       if (ptr == NULL)
#  135|           return;
#  136|->     free (ptr->item1);
#  137|       ptr->item1 = NULL;
#  138|       yajl_tree_free (ptr->_residual);

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:262:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c: scope_hint: In function 'basic_test_double_array_item_parse_data'
crun-HEAD/libocispec/src/ocispec/basic_test_double_array_item.c:262:1: note: in expansion of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
#  260|       return ptr;
#  261|   }
#  262|-> define_cleaner_function (yajl_val, yajl_tree_free)
#  263|   
#  264|   basic_test_double_array_item *

Error: CPPCHECK_WARNING (CWE-401): [#def11]
crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:32: error[memleak]: Memory leak: ptr
#   30|       ptr->items = calloc (alen + 1, sizeof(*ptr->items));
#   31|       if (ptr->items == NULL)
#   32|->       return NULL;
#   33|       ptr->len = alen;
#   34|       for (i = 0; i < alen; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:143:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c: scope_hint: In function 'basic_test_top_array_int_container_parse_data'
crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:41:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/basic_test_top_array_int.c:143:1: note: in expansion of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
#  141|       return ptr;
#  142|   }
#  143|-> define_cleaner_function (yajl_val, yajl_tree_free)
#  144|   
#  145|   basic_test_top_array_int_container *

Error: CPPCHECK_WARNING (CWE-401): [#def13]
crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c:32: error[memleak]: Memory leak: ptr
#   30|       ptr->items = calloc (alen + 1, sizeof(*ptr->items));
#   31|       if (ptr->items == NULL)
#   32|->       return NULL;
#   33|       ptr->len = alen;
#   34|       for (i = 0; i < alen; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c:136:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c: scope_hint: In function 'basic_test_top_array_string_container_parse_data'
crun-HEAD/libocispec/src/ocispec/basic_test_top_array_string.c:136:1: note: in expansion of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
#  134|       return ptr;
#  135|   }
#  136|-> define_cleaner_function (yajl_val, yajl_tree_free)
#  137|   
#  138|   basic_test_top_array_string_container *

Error: CPPCHECK_WARNING (CWE-401): [#def15]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:32: error[memleak]: Memory leak: ptr
#   30|       ptr->items = calloc (alen + 1, sizeof(*ptr->items));
#   31|       if (ptr->items == NULL)
#   32|->       return NULL;
#   33|       ptr->len = alen;
#   34|       ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t));

Error: CPPCHECK_WARNING (CWE-401): [#def16]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:36: error[memleak]: Memory leak: ptr
#   34|       ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t));
#   35|       if (ptr->subitem_lens == NULL)
#   36|->       return NULL;
#   37|       for (i = 0; i < alen; i++)
#   38|         {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:167:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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-HEAD/libocispec/src/ocispec/basic_test_top_double_array_int.c:167:1: note: in expansion of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
#  165|       return ptr;
#  166|   }
#  167|-> define_cleaner_function (yajl_val, yajl_tree_free)
#  168|   
#  169|   basic_test_top_double_array_int_container *

Error: CPPCHECK_WARNING (CWE-401): [#def18]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:157: error[memleak]: Memory leak: ret
#  155|           ret->third = strdup (src->third);
#  156|           if (ret->third == NULL)
#  157|->           return NULL;
#  158|         }
#  159|       return move_ptr (ret);

Error: CPPCHECK_WARNING (CWE-401): [#def19]
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): [#def20]
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|       for (i = 0; i < alen; i++)
#  188|         {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
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-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:216:42: warning[-Wanalyzer-null-dereference]: dereference of NULL '*ptr.subitem_lens + i * 8'
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:8: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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'
#  214|         {
#  215|           size_t j;
#  216|->         for (j = 0; j < ptr->subitem_lens[i]; j++)
#  217|             {
#  218|               free_basic_test_top_double_array_obj_element (ptr->items[i][j]);

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:309:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c: scope_hint: In function 'basic_test_top_double_array_obj_container_parse_data'
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_obj.c:309:1: note: in expansion of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
#  307|       return ptr;
#  308|   }
#  309|-> define_cleaner_function (yajl_val, yajl_tree_free)
#  310|   
#  311|   basic_test_top_double_array_obj_container *

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
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-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:30:18: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:8: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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'
#   28|       if (ptr == NULL)
#   29|         return NULL;
#   30|->     ptr->items = calloc (alen + 1, sizeof(*ptr->items));
#   31|       if (ptr->items == NULL)
#   32|         return NULL;

Error: CPPCHECK_WARNING (CWE-401): [#def25]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:32: error[memleak]: Memory leak: ptr
#   30|       ptr->items = calloc (alen + 1, sizeof(*ptr->items));
#   31|       if (ptr->items == NULL)
#   32|->       return NULL;
#   33|       ptr->len = alen;
#   34|       ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t));

Error: CPPCHECK_WARNING (CWE-401): [#def26]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:36: error[memleak]: Memory leak: ptr
#   34|       ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t));
#   35|       if (ptr->subitem_lens == NULL)
#   36|->       return NULL;
#   37|       for (i = 0; i < alen; i++)
#   38|         {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:66:42: warning[-Wanalyzer-null-dereference]: dereference of NULL '*ptr.subitem_lens + i * 8'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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'
#   64|         {
#   65|           size_t j;
#   66|->         for (j = 0; j < ptr->subitem_lens[i]; j++)
#   67|             {
#   68|               free_basic_test_double_array_item (ptr->items[i][j]);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:68:13: warning[-Wanalyzer-null-dereference]: dereference of NULL '*<unknown> + j * 8'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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'
#   66|           for (j = 0; j < ptr->subitem_lens[i]; j++)
#   67|             {
#   68|->             free_basic_test_double_array_item (ptr->items[i][j]);
#   69|               ptr->items[i][j] = NULL;
#   70|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:69:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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|               free_basic_test_double_array_item (ptr->items[i][j]);
#   69|->             ptr->items[i][j] = NULL;
#   70|             }
#   71|             free (ptr->items[i]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:159:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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-HEAD/libocispec/src/ocispec/basic_test_top_double_array_refobj.c:159:1: note: in expansion of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
#  157|       return ptr;
#  158|   }
#  159|-> define_cleaner_function (yajl_val, yajl_tree_free)
#  160|   
#  161|   basic_test_top_double_array_refobj_container *

Error: CPPCHECK_WARNING (CWE-401): [#def31]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:32: error[memleak]: Memory leak: ptr
#   30|       ptr->items = calloc (alen + 1, sizeof(*ptr->items));
#   31|       if (ptr->items == NULL)
#   32|->       return NULL;
#   33|       ptr->len = alen;
#   34|       ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t));

Error: CPPCHECK_WARNING (CWE-401): [#def32]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:36: error[memleak]: Memory leak: ptr
#   34|       ptr->subitem_lens = calloc ( alen + 1, sizeof (size_t));
#   35|       if (ptr->subitem_lens == NULL)
#   36|->       return NULL;
#   37|       for (i = 0; i < alen; i++)
#   38|         {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
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-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:71:42: warning[-Wanalyzer-null-dereference]: dereference of NULL '*ptr.subitem_lens + i * 8'
/usr/include/alloca.h:24: included_from: Included from here.
/usr/include/stdlib.h:728: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/json_common.h:4: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:8: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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'
#   69|         {
#   70|           size_t j;
#   71|->         for (j = 0; j < ptr->subitem_lens[i]; j++)
#   72|             {
#   73|               free (ptr->items[i][j]);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
crun-HEAD/libocispec/src/ocispec/basic_test_top_double_array_string.c:73:13: warning[-Wanalyzer-null-dereference]: dereference of NULL '*<unknown> + j * 8'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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'
#   71|           for (j = 0; j < ptr->subitem_lens[i]; j++)
#   72|             {
#   73|->             free (ptr->items[i][j]);
#   74|               ptr->items[i][j] = NULL;
#   75|             }

Error: CPPCHECK_WARNING (CWE-401): [#def35]
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): [#def36]
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): [#def37]
crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:319: error[memleak]: Memory leak: ptr
#  317|       ptr->items = calloc (alen + 1, sizeof(*ptr->items));
#  318|       if (ptr->items == NULL)
#  319|->       return NULL;
#  320|       ptr->len = alen;
#  321|       for (i = 0; i < alen; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:418:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c: scope_hint: In function 'image_manifest_items_image_manifest_items_schema_container_parse_data'
crun-HEAD/libocispec/src/ocispec/image_manifest_items_image_manifest_items_schema.c:418:1: note: in expansion of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
#  416|       return ptr;
#  417|   }
#  418|-> define_cleaner_function (yajl_val, yajl_tree_free)
#  419|   
#  420|   image_manifest_items_image_manifest_items_schema_container *

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:37:39: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 120)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema_config.part.0'
#   35|       while (0);
#   36|       ret->exposed_ports = make_image_spec_schema_defs_map_string_object (get_val (tree, "ExposedPorts", yajl_t_object), ctx, err);
#   37|->     if (ret->exposed_ports == NULL && *err != 0)
#   38|         return NULL;
#   39|       do

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:247:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 120)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema_config.part.0'
#  245|       if (ptr == NULL)
#  246|           return;
#  247|->     free (ptr->user);
#  248|       ptr->user = NULL;
#  249|       free_image_spec_schema_defs_map_string_object (ptr->exposed_ports);

Error: CPPCHECK_WARNING (CWE-401): [#def41]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:489: error[memleak]: Memory leak: ret
#  487|           ret->user = strdup (src->user);
#  488|           if (ret->user == NULL)
#  489|->           return NULL;
#  490|         }
#  491|       if (src->exposed_ports)

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:723:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema_rootfs'
#  721|       if (ptr == NULL)
#  722|           return;
#  723|->     if (ptr->diff_ids != NULL)
#  724|         {
#  725|           size_t i;

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

Error: CPPCHECK_WARNING (CWE-401): [#def47]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1020: error[memleak]: Memory leak: ret
# 1018|           ret->created = strdup (src->created);
# 1019|           if (ret->created == NULL)
# 1020|->           return NULL;
# 1021|         }
# 1022|       if (src->author != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def48]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1026: error[memleak]: Memory leak: ret
# 1024|           ret->author = strdup (src->author);
# 1025|           if (ret->author == NULL)
# 1026|->           return NULL;
# 1027|         }
# 1028|       if (src->created_by != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def49]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1032: error[memleak]: Memory leak: ret
# 1030|           ret->created_by = strdup (src->created_by);
# 1031|           if (ret->created_by == NULL)
# 1032|->           return NULL;
# 1033|         }
# 1034|       if (src->comment != NULL)

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1267:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 104)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema.part.0'
# 1265|       if (ptr == NULL)
# 1266|           return;
# 1267|->     free (ptr->created);
# 1268|       ptr->created = NULL;
# 1269|       free (ptr->author);

Error: CPPCHECK_WARNING (CWE-401): [#def52]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1495: error[memleak]: Memory leak: ret
# 1493|           ret->created = strdup (src->created);
# 1494|           if (ret->created == NULL)
# 1495|->           return NULL;
# 1496|         }
# 1497|       if (src->author != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def53]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1501: error[memleak]: Memory leak: ret
# 1499|           ret->author = strdup (src->author);
# 1500|           if (ret->author == NULL)
# 1501|->           return NULL;
# 1502|         }
# 1503|       if (src->architecture != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def54]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1507: error[memleak]: Memory leak: ret
# 1505|           ret->architecture = strdup (src->architecture);
# 1506|           if (ret->architecture == NULL)
# 1507|->           return NULL;
# 1508|         }
# 1509|       if (src->variant != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def55]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1513: error[memleak]: Memory leak: ret
# 1511|           ret->variant = strdup (src->variant);
# 1512|           if (ret->variant == NULL)
# 1513|->           return NULL;
# 1514|         }
# 1515|       if (src->os != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def56]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1519: error[memleak]: Memory leak: ret
# 1517|           ret->os = strdup (src->os);
# 1518|           if (ret->os == NULL)
# 1519|->           return NULL;
# 1520|         }
# 1521|       if (src->os_version != NULL)

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:213:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 80)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c: scope_hint: In function 'free_image_spec_schema_content_descriptor.part.0'
#  211|       if (ptr == NULL)
#  212|           return;
#  213|->     free (ptr->media_type);
#  214|       ptr->media_type = NULL;
#  215|       free (ptr->digest);

Error: CPPCHECK_WARNING (CWE-401): [#def60]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:369: error[memleak]: Memory leak: ret
#  367|           ret->media_type = strdup (src->media_type);
#  368|           if (ret->media_type == NULL)
#  369|->           return NULL;
#  370|         }
#  371|       ret->size = src->size;

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

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

Error: CPPCHECK_WARNING (CWE-401): [#def63]
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): [#def64]
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): [#def65]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c: scope_hint: In function 'free_image_spec_schema_defs_map_string_object'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:126:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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|   yajl_gen_status

Error: GCC_ANALYZER_WARNING (CWE-476): [#def66]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c: scope_hint: In function 'clone_image_spec_schema_defs_map_string_object'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_defs.c:178:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'calloc(*src.len + 1, 8)'
#  176|           for (i = 0; i < src->len; i++)
#  177|             {
#  178|->              ret->values[i] = clone_image_spec_schema_defs_map_string_object_element (src->values[i]);
#  179|                if (ret->values[i] == NULL)
#  180|                  return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:171:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 56)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema_manifests_platform.part.0'
#  169|       if (ptr == NULL)
#  170|           return;
#  171|->     free (ptr->architecture);
#  172|       ptr->architecture = NULL;
#  173|       free (ptr->os);

Error: CPPCHECK_WARNING (CWE-401): [#def68]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:304: error[memleak]: Memory leak: ret
#  302|           ret->architecture = strdup (src->architecture);
#  303|           if (ret->architecture == NULL)
#  304|->           return NULL;
#  305|         }
#  306|       if (src->os != NULL)

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:468:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema_manifests_element.part.0'
#  466|       if (ptr == NULL)
#  467|           return;
#  468|->     free (ptr->media_type);
#  469|       ptr->media_type = NULL;
#  470|       free (ptr->digest);

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'make_image_spec_schema_image_index_schema'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:649:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  647|       if (tree == NULL)
#  648|         return NULL;
#  649|->     ret = calloc (1, sizeof (*ret));
#  650|       if (ret == NULL)
#  651|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:649:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
#  647|       if (tree == NULL)
#  648|         return NULL;
#  649|->     ret = calloc (1, sizeof (*ret));
#  650|       if (ret == NULL)
#  651|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:699:33: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 72)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema.part.0'
#  697|       while (0);
#  698|       ret->subject = make_image_spec_schema_content_descriptor (get_val (tree, "subject", yajl_t_object), ctx, err);
#  699|->     if (ret->subject == NULL && *err != 0)
#  700|         return NULL;
#  701|       do

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:809:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 72)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema.part.0'
#  807|       if (ptr == NULL)
#  808|           return;
#  809|->     free (ptr->media_type);
#  810|       ptr->media_type = NULL;
#  811|       free (ptr->artifact_type);

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

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c: scope_hint: In function 'make_image_spec_schema_image_layout_schema'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:36:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c: scope_hint: In function 'free_image_spec_schema_image_layout_schema.part.0'
#   34|       }
#   35|       while (0);
#   36|->     if (ret->image_layout_version == NULL)
#   37|         {
#   38|           if (asprintf (err, "Required field '%s' not present", "imageLayoutVersion") < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:99:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c: scope_hint: In function 'free_image_spec_schema_image_layout_schema.part.0'
#   97|       if (ptr == NULL)
#   98|           return;
#   99|->     free (ptr->image_layout_version);
#  100|       ptr->image_layout_version = NULL;
#  101|       yajl_tree_free (ptr->_residual);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:101:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c: scope_hint: In function 'free_image_spec_schema_image_layout_schema.part.0'
#   99|       free (ptr->image_layout_version);
#  100|       ptr->image_layout_version = NULL;
#  101|->     yajl_tree_free (ptr->_residual);
#  102|       ptr->_residual = NULL;
#  103|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:101:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c: scope_hint: In function 'free_image_spec_schema_image_layout_schema.part.0'
#   99|       free (ptr->image_layout_version);
#  100|       ptr->image_layout_version = NULL;
#  101|->     yajl_tree_free (ptr->_residual);
#  102|       ptr->_residual = NULL;
#  103|       free (ptr);

Error: CPPCHECK_WARNING (CWE-401): [#def90]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:151: error[memleak]: Memory leak: ret
#  149|           ret->image_layout_version = strdup (src->image_layout_version);
#  150|           if (ret->image_layout_version == NULL)
#  151|->           return NULL;
#  152|         }
#  153|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:197:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:197:1: note: in expansion of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
#  195|       return ptr;
#  196|   }
#  197|-> define_cleaner_function (yajl_val, yajl_tree_free)
#  198|   
#  199|   image_spec_schema_image_layout_schema *

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c: scope_hint: In function 'make_image_spec_schema_image_manifest_schema'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c:191:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 80)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_manifest_schema.c: scope_hint: In function 'free_image_spec_schema_image_manifest_schema.part.0'
#  189|       if (ptr == NULL)
#  190|           return;
#  191|->     free (ptr->media_type);
#  192|       ptr->media_type = NULL;
#  193|       free (ptr->artifact_type);

Error: CPPCHECK_WARNING (CWE-401): [#def95]
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 != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def96]
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): [#def97]
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): [#def98]
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): [#def99]
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): [#def100]
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): [#def101]
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): [#def102]
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): [#def103]
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): [#def104]
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): [#def105]
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): [#def106]
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): [#def107]
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): [#def108]
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): [#def109]
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): [#def110]
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): [#def111]
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): [#def112]
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): [#def113]
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): [#def114]
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): [#def115]
crun-HEAD/libocispec/src/ocispec/json_common.c: scope_hint: In function 'free_json_map_string_string.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.c:1479:11: warning[-Wanalyzer-null-dereference]: dereference of NULL '*map.keys + i * 8'
crun-HEAD/libocispec/src/ocispec/json_common.c:6: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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): [#def116]
crun-HEAD/libocispec/src/ocispec/json_common.c:1481:11: warning[-Wanalyzer-null-dereference]: dereference of NULL '*map.values + i * 8'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
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): [#def117]
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): [#def118]
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): [#def119]
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): [#def120]
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-457): [#def121]
crun-HEAD/libocispec/src/ocispec/json_common.h:50:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'content'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c: scope_hint: In function 'image_spec_schema_image_layout_schema_parse_file_stream'
#   48|   ptr_free_function (void *p)
#   49|   {
#   50|->   free (*(void **) p);
#   51|   }
#   52|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def122]
crun-HEAD/libocispec/src/ocispec/read-file.c:21: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/read-file.c: scope_hint: In function 'fread_file'
crun-HEAD/libocispec/src/ocispec/read-file.c:37:57: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(path, "r")'
#   35|       struct stat st;
#   36|   
#   37|->     if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode))
#   38|         {
#   39|           off_t pos = ftello (stream);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
crun-HEAD/libocispec/src/ocispec/read-file.c:37:57: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(path, "r")'
#   35|       struct stat st;
#   36|   
#   37|->     if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode))
#   38|         {
#   39|           off_t pos = ftello (stream);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:267:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 48)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd_jail_allow'
#  265|       if (ptr == NULL)
#  266|           return;
#  267|->     if (ptr->mount != NULL)
#  268|         {
#  269|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:436:28: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 48)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd_jail_allow'
#  434|       if (ret == NULL)
#  435|         return NULL;
#  436|->     ret->set_hostname = src->set_hostname;
#  437|       ret->set_hostname_present = src->set_hostname_present;
#  438|       ret->raw_sockets = src->raw_sockets;

Error: CPPCHECK_WARNING (CWE-401): [#def126]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:447: error[memleak]: Memory leak: ret
#  445|           ret->mount = calloc (src->mount_len + 1, sizeof (*ret->mount));
#  446|           if (ret->mount == NULL)
#  447|->           return NULL;
#  448|           for (size_t i = 0; i < src->mount_len; i++)
#  449|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:764:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 152)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd_jail.part.0'
#  762|       if (ptr == NULL)
#  763|           return;
#  764|->     free (ptr->parent);
#  765|       ptr->parent = NULL;
#  766|       free (ptr->host);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1067:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 152)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd_jail.part.0'
# 1065|       if (ret == NULL)
# 1066|         return NULL;
# 1067|->     if (src->parent != NULL)
# 1068|         {
# 1069|           ret->parent = strdup (src->parent);

Error: CPPCHECK_WARNING (CWE-401): [#def129]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1071: error[memleak]: Memory leak: ret
# 1069|           ret->parent = strdup (src->parent);
# 1070|           if (ret->parent == NULL)
# 1071|->           return NULL;
# 1072|         }
# 1073|       if (src->host != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def130]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1077: error[memleak]: Memory leak: ret
# 1075|           ret->host = strdup (src->host);
# 1076|           if (ret->host == NULL)
# 1077|->           return NULL;
# 1078|         }
# 1079|       if (src->ip4 != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def131]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1083: error[memleak]: Memory leak: ret
# 1081|           ret->ip4 = strdup (src->ip4);
# 1082|           if (ret->ip4 == NULL)
# 1083|->           return NULL;
# 1084|         }
# 1085|       if (src->ip4addr)

Error: CPPCHECK_WARNING (CWE-401): [#def132]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1090: error[memleak]: Memory leak: ret
# 1088|           ret->ip4addr = calloc (src->ip4addr_len + 1, sizeof (*ret->ip4addr));
# 1089|           if (ret->ip4addr == NULL)
# 1090|->           return NULL;
# 1091|           for (size_t i = 0; i < src->ip4addr_len; i++)
# 1092|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1283:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd'
# 1281|             {
# 1282|               free_runtime_spec_schema_defs_freebsd_device (ptr->devices[i]);
# 1283|->             ptr->devices[i] = NULL;
# 1284|             }
# 1285|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1362:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd'
# 1360|       if (ret == NULL)
# 1361|         return NULL;
# 1362|->     if (src->devices)
# 1363|         {
# 1364|           ret->devices_len = src->devices_len;

Error: CPPCHECK_WARNING (CWE-401): [#def135]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1367: error[memleak]: Memory leak: ret
# 1365|           ret->devices = calloc (src->devices_len + 1, sizeof (*ret->devices));
# 1366|           if (ret->devices == NULL)
# 1367|->           return NULL;
# 1368|           for (size_t i = 0; i < src->devices_len; i++)
# 1369|             {

Error: CPPCHECK_WARNING (CWE-401): [#def136]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:33: error[memleak]: Memory leak: ret
#   31|           ret->keys = calloc (len + 1, sizeof (*ret->keys));
#   32|           if (ret->keys == NULL)
#   33|->           return NULL;
#   34|           ret->values = calloc (len + 1, sizeof (*ret->values));
#   35|           if (ret->values == NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def137]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:36: error[memleak]: Memory leak: ret
#   34|           ret->values = calloc (len + 1, sizeof (*ret->values));
#   35|           if (ret->values == NULL)
#   36|->           return NULL;
#   37|           for (i = 0; i < len; i++)
#   38|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:66:18: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:24:9: note: in expansion of macro 'YAJL_GET_OBJECT'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:24:9: note: in expansion of macro 'YAJL_GET_OBJECT'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_net_devices'
#   64|               ptr->keys[i] = NULL;
#   65|               free_runtime_spec_schema_defs_linux_net_device (ptr->values[i]);
#   66|->               ptr->values[i] = NULL;
#   67|               }
#   68|           free (ptr->keys);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:73:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:24:9: note: in expansion of macro 'YAJL_GET_OBJECT'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:24:9: note: in expansion of macro 'YAJL_GET_OBJECT'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_net_devices'
#   71|           ptr->values = NULL;
#   72|       }
#   73|->     free (ptr);
#   74|       }
#   75|   yajl_gen_status

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'make_runtime_spec_schema_config_linux_resources_pids'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:142:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  140|       if (tree == NULL)
#  141|         return NULL;
#  142|->     ret = calloc (1, sizeof (*ret));
#  143|       if (ret == NULL)
#  144|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:142:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
#  140|       if (tree == NULL)
#  141|         return NULL;
#  142|->     ret = calloc (1, sizeof (*ret));
#  143|       if (ret == NULL)
#  144|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_pids.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:167:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_pids.part.0'
#  165|       }
#  166|       while (0);
#  167|->     if (tree->type == yajl_t_object)
#  168|         {
#  169|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:167:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 96)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources.part.0'
#  165|       }
#  166|       while (0);
#  167|->     if (tree->type == yajl_t_object)
#  168|         {
#  169|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_pids.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:224:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_pids.part.0'
#  222|       if (ptr == NULL)
#  223|           return;
#  224|->     yajl_tree_free (ptr->_residual);
#  225|       ptr->_residual = NULL;
#  226|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:224:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_pids.part.0'
#  222|       if (ptr == NULL)
#  223|           return;
#  224|->     yajl_tree_free (ptr->_residual);
#  225|       ptr->_residual = NULL;
#  226|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:504:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 104)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_block_io'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_block_io'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_block_io'
#  502|       if (ptr == NULL)
#  503|           return;
#  504|->     if (ptr->throttle_read_bps_device != NULL)
#  505|         {
#  506|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:512:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_block_io'
#  510|             {
#  511|               free_runtime_spec_schema_defs_linux_block_io_device_throttle (ptr->throttle_read_bps_device[i]);
#  512|->             ptr->throttle_read_bps_device[i] = NULL;
#  513|             }
#  514|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:757:22: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 104)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_block_io'
#  755|       if (ret == NULL)
#  756|         return NULL;
#  757|->     ret->weight = src->weight;
#  758|       ret->weight_present = src->weight_present;
#  759|       ret->leaf_weight = src->leaf_weight;

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_cpu.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1230:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 88)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_cpu.part.0'
# 1228|       if (ret == NULL)
# 1229|         return NULL;
# 1230|->     if (src->cpus != NULL)
# 1231|         {
# 1232|           ret->cpus = strdup (src->cpus);

Error: CPPCHECK_WARNING (CWE-401): [#def151]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1234: error[memleak]: Memory leak: ret
# 1232|           ret->cpus = strdup (src->cpus);
# 1233|           if (ret->cpus == NULL)
# 1234|->           return NULL;
# 1235|         }
# 1236|       if (src->mems != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def152]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1240: error[memleak]: Memory leak: ret
# 1238|           ret->mems = strdup (src->mems);
# 1239|           if (ret->mems == NULL)
# 1240|->           return NULL;
# 1241|         }
# 1242|       ret->period = src->period;

Error: CPPCHECK_WARNING (CWE-401): [#def153]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1375: error[memleak]: Memory leak: ret
# 1373|           ret->page_size = strdup (src->page_size);
# 1374|           if (ret->page_size == NULL)
# 1375|->           return NULL;
# 1376|         }
# 1377|       ret->limit = src->limit;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_network'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:1933:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_network'
# 1931|             {
# 1932|               free_runtime_spec_schema_defs_linux_network_interface_priority (ptr->priorities[i]);
# 1933|->             ptr->priorities[i] = NULL;
# 1934|             }
# 1935|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2010:24: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_network'
# 2008|       if (ret == NULL)
# 2009|         return NULL;
# 2010|->     ret->class_id = src->class_id;
# 2011|       ret->class_id_present = src->class_id_present;
# 2012|       if (src->priorities)

Error: CPPCHECK_WARNING (CWE-401): [#def156]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2017: error[memleak]: Memory leak: ret
# 2015|           ret->priorities = calloc (src->priorities_len + 1, sizeof (*ret->priorities));
# 2016|           if (ret->priorities == NULL)
# 2017|->           return NULL;
# 2018|           for (size_t i = 0; i < src->priorities_len; i++)
# 2019|             {

Error: CPPCHECK_WARNING (CWE-401): [#def157]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2049: error[memleak]: Memory leak: ret
# 2047|           ret->keys = calloc (len + 1, sizeof (*ret->keys));
# 2048|           if (ret->keys == NULL)
# 2049|->           return NULL;
# 2050|           ret->values = calloc (len + 1, sizeof (*ret->values));
# 2051|           if (ret->values == NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def158]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2052: error[memleak]: Memory leak: ret
# 2050|           ret->values = calloc (len + 1, sizeof (*ret->values));
# 2051|           if (ret->values == NULL)
# 2052|->           return NULL;
# 2053|           for (i = 0; i < len; i++)
# 2054|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2306:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 96)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources.part.0'
# 2304|       if (ptr == NULL)
# 2305|           return;
# 2306|->     free_json_map_string_string (ptr->unified);
# 2307|       ptr->unified = NULL;
# 2308|       if (ptr->devices != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2307:18: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources.part.0'
# 2305|           return;
# 2306|       free_json_map_string_string (ptr->unified);
# 2307|->     ptr->unified = NULL;
# 2308|       if (ptr->devices != NULL)
# 2309|         {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2510:20: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 96)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources.part.0'
# 2508|       if (ret == NULL)
# 2509|         return NULL;
# 2510|->     ret->unified = clone_map_string_string (src->unified);
# 2511|       if (ret->unified == NULL)
# 2512|           return NULL;

Error: CPPCHECK_WARNING (CWE-401): [#def162]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2512: error[memleak]: Memory leak: ret
# 2510|       ret->unified = clone_map_string_string (src->unified);
# 2511|       if (ret->unified == NULL)
# 2512|->         return NULL;
# 2513|       if (src->devices)
# 2514|         {

Error: CPPCHECK_WARNING (CWE-401): [#def163]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2518: error[memleak]: Memory leak: ret
# 2516|           ret->devices = calloc (src->devices_len + 1, sizeof (*ret->devices));
# 2517|           if (ret->devices == NULL)
# 2518|->           return NULL;
# 2519|           for (size_t i = 0; i < src->devices_len; i++)
# 2520|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2807:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 96)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_seccomp.part.0'
# 2805|       if (ptr == NULL)
# 2806|           return;
# 2807|->     free (ptr->default_action);
# 2808|       ptr->default_action = NULL;
# 2809|       if (ptr->flags != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2849:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 2847|             {
# 2848|               free_runtime_spec_schema_defs_linux_syscall (ptr->syscalls[i]);
# 2849|->             ptr->syscalls[i] = NULL;
# 2850|             }
# 2851|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3012:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 96)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_seccomp.part.0'
# 3010|       if (ret == NULL)
# 3011|         return NULL;
# 3012|->     if (src->default_action != NULL)
# 3013|         {
# 3014|           ret->default_action = strdup (src->default_action);

Error: CPPCHECK_WARNING (CWE-401): [#def167]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3016: error[memleak]: Memory leak: ret
# 3014|           ret->default_action = strdup (src->default_action);
# 3015|           if (ret->default_action == NULL)
# 3016|->           return NULL;
# 3017|         }
# 3018|       ret->default_errno_ret = src->default_errno_ret;

Error: CPPCHECK_WARNING (CWE-401): [#def168]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3025: error[memleak]: Memory leak: ret
# 3023|           ret->flags = calloc (src->flags_len + 1, sizeof (*ret->flags));
# 3024|           if (ret->flags == NULL)
# 3025|->           return NULL;
# 3026|           for (size_t i = 0; i < src->flags_len; i++)
# 3027|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_intel_rdt.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3361:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_intel_rdt.part.0'
# 3359|       if (ret == NULL)
# 3360|         return NULL;
# 3361|->     if (src->clos_id != NULL)
# 3362|         {
# 3363|           ret->clos_id = strdup (src->clos_id);

Error: CPPCHECK_WARNING (CWE-401): [#def170]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3365: error[memleak]: Memory leak: ret
# 3363|           ret->clos_id = strdup (src->clos_id);
# 3364|           if (ret->clos_id == NULL)
# 3365|->           return NULL;
# 3366|         }
# 3367|       if (src->schemata)

Error: CPPCHECK_WARNING (CWE-401): [#def171]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3372: error[memleak]: Memory leak: ret
# 3370|           ret->schemata = calloc (src->schemata_len + 1, sizeof (*ret->schemata));
# 3371|           if (ret->schemata == NULL)
# 3372|->           return NULL;
# 3373|           for (size_t i = 0; i < src->schemata_len; i++)
# 3374|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_memory_policy.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3622:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_memory_policy.part.0'
# 3620|       if (ret == NULL)
# 3621|         return NULL;
# 3622|->     if (src->mode != NULL)
# 3623|         {
# 3624|           ret->mode = strdup (src->mode);

Error: CPPCHECK_WARNING (CWE-401): [#def173]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3626: error[memleak]: Memory leak: ret
# 3624|           ret->mode = strdup (src->mode);
# 3625|           if (ret->mode == NULL)
# 3626|->           return NULL;
# 3627|         }
# 3628|       if (src->nodes != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def174]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3632: error[memleak]: Memory leak: ret
# 3630|           ret->nodes = strdup (src->nodes);
# 3631|           if (ret->nodes == NULL)
# 3632|->           return NULL;
# 3633|         }
# 3634|       if (src->flags)

Error: CPPCHECK_WARNING (CWE-401): [#def175]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3639: error[memleak]: Memory leak: ret
# 3637|           ret->flags = calloc (src->flags_len + 1, sizeof (*ret->flags));
# 3638|           if (ret->flags == NULL)
# 3639|->           return NULL;
# 3640|           for (size_t i = 0; i < src->flags_len; i++)
# 3641|             {

Error: CPPCHECK_WARNING (CWE-401): [#def176]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3667: error[memleak]: Memory leak: ret
# 3665|       ret->boottime = make_runtime_spec_schema_defs_linux_time_offsets (get_val (tree, "boottime", yajl_t_object), ctx, err);
# 3666|       if (ret->boottime == NULL && *err != 0)
# 3667|->       return NULL;
# 3668|       ret->monotonic = make_runtime_spec_schema_defs_linux_time_offsets (get_val (tree, "monotonic", yajl_t_object), ctx, err);
# 3669|       if (ret->monotonic == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401): [#def177]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3670: error[memleak]: Memory leak: ret
# 3668|       ret->monotonic = make_runtime_spec_schema_defs_linux_time_offsets (get_val (tree, "monotonic", yajl_t_object), ctx, err);
# 3669|       if (ret->monotonic == NULL && *err != 0)
# 3670|->       return NULL;
# 3671|       if (tree->type == yajl_t_object)
# 3672|         {

Error: CPPCHECK_WARNING (CWE-401): [#def178]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3682: error[memleak]: Memory leak: ret
# 3680|               resi = calloc (1, sizeof(*tree));
# 3681|               if (resi == NULL)
# 3682|->               return NULL;
# 3683|   
# 3684|               resi->type = yajl_t_object;

Error: CPPCHECK_WARNING (CWE-401): [#def179]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3689: error[memleak]: Memory leak: ret
# 3687|                 {
# 3688|                   yajl_tree_free (resi);
# 3689|->                 return NULL;
# 3690|                 }
# 3691|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

Error: CPPCHECK_WARNING (CWE-401): [#def180]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3695: error[memleak]: Memory leak: ret
# 3693|                 {
# 3694|                   yajl_tree_free (resi);
# 3695|->                 return NULL;
# 3696|                 }
# 3697|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_time_offsets'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3791:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_time_offsets'
# 3789|       if (ret == NULL)
# 3790|         return NULL;
# 3791|->     if (src->boottime)
# 3792|         {
# 3793|           ret->boottime = clone_runtime_spec_schema_defs_linux_time_offsets (src->boottime);

Error: CPPCHECK_WARNING (CWE-401): [#def182]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3795: error[memleak]: Memory leak: ret
# 3793|           ret->boottime = clone_runtime_spec_schema_defs_linux_time_offsets (src->boottime);
# 3794|           if (ret->boottime == NULL)
# 3795|->           return NULL;
# 3796|         }
# 3797|       if (src->monotonic)

Error: CPPCHECK_WARNING (CWE-401): [#def183]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3801: error[memleak]: Memory leak: ret
# 3799|           ret->monotonic = clone_runtime_spec_schema_defs_linux_time_offsets (src->monotonic);
# 3800|           if (ret->monotonic == NULL)
# 3801|->           return NULL;
# 3802|         }
# 3803|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3841:37: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 192)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux'
# 3839|       while (0);
# 3840|       ret->net_devices = make_runtime_spec_schema_config_linux_net_devices (get_val (tree, "netDevices", yajl_t_object), ctx, err);
# 3841|->     if (ret->net_devices == NULL && *err != 0)
# 3842|         return NULL;
# 3843|       do

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:4106:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 192)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux'
# 4104|       if (ptr == NULL)
# 4105|           return;
# 4106|->     if (ptr->devices != NULL)
# 4107|         {
# 4108|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:4114:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux'
# 4112|             {
# 4113|               free_runtime_spec_schema_defs_linux_device (ptr->devices[i]);
# 4114|->             ptr->devices[i] = NULL;
# 4115|             }
# 4116|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:4522:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 192)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux'
# 4520|       if (ret == NULL)
# 4521|         return NULL;
# 4522|->     if (src->devices)
# 4523|         {
# 4524|           ret->devices_len = src->devices_len;

Error: CPPCHECK_WARNING (CWE-401): [#def188]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:4527: error[memleak]: Memory leak: ret
# 4525|           ret->devices = calloc (src->devices_len + 1, sizeof (*ret->devices));
# 4526|           if (ret->devices == NULL)
# 4527|->           return NULL;
# 4528|           for (size_t i = 0; i < src->devices_len; i++)
# 4529|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:156:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 128)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3467:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema.part.0'
#  154|         }
#  155|       while (0);
#  156|->     if (tree->type == yajl_t_object)
#  157|         {
#  158|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_hooks'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:218:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 104)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_hooks'
#  216|       if (ptr == NULL)
#  217|           return;
#  218|->     if (ptr->prestart != NULL)
#  219|         {
#  220|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:226:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_hooks'
#  224|             {
#  225|               free_runtime_spec_schema_defs_hook (ptr->prestart[i]);
#  226|->             ptr->prestart[i] = NULL;
#  227|             }
#  228|           }

Error: CPPCHECK_WARNING (CWE-401): [#def192]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:491: error[memleak]: Memory leak: ret
#  489|           ret->prestart = calloc (src->prestart_len + 1, sizeof (*ret->prestart));
#  490|           if (ret->prestart == NULL)
#  491|->           return NULL;
#  492|           for (size_t i = 0; i < src->prestart_len; i++)
#  493|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:610:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_root.part.0'
#  608|       }
#  609|       while (0);
#  610|->     if (ret->path == NULL)
#  611|         {
#  612|           if (asprintf (err, "Required field '%s' not present", "path") < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:674:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_root.part.0'
#  672|       if (ptr == NULL)
#  673|           return;
#  674|->     free (ptr->path);
#  675|       ptr->path = NULL;
#  676|       yajl_tree_free (ptr->_residual);

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:801:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_console_size.part.0'
#  799|       }
#  800|       while (0);
#  801|->     if (tree->type == yajl_t_object)
#  802|         {
#  803|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:859:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_console_size.part.0'
#  857|       if (ptr == NULL)
#  858|           return;
#  859|->     yajl_tree_free (ptr->_residual);
#  860|       ptr->_residual = NULL;
#  861|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1111:18: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 56)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_user.part.0'
# 1109|           return;
# 1110|   {
# 1111|->         free (ptr->additional_gids);
# 1112|           ptr->additional_gids = NULL;
# 1113|       }

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1452:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 88)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_capabilities'
# 1450|       if (ptr == NULL)
# 1451|           return;
# 1452|->     if (ptr->bounding != NULL)
# 1453|         {
# 1454|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1463:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1278:33: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1278:33: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1278:33: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1278:33: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_capabilities'
# 1461|               }
# 1462|               }
# 1463|->         free (ptr->bounding);
# 1464|           ptr->bounding = NULL;
# 1465|       }

Error: CPPCHECK_WARNING (CWE-401): [#def202]
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: GCC_ANALYZER_WARNING (CWE-401): [#def203]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1810:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2820:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_io_priority.part.0'
# 1808|       }
# 1809|       while (0);
# 1810|->     if (ret->_class == NULL)
# 1811|         {
# 1812|           if (asprintf (err, "Required field '%s' not present", "class") < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:1874:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2820:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_io_priority.part.0'
# 1872|       if (ptr == NULL)
# 1873|           return;
# 1874|->     free (ptr->_class);
# 1875|       ptr->_class = NULL;
# 1876|       yajl_tree_free (ptr->_residual);

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2174:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 72)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2820:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_scheduler.part.0'
# 2172|       if (ptr == NULL)
# 2173|           return;
# 2174|->     free (ptr->policy);
# 2175|       ptr->policy = NULL;
# 2176|       if (ptr->flags != NULL)

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'make_runtime_spec_schema_config_schema_process_rlimits_element'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2361:10: warning[-Wanalyzer-malloc-leak]: leak of '*err'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2820:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2374:19: note: in expansion of macro 'YAJL_IS_NUMBER'
# 2359|   {
# 2360|       __auto_cleanup(free_runtime_spec_schema_config_schema_process_rlimits_element) runtime_spec_schema_config_schema_process_rlimits_element *ret = NULL;
# 2361|->     *err = NULL;
# 2362|       (void) ctx;  /* Silence compiler warning.  */
# 2363|       if (tree == NULL)

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2551:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2820:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_exec_cpu_affinity.part.0'
# 2549|       }
# 2550|       while (0);
# 2551|->     if (tree->type == yajl_t_object)
# 2552|         {
# 2553|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2609:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2820:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_exec_cpu_affinity.part.0'
# 2607|       if (ptr == NULL)
# 2608|           return;
# 2609|->     free (ptr->initial);
# 2610|       ptr->initial = NULL;
# 2611|       free (ptr->final);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2613:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2820:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_exec_cpu_affinity.part.0'
# 2611|       free (ptr->final);
# 2612|       ptr->final = NULL;
# 2613|->     yajl_tree_free (ptr->_residual);
# 2614|       ptr->_residual = NULL;
# 2615|       free (ptr);

Error: CPPCHECK_WARNING (CWE-401): [#def214]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2675: error[memleak]: Memory leak: ret
# 2673|           ret->initial = strdup (src->initial);
# 2674|           if (ret->initial == NULL)
# 2675|->           return NULL;
# 2676|         }
# 2677|       if (src->final != NULL)

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2976:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 168)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process'
# 2974|       if (ptr == NULL)
# 2975|           return;
# 2976|->     if (ptr->args != NULL)
# 2977|         {
# 2978|           size_t i;

Error: CPPCHECK_WARNING (CWE-401): [#def217]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3308: error[memleak]: Memory leak: ret
# 3306|           ret->args = calloc (src->args_len + 1, sizeof (*ret->args));
# 3307|           if (ret->args == NULL)
# 3308|->           return NULL;
# 3309|           for (size_t i = 0; i < src->args_len; i++)
# 3310|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3442:31: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 128)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3467:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema.part.0'
# 3440|       while (0);
# 3441|       ret->hooks = make_runtime_spec_schema_config_schema_hooks (get_val (tree, "hooks", yajl_t_object), ctx, err);
# 3442|->     if (ret->hooks == NULL && *err != 0)
# 3443|         return NULL;
# 3444|       do

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3608:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 128)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema.part.0'
# 3606|       if (ptr == NULL)
# 3607|           return;
# 3608|->     free (ptr->oci_version);
# 3609|       ptr->oci_version = NULL;
# 3610|       if (ptr->hooks != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3613:20: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3467:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema.part.0'
# 3611|         {
# 3612|           free_runtime_spec_schema_config_schema_hooks (ptr->hooks);
# 3613|->         ptr->hooks = NULL;
# 3614|         }
# 3615|       free_json_map_string_string (ptr->annotations);

Error: CPPCHECK_WARNING (CWE-401): [#def221]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3864: error[memleak]: Memory leak: ret
# 3862|           ret->oci_version = strdup (src->oci_version);
# 3863|           if (ret->oci_version == NULL)
# 3864|->           return NULL;
# 3865|         }
# 3866|       if (src->hooks)

Error: CPPCHECK_WARNING (CWE-401): [#def222]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3870: error[memleak]: Memory leak: ret
# 3868|           ret->hooks = clone_runtime_spec_schema_config_schema_hooks (src->hooks);
# 3869|           if (ret->hooks == NULL)
# 3870|->           return NULL;
# 3871|         }
# 3872|       ret->annotations = clone_map_string_string (src->annotations);

Error: CPPCHECK_WARNING (CWE-401): [#def223]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3874: error[memleak]: Memory leak: ret
# 3872|       ret->annotations = clone_map_string_string (src->annotations);
# 3873|       if (ret->annotations == NULL)
# 3874|->         return NULL;
# 3875|       if (src->hostname != NULL)
# 3876|         {

Error: CPPCHECK_WARNING (CWE-401): [#def224]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3879: error[memleak]: Memory leak: ret
# 3877|           ret->hostname = strdup (src->hostname);
# 3878|           if (ret->hostname == NULL)
# 3879|->           return NULL;
# 3880|         }
# 3881|       if (src->domainname != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def225]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3885: error[memleak]: Memory leak: ret
# 3883|           ret->domainname = strdup (src->domainname);
# 3884|           if (ret->domainname == NULL)
# 3885|->           return NULL;
# 3886|         }
# 3887|       if (src->mounts)

Error: CPPCHECK_WARNING (CWE-401): [#def226]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3892: error[memleak]: Memory leak: ret
# 3890|           ret->mounts = calloc (src->mounts_len + 1, sizeof (*ret->mounts));
# 3891|           if (ret->mounts == NULL)
# 3892|->           return NULL;
# 3893|           for (size_t i = 0; i < src->mounts_len; i++)
# 3894|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_cpu.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:36:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_cpu.part.0'
#   34|       }
#   35|       while (0);
#   36|->     if (tree->type == yajl_t_object)
#   37|         {
#   38|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:93:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_cpu.part.0'
#   91|       if (ptr == NULL)
#   92|           return;
#   93|->     free (ptr->ncpus);
#   94|       ptr->ncpus = NULL;
#   95|       yajl_tree_free (ptr->_residual);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:95:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_cpu.part.0'
#   93|       free (ptr->ncpus);
#   94|       ptr->ncpus = NULL;
#   95|->     yajl_tree_free (ptr->_residual);
#   96|       ptr->_residual = NULL;
#   97|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:95:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_cpu.part.0'
#   93|       free (ptr->ncpus);
#   94|       ptr->ncpus = NULL;
#   95|->     yajl_tree_free (ptr->_residual);
#   96|       ptr->_residual = NULL;
#   97|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:141:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_cpu.part.0'
#  139|       if (ret == NULL)
#  140|         return NULL;
#  141|->     if (src->ncpus != NULL)
#  142|         {
#  143|           ret->ncpus = strdup (src->ncpus);

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:186:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_memory.part.0'
#  184|       }
#  185|       while (0);
#  186|->     if (tree->type == yajl_t_object)
#  187|         {
#  188|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:244:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_memory.part.0'
#  242|       if (ptr == NULL)
#  243|           return;
#  244|->     free (ptr->physical);
#  245|       ptr->physical = NULL;
#  246|       free (ptr->swap);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def235]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:248:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_memory.part.0'
#  246|       free (ptr->swap);
#  247|       ptr->swap = NULL;
#  248|->     yajl_tree_free (ptr->_residual);
#  249|       ptr->_residual = NULL;
#  250|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def236]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:306:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_memory.part.0'
#  304|       if (ret == NULL)
#  305|         return NULL;
#  306|->     if (src->physical != NULL)
#  307|         {
#  308|           ret->physical = strdup (src->physical);

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

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

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

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

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

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

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def246]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:732:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris.part.0'
#  730|       if (ptr == NULL)
#  731|           return;
#  732|->     free (ptr->milestone);
#  733|       ptr->milestone = NULL;
#  734|       free (ptr->limitpriv);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:875:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris.part.0'
#  873|       if (ret == NULL)
#  874|         return NULL;
#  875|->     if (src->milestone != NULL)
#  876|         {
#  877|           ret->milestone = strdup (src->milestone);

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

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

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

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hypervisor.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:126:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hypervisor.part.0'
#  124|       if (ptr == NULL)
#  125|           return;
#  126|->     free (ptr->path);
#  127|       ptr->path = NULL;
#  128|       if (ptr->parameters != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:142:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hypervisor.part.0'
#  140|           ptr->parameters = NULL;
#  141|       }
#  142|->     yajl_tree_free (ptr->_residual);
#  143|       ptr->_residual = NULL;
#  144|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:213:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hypervisor.part.0'
#  211|       if (ret == NULL)
#  212|         return NULL;
#  213|->     if (src->path != NULL)
#  214|         {
#  215|           ret->path = strdup (src->path);

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:365:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_kernel.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_kernel.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_kernel.part.0'
#  363|       if (ptr == NULL)
#  364|           return;
#  365|->     free (ptr->path);
#  366|       ptr->path = NULL;
#  367|       if (ptr->parameters != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:466:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_kernel.part.0'
#  464|       if (ret == NULL)
#  465|         return NULL;
#  466|->     if (src->path != NULL)
#  467|         {
#  468|           ret->path = strdup (src->path);

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:533:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:255:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
#  531|       }
#  532|       while (0);
#  533|->     if (ret->path == NULL)
#  534|         {
#  535|           if (asprintf (err, "Required field '%s' not present", "path") < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:603:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:255:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
#  601|       if (ptr == NULL)
#  602|           return;
#  603|->     free (ptr->path);
#  604|       ptr->path = NULL;
#  605|       free (ptr->format);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:665:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_image.part.0'
#  663|       if (ret == NULL)
#  664|         return NULL;
#  665|->     if (src->path != NULL)
#  666|         {
#  667|           ret->path = strdup (src->path);

Error: CPPCHECK_WARNING (CWE-401): [#def266]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:669: error[memleak]: Memory leak: ret
#  667|           ret->path = strdup (src->path);
#  668|           if (ret->path == NULL)
#  669|->           return NULL;
#  670|         }
#  671|       if (src->format != NULL)

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:893:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 88)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:255:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
#  891|       if (ptr == NULL)
#  892|           return;
#  893|->     free (ptr->device_tree);
#  894|       ptr->device_tree = NULL;
#  895|       if (ptr->dtdevs != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:917:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  915|             {
#  916|               free_runtime_spec_schema_defs_vm_io_mem_entry_format (ptr->iomems[i]);
#  917|->             ptr->iomems[i] = NULL;
#  918|             }
#  919|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1072:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 88)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
# 1070|       if (ret == NULL)
# 1071|         return NULL;
# 1072|->     if (src->device_tree != NULL)
# 1073|         {
# 1074|           ret->device_tree = strdup (src->device_tree);

Error: CPPCHECK_WARNING (CWE-401): [#def271]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1076: error[memleak]: Memory leak: ret
# 1074|           ret->device_tree = strdup (src->device_tree);
# 1075|           if (ret->device_tree == NULL)
# 1076|->           return NULL;
# 1077|         }
# 1078|       ret->vcpus = src->vcpus;

Error: CPPCHECK_WARNING (CWE-401): [#def272]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1087: error[memleak]: Memory leak: ret
# 1085|           ret->dtdevs = calloc (src->dtdevs_len + 1, sizeof (*ret->dtdevs));
# 1086|           if (ret->dtdevs == NULL)
# 1087|->           return NULL;
# 1088|           for (size_t i = 0; i < src->dtdevs_len; i++)
# 1089|             {

Error: CPPCHECK_WARNING (CWE-401): [#def273]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1139: error[memleak]: Memory leak: ret
# 1137|       ret->hypervisor = make_runtime_spec_schema_config_vm_hypervisor (get_val (tree, "hypervisor", yajl_t_object), ctx, err);
# 1138|       if (ret->hypervisor == NULL && *err != 0)
# 1139|->       return NULL;
# 1140|       ret->kernel = make_runtime_spec_schema_config_vm_kernel (get_val (tree, "kernel", yajl_t_object), ctx, err);
# 1141|       if (ret->kernel == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401): [#def274]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1142: error[memleak]: Memory leak: ret
# 1140|       ret->kernel = make_runtime_spec_schema_config_vm_kernel (get_val (tree, "kernel", yajl_t_object), ctx, err);
# 1141|       if (ret->kernel == NULL && *err != 0)
# 1142|->       return NULL;
# 1143|       ret->image = make_runtime_spec_schema_config_vm_image (get_val (tree, "image", yajl_t_object), ctx, err);
# 1144|       if (ret->image == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401): [#def275]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1145: error[memleak]: Memory leak: ret
# 1143|       ret->image = make_runtime_spec_schema_config_vm_image (get_val (tree, "image", yajl_t_object), ctx, err);
# 1144|       if (ret->image == NULL && *err != 0)
# 1145|->       return NULL;
# 1146|       ret->hw_config = make_runtime_spec_schema_config_vm_hw_config (get_val (tree, "hwConfig", yajl_t_object), ctx, err);
# 1147|       if (ret->hw_config == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401): [#def276]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1148: error[memleak]: Memory leak: ret
# 1146|       ret->hw_config = make_runtime_spec_schema_config_vm_hw_config (get_val (tree, "hwConfig", yajl_t_object), ctx, err);
# 1147|       if (ret->hw_config == NULL && *err != 0)
# 1148|->       return NULL;
# 1149|       if (ret->kernel == NULL)
# 1150|         {

Error: CPPCHECK_WARNING (CWE-401): [#def277]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1153: error[memleak]: Memory leak: ret
# 1151|           if (asprintf (err, "Required field '%s' not present", "kernel") < 0)
# 1152|               *err = strdup ("error allocating memory");
# 1153|->     return NULL;
# 1154|       }
# 1155|       if (tree->type == yajl_t_object)

Error: CPPCHECK_WARNING (CWE-401): [#def278]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1166: error[memleak]: Memory leak: ret
# 1164|               resi = calloc (1, sizeof(*tree));
# 1165|               if (resi == NULL)
# 1166|->               return NULL;
# 1167|   
# 1168|               resi->type = yajl_t_object;

Error: CPPCHECK_WARNING (CWE-401): [#def279]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1173: error[memleak]: Memory leak: ret
# 1171|                 {
# 1172|                   yajl_tree_free (resi);
# 1173|->                 return NULL;
# 1174|                 }
# 1175|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

Error: CPPCHECK_WARNING (CWE-401): [#def280]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1179: error[memleak]: Memory leak: ret
# 1177|                 {
# 1178|                   yajl_tree_free (resi);
# 1179|->                 return NULL;
# 1180|                 }
# 1181|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1215:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm'
# 1213|       if (ptr == NULL)
# 1214|           return;
# 1215|->     if (ptr->hypervisor != NULL)
# 1216|         {
# 1217|           free_runtime_spec_schema_config_vm_hypervisor (ptr->hypervisor);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1305:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm'
# 1303|       if (ret == NULL)
# 1304|         return NULL;
# 1305|->     if (src->hypervisor)
# 1306|         {
# 1307|           ret->hypervisor = clone_runtime_spec_schema_config_vm_hypervisor (src->hypervisor);

Error: CPPCHECK_WARNING (CWE-401): [#def283]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1309: error[memleak]: Memory leak: ret
# 1307|           ret->hypervisor = clone_runtime_spec_schema_config_vm_hypervisor (src->hypervisor);
# 1308|           if (ret->hypervisor == NULL)
# 1309|->           return NULL;
# 1310|         }
# 1311|       if (src->kernel)

Error: CPPCHECK_WARNING (CWE-401): [#def284]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1315: error[memleak]: Memory leak: ret
# 1313|           ret->kernel = clone_runtime_spec_schema_config_vm_kernel (src->kernel);
# 1314|           if (ret->kernel == NULL)
# 1315|->           return NULL;
# 1316|         }
# 1317|       if (src->image)

Error: CPPCHECK_WARNING (CWE-401): [#def285]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1321: error[memleak]: Memory leak: ret
# 1319|           ret->image = clone_runtime_spec_schema_config_vm_image (src->image);
# 1320|           if (ret->image == NULL)
# 1321|->           return NULL;
# 1322|         }
# 1323|       if (src->hw_config)

Error: CPPCHECK_WARNING (CWE-401): [#def286]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1327: error[memleak]: Memory leak: ret
# 1325|           ret->hw_config = clone_runtime_spec_schema_config_vm_hw_config (src->hw_config);
# 1326|           if (ret->hw_config == NULL)
# 1327|->           return NULL;
# 1328|         }
# 1329|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'make_runtime_spec_schema_config_windows_resources_memory'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_memory.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:46:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_memory.part.0'
#   44|       }
#   45|       while (0);
#   46|->     if (tree->type == yajl_t_object)
#   47|         {
#   48|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:46:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
#   44|       }
#   45|       while (0);
#   46|->     if (tree->type == yajl_t_object)
#   47|         {
#   48|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_memory.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:103:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_memory.part.0'
#  101|       if (ptr == NULL)
#  102|           return;
#  103|->     yajl_tree_free (ptr->_residual);
#  104|       ptr->_residual = NULL;
#  105|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:103:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_memory.part.0'
#  101|       if (ptr == NULL)
#  102|           return;
#  103|->     yajl_tree_free (ptr->_residual);
#  104|       ptr->_residual = NULL;
#  105|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:268:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_cpu_affinity.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_cpu_affinity.part.0'
#  266|       if (ptr == NULL)
#  267|           return;
#  268|->     yajl_tree_free (ptr->_residual);
#  269|       ptr->_residual = NULL;
#  270|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:474:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_cpu'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_cpu'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_cpu'
#  472|       if (ptr == NULL)
#  473|           return;
#  474|->     if (ptr->affinity != NULL)
#  475|         {
#  476|           free_runtime_spec_schema_config_windows_resources_cpu_affinity (ptr->affinity);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:558:21: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_cpu'
#  556|       if (ret == NULL)
#  557|         return NULL;
#  558|->     ret->count = src->count;
#  559|       ret->count_present = src->count_present;
#  560|       ret->shares = src->shares;

Error: CPPCHECK_WARNING (CWE-401): [#def296]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:568: error[memleak]: Memory leak: ret
#  566|           ret->affinity = clone_runtime_spec_schema_config_windows_resources_cpu_affinity (src->affinity);
#  567|           if (ret->affinity == NULL)
#  568|->           return NULL;
#  569|         }
#  570|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:710:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_storage.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_storage.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_storage.part.0'
#  708|       if (ptr == NULL)
#  709|           return;
#  710|->     yajl_tree_free (ptr->_residual);
#  711|       ptr->_residual = NULL;
#  712|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:802:32: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
#  800|         return NULL;
#  801|       ret->memory = make_runtime_spec_schema_config_windows_resources_memory (get_val (tree, "memory", yajl_t_object), ctx, err);
#  802|->     if (ret->memory == NULL && *err != 0)
#  803|         return NULL;
#  804|       ret->cpu = make_runtime_spec_schema_config_windows_resources_cpu (get_val (tree, "cpu", yajl_t_object), ctx, err);

Error: CPPCHECK_WARNING (CWE-401): [#def299]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:803: error[memleak]: Memory leak: ret
#  801|       ret->memory = make_runtime_spec_schema_config_windows_resources_memory (get_val (tree, "memory", yajl_t_object), ctx, err);
#  802|       if (ret->memory == NULL && *err != 0)
#  803|->       return NULL;
#  804|       ret->cpu = make_runtime_spec_schema_config_windows_resources_cpu (get_val (tree, "cpu", yajl_t_object), ctx, err);
#  805|       if (ret->cpu == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401): [#def300]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:806: error[memleak]: Memory leak: ret
#  804|       ret->cpu = make_runtime_spec_schema_config_windows_resources_cpu (get_val (tree, "cpu", yajl_t_object), ctx, err);
#  805|       if (ret->cpu == NULL && *err != 0)
#  806|->       return NULL;
#  807|       ret->storage = make_runtime_spec_schema_config_windows_resources_storage (get_val (tree, "storage", yajl_t_object), ctx, err);
#  808|       if (ret->storage == NULL && *err != 0)

Error: CPPCHECK_WARNING (CWE-401): [#def301]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:809: error[memleak]: Memory leak: ret
#  807|       ret->storage = make_runtime_spec_schema_config_windows_resources_storage (get_val (tree, "storage", yajl_t_object), ctx, err);
#  808|       if (ret->storage == NULL && *err != 0)
#  809|->       return NULL;
#  810|       if (tree->type == yajl_t_object)
#  811|         {

Error: CPPCHECK_WARNING (CWE-401): [#def302]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:821: error[memleak]: Memory leak: ret
#  819|               resi = calloc (1, sizeof(*tree));
#  820|               if (resi == NULL)
#  821|->               return NULL;
#  822|   
#  823|               resi->type = yajl_t_object;

Error: CPPCHECK_WARNING (CWE-401): [#def303]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:828: error[memleak]: Memory leak: ret
#  826|                 {
#  827|                   yajl_tree_free (resi);
#  828|->                 return NULL;
#  829|                 }
#  830|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

Error: CPPCHECK_WARNING (CWE-401): [#def304]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:834: error[memleak]: Memory leak: ret
#  832|                 {
#  833|                   yajl_tree_free (resi);
#  834|->                 return NULL;
#  835|                 }
#  836|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:869:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
#  867|       if (ptr == NULL)
#  868|           return;
#  869|->     if (ptr->memory != NULL)
#  870|         {
#  871|           free_runtime_spec_schema_config_windows_resources_memory (ptr->memory);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:872:21: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
#  870|         {
#  871|           free_runtime_spec_schema_config_windows_resources_memory (ptr->memory);
#  872|->         ptr->memory = NULL;
#  873|         }
#  874|       if (ptr->cpu != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:877:18: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
#  875|         {
#  876|           free_runtime_spec_schema_config_windows_resources_cpu (ptr->cpu);
#  877|->         ptr->cpu = NULL;
#  878|         }
#  879|       if (ptr->storage != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:945:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
#  943|       if (ret == NULL)
#  944|         return NULL;
#  945|->     if (src->memory)
#  946|         {
#  947|           ret->memory = clone_runtime_spec_schema_config_windows_resources_memory (src->memory);

Error: CPPCHECK_WARNING (CWE-401): [#def309]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:949: error[memleak]: Memory leak: ret
#  947|           ret->memory = clone_runtime_spec_schema_config_windows_resources_memory (src->memory);
#  948|           if (ret->memory == NULL)
#  949|->           return NULL;
#  950|         }
#  951|       if (src->cpu)

Error: CPPCHECK_WARNING (CWE-401): [#def310]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:955: error[memleak]: Memory leak: ret
#  953|           ret->cpu = clone_runtime_spec_schema_config_windows_resources_cpu (src->cpu);
#  954|           if (ret->cpu == NULL)
#  955|->           return NULL;
#  956|         }
#  957|       if (src->storage)

Error: CPPCHECK_WARNING (CWE-401): [#def311]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:961: error[memleak]: Memory leak: ret
#  959|           ret->storage = clone_runtime_spec_schema_config_windows_resources_storage (src->storage);
#  960|           if (ret->storage == NULL)
#  961|->           return NULL;
#  962|         }
#  963|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1134:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 72)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_network'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_network'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_network'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_network'
# 1132|       if (ptr == NULL)
# 1133|           return;
# 1134|->     if (ptr->endpoint_list != NULL)
# 1135|         {
# 1136|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1286:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 72)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_network'
# 1284|       if (ret == NULL)
# 1285|         return NULL;
# 1286|->     if (src->endpoint_list)
# 1287|         {
# 1288|           ret->endpoint_list_len = src->endpoint_list_len;

Error: CPPCHECK_WARNING (CWE-401): [#def314]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1291: error[memleak]: Memory leak: ret
# 1289|           ret->endpoint_list = calloc (src->endpoint_list_len + 1, sizeof (*ret->endpoint_list));
# 1290|           if (ret->endpoint_list == NULL)
# 1291|->           return NULL;
# 1292|           for (size_t i = 0; i < src->endpoint_list_len; i++)
# 1293|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1412:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1600:30: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1619:47: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
# 1410|       }
# 1411|       while (0);
# 1412|->     if (tree->type == yajl_t_object)
# 1413|         {
# 1414|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1469:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1600:30: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1619:47: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
# 1467|       if (ptr == NULL)
# 1468|           return;
# 1469|->     free (ptr->utility_vm_path);
# 1470|       ptr->utility_vm_path = NULL;
# 1471|       yajl_tree_free (ptr->_residual);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1471:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1600:30: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1619:47: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
# 1469|       free (ptr->utility_vm_path);
# 1470|       ptr->utility_vm_path = NULL;
# 1471|->     yajl_tree_free (ptr->_residual);
# 1472|       ptr->_residual = NULL;
# 1473|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def318]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1471:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1600:30: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1619:47: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
# 1469|       free (ptr->utility_vm_path);
# 1470|       ptr->utility_vm_path = NULL;
# 1471|->     yajl_tree_free (ptr->_residual);
# 1472|       ptr->_residual = NULL;
# 1473|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1517:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_hyperv.part.0'
# 1515|       if (ret == NULL)
# 1516|         return NULL;
# 1517|->     if (src->utility_vm_path != NULL)
# 1518|         {
# 1519|           ret->utility_vm_path = strdup (src->utility_vm_path);

Error: CPPCHECK_WARNING (CWE-401): [#def320]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1521: error[memleak]: Memory leak: ret
# 1519|           ret->utility_vm_path = strdup (src->utility_vm_path);
# 1520|           if (ret->utility_vm_path == NULL)
# 1521|->           return NULL;
# 1522|         }
# 1523|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def321]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1706:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 88)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows'
# 1704|       if (ptr == NULL)
# 1705|           return;
# 1706|->     if (ptr->layer_folders != NULL)
# 1707|         {
# 1708|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1728:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows'
# 1726|             {
# 1727|               free_runtime_spec_schema_defs_windows_device (ptr->devices[i]);
# 1728|->             ptr->devices[i] = NULL;
# 1729|             }
# 1730|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1898:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 88)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows'
# 1896|       if (ret == NULL)
# 1897|         return NULL;
# 1898|->     if (src->layer_folders)
# 1899|         {
# 1900|           ret->layer_folders_len = src->layer_folders_len;

Error: CPPCHECK_WARNING (CWE-401): [#def324]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1903: error[memleak]: Memory leak: ret
# 1901|           ret->layer_folders = calloc (src->layer_folders_len + 1, sizeof (*ret->layer_folders));
# 1902|           if (ret->layer_folders == NULL)
# 1903|->           return NULL;
# 1904|           for (size_t i = 0; i < src->layer_folders_len; i++)
# 1905|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def325]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c:103:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c: scope_hint: In function 'free_runtime_spec_schema_config_zos'
#  101|       if (ptr == NULL)
#  102|           return;
#  103|->     if (ptr->namespaces != NULL)
#  104|         {
#  105|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c:111:16: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c: scope_hint: In function 'free_runtime_spec_schema_config_zos'
#  109|             {
#  110|               free_runtime_spec_schema_defs_zos_namespace_reference (ptr->namespaces[i]);
#  111|->             ptr->namespaces[i] = NULL;
#  112|             }
#  113|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c:176:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c: scope_hint: In function 'free_runtime_spec_schema_config_zos'
#  174|       if (ret == NULL)
#  175|         return NULL;
#  176|->     if (src->namespaces)
#  177|         {
#  178|           ret->namespaces_len = src->namespaces_len;

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'make_runtime_spec_schema_defs_hook'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:8: included_from: Included from here.
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def331]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:176:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'free_runtime_spec_schema_defs_hook.part.0'
#  174|       if (ptr == NULL)
#  175|           return;
#  176|->     free (ptr->path);
#  177|       ptr->path = NULL;
#  178|       if (ptr->args != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def332]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:314:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'free_runtime_spec_schema_defs_hook.part.0'
#  312|       if (ret == NULL)
#  313|         return NULL;
#  314|->     if (src->path != NULL)
#  315|         {
#  316|           ret->path = strdup (src->path);

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def335]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:494:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'free_runtime_spec_schema_defs_id_mapping.part.0'
#  492|       if (ptr == NULL)
#  493|           return;
#  494|->     yajl_tree_free (ptr->_residual);
#  495|       ptr->_residual = NULL;
#  496|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:759:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 80)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'free_runtime_spec_schema_defs_mount.part.0'
#  757|       if (ptr == NULL)
#  758|           return;
#  759|->     free (ptr->source);
#  760|       ptr->source = NULL;
#  761|       free (ptr->destination);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def337]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:952:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 80)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'free_runtime_spec_schema_defs_mount.part.0'
#  950|       if (ret == NULL)
#  951|         return NULL;
#  952|->     if (src->source != NULL)
#  953|         {
#  954|           ret->source = strdup (src->source);

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_freebsd.c:116:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_defs_freebsd_device.part.0'
#  114|       if (ptr == NULL)
#  115|           return;
#  116|->     free (ptr->path);
#  117|       ptr->path = NULL;
#  118|       yajl_tree_free (ptr->_residual);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_freebsd.c:176:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_defs_freebsd_device.part.0'
#  174|       if (ret == NULL)
#  175|         return NULL;
#  176|->     if (src->path != NULL)
#  177|         {
#  178|           ret->path = strdup (src->path);

Error: CPPCHECK_WARNING (CWE-401): [#def343]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_freebsd.c:180: error[memleak]: Memory leak: ret
#  178|           ret->path = strdup (src->path);
#  179|           if (ret->path == NULL)
#  180|->           return NULL;
#  181|         }
#  182|       ret->mode = src->mode;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:62:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_personality.part.0'
#   60|         }
#   61|       while (0);
#   62|->     if (tree->type == yajl_t_object)
#   63|         {
#   64|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:120:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_personality.part.0'
#  118|       if (ptr == NULL)
#  119|           return;
#  120|->     free (ptr->domain);
#  121|       ptr->domain = NULL;
#  122|       if (ptr->flags != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:136:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_personality.part.0'
#  134|           ptr->flags = NULL;
#  135|       }
#  136|->     yajl_tree_free (ptr->_residual);
#  137|       ptr->_residual = NULL;
#  138|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:207:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_personality.part.0'
#  205|       if (ret == NULL)
#  206|         return NULL;
#  207|->     if (src->domain != NULL)
#  208|         {
#  209|           ret->domain = strdup (src->domain);

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def350]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_syscall_arg'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:241:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:315:25: note: in expansion of macro 'YAJL_GET_STRING'
#  239|       if (tree == NULL)
#  240|         return NULL;
#  241|->     ret = calloc (1, sizeof (*ret));
#  242|       if (ret == NULL)
#  243|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:388:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 48)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_syscall_arg.part.0'
#  386|       if (ptr == NULL)
#  387|           return;
#  388|->     free (ptr->op);
#  389|       ptr->op = NULL;
#  390|       yajl_tree_free (ptr->_residual);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:472:21: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 48)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_syscall_arg.part.0'
#  470|       if (ret == NULL)
#  471|         return NULL;
#  472|->     ret->index = src->index;
#  473|       ret->index_present = src->index_present;
#  474|       ret->value = src->value;

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_syscall'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:496:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:530:25: note: in expansion of macro 'YAJL_GET_STRING'
#  494|       if (tree == NULL)
#  495|         return NULL;
#  496|->     ret = calloc (1, sizeof (*ret));
#  497|       if (ret == NULL)
#  498|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:496:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:530:25: note: in expansion of macro 'YAJL_GET_STRING'
#  494|       if (tree == NULL)
#  495|         return NULL;
#  496|->     ret = calloc (1, sizeof (*ret));
#  497|       if (ret == NULL)
#  498|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def356]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:653:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_syscall'
#  651|       if (ptr == NULL)
#  652|           return;
#  653|->     if (ptr->names != NULL)
#  654|         {
#  655|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def357]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:791:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_syscall'
#  789|       if (ret == NULL)
#  790|         return NULL;
#  791|->     if (src->names)
#  792|         {
#  793|           ret->names_len = src->names_len;

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def359]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1052:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_device.part.0'
# 1050|       if (ptr == NULL)
# 1051|           return;
# 1052|->     free (ptr->type);
# 1053|       ptr->type = NULL;
# 1054|       free (ptr->path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def360]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1174:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_device.part.0'
# 1172|       if (ret == NULL)
# 1173|         return NULL;
# 1174|->     if (src->type != NULL)
# 1175|         {
# 1176|           ret->type = strdup (src->type);

Error: CPPCHECK_WARNING (CWE-401): [#def361]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1178: error[memleak]: Memory leak: ret
# 1176|           ret->type = strdup (src->type);
# 1177|           if (ret->type == NULL)
# 1178|->           return NULL;
# 1179|         }
# 1180|       if (src->path != NULL)

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def363]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1223:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_net_device.part.0'
# 1221|       }
# 1222|       while (0);
# 1223|->     if (tree->type == yajl_t_object)
# 1224|         {
# 1225|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def364]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1280:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_net_device.part.0'
# 1278|       if (ptr == NULL)
# 1279|           return;
# 1280|->     free (ptr->name);
# 1281|       ptr->name = NULL;
# 1282|       yajl_tree_free (ptr->_residual);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def365]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1282:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_net_device.part.0'
# 1280|       free (ptr->name);
# 1281|       ptr->name = NULL;
# 1282|->     yajl_tree_free (ptr->_residual);
# 1283|       ptr->_residual = NULL;
# 1284|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def366]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1282:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_net_device.part.0'
# 1280|       free (ptr->name);
# 1281|       ptr->name = NULL;
# 1282|->     yajl_tree_free (ptr->_residual);
# 1283|       ptr->_residual = NULL;
# 1284|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1328:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_net_device.part.0'
# 1326|       if (ret == NULL)
# 1327|         return NULL;
# 1328|->     if (src->name != NULL)
# 1329|         {
# 1330|           ret->name = strdup (src->name);

Error: CPPCHECK_WARNING (CWE-401): [#def368]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1332: error[memleak]: Memory leak: ret
# 1330|           ret->name = strdup (src->name);
# 1331|           if (ret->name == NULL)
# 1332|->           return NULL;
# 1333|         }
# 1334|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def369]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1451:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_block_io_device.part.0'
# 1449|       if (ptr == NULL)
# 1450|           return;
# 1451|->     yajl_tree_free (ptr->_residual);
# 1452|       ptr->_residual = NULL;
# 1453|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1676:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_block_io_device_weight.part.0'
# 1674|       if (ptr == NULL)
# 1675|           return;
# 1676|->     yajl_tree_free (ptr->_residual);
# 1677|       ptr->_residual = NULL;
# 1678|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def371]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:1906:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_block_io_device_throttle.part.0'
# 1904|       if (ptr == NULL)
# 1905|           return;
# 1906|->     yajl_tree_free (ptr->_residual);
# 1907|       ptr->_residual = NULL;
# 1908|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def372]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2145:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 56)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_device_cgroup.part.0'
# 2143|       if (ptr == NULL)
# 2144|           return;
# 2145|->     free (ptr->type);
# 2146|       ptr->type = NULL;
# 2147|       free (ptr->access);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2243:21: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 56)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_device_cgroup.part.0'
# 2241|       if (ret == NULL)
# 2242|         return NULL;
# 2243|->     ret->allow = src->allow;
# 2244|       ret->allow_present = src->allow_present;
# 2245|       if (src->type != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def374]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2249: error[memleak]: Memory leak: ret
# 2247|           ret->type = strdup (src->type);
# 2248|           if (ret->type == NULL)
# 2249|->           return NULL;
# 2250|         }
# 2251|       ret->major = src->major;

Error: CPPCHECK_WARNING (CWE-401): [#def375]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2259: error[memleak]: Memory leak: ret
# 2257|           ret->access = strdup (src->access);
# 2258|           if (ret->access == NULL)
# 2259|->           return NULL;
# 2260|         }
# 2261|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def376]
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-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2273:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2294:19: note: in expansion of macro 'YAJL_IS_NUMBER'
# 2271|       if (tree == NULL)
# 2272|         return NULL;
# 2273|->     ret = calloc (1, sizeof (*ret));
# 2274|       if (ret == NULL)
# 2275|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2310:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_network_interface_priority.part.0'
# 2308|       }
# 2309|       while (0);
# 2310|->     if (ret->name == NULL)
# 2311|         {
# 2312|           if (asprintf (err, "Required field '%s' not present", "name") < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2374:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_network_interface_priority.part.0'
# 2372|       if (ptr == NULL)
# 2373|           return;
# 2374|->     free (ptr->name);
# 2375|       ptr->name = NULL;
# 2376|       yajl_tree_free (ptr->_residual);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2434:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_network_interface_priority.part.0'
# 2432|       if (ret == NULL)
# 2433|         return NULL;
# 2434|->     if (src->name != NULL)
# 2435|         {
# 2436|           ret->name = strdup (src->name);

Error: CPPCHECK_WARNING (CWE-401): [#def380]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2438: error[memleak]: Memory leak: ret
# 2436|           ret->name = strdup (src->name);
# 2437|           if (ret->name == NULL)
# 2438|->           return NULL;
# 2439|         }
# 2440|       ret->priority = src->priority;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2559:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_rdma.part.0'
# 2557|       if (ptr == NULL)
# 2558|           return;
# 2559|->     yajl_tree_free (ptr->_residual);
# 2560|       ptr->_residual = NULL;
# 2561|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def382]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'make_runtime_spec_schema_defs_linux_namespace_reference'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2633:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2641:25: note: in expansion of macro 'YAJL_GET_STRING'
# 2631|       if (tree == NULL)
# 2632|         return NULL;
# 2633|->     ret = calloc (1, sizeof (*ret));
# 2634|       if (ret == NULL)
# 2635|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2633:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2641:25: note: in expansion of macro 'YAJL_GET_STRING'
# 2631|       if (tree == NULL)
# 2632|         return NULL;
# 2633|->     ret = calloc (1, sizeof (*ret));
# 2634|       if (ret == NULL)
# 2635|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2660:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_namespace_reference.part.0'
# 2658|       }
# 2659|       while (0);
# 2660|->     if (ret->type == NULL)
# 2661|         {
# 2662|           if (asprintf (err, "Required field '%s' not present", "type") < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2724:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_namespace_reference.part.0'
# 2722|       if (ptr == NULL)
# 2723|           return;
# 2724|->     free (ptr->type);
# 2725|       ptr->type = NULL;
# 2726|       free (ptr->path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2728:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2641:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_namespace_reference.part.0'
# 2726|       free (ptr->path);
# 2727|       ptr->path = NULL;
# 2728|->     yajl_tree_free (ptr->_residual);
# 2729|       ptr->_residual = NULL;
# 2730|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2786:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_namespace_reference.part.0'
# 2784|       if (ret == NULL)
# 2785|         return NULL;
# 2786|->     if (src->type != NULL)
# 2787|         {
# 2788|           ret->type = strdup (src->type);

Error: CPPCHECK_WARNING (CWE-401): [#def388]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2790: error[memleak]: Memory leak: ret
# 2788|           ret->type = strdup (src->type);
# 2789|           if (ret->type == NULL)
# 2790|->           return NULL;
# 2791|         }
# 2792|       if (src->path != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def389]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2796: error[memleak]: Memory leak: ret
# 2794|           ret->path = strdup (src->path);
# 2795|           if (ret->path == NULL)
# 2796|->           return NULL;
# 2797|         }
# 2798|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2915:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_time_offsets.part.0'
# 2913|       if (ptr == NULL)
# 2914|           return;
# 2915|->     yajl_tree_free (ptr->_residual);
# 2916|       ptr->_residual = NULL;
# 2917|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_vm.c:149:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_vm.c: scope_hint: In function 'free_runtime_spec_schema_defs_vm_io_mem_entry_format.part.0'
#  147|       if (ptr == NULL)
#  148|           return;
#  149|->     yajl_tree_free (ptr->_residual);
#  150|       ptr->_residual = NULL;
#  151|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def392]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:41:25: note: in expansion of macro 'YAJL_GET_STRING'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def393]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:41:25: note: in expansion of macro 'YAJL_GET_STRING'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def394]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:48:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c: scope_hint: In function 'free_runtime_spec_schema_defs_windows_device.part.0'
#   46|       }
#   47|       while (0);
#   48|->     if (ret->id == NULL)
#   49|         {
#   50|           if (asprintf (err, "Required field '%s' not present", "id") < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def395]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:118:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c: scope_hint: In function 'free_runtime_spec_schema_defs_windows_device.part.0'
#  116|       if (ptr == NULL)
#  117|           return;
#  118|->     free (ptr->id);
#  119|       ptr->id = NULL;
#  120|       free (ptr->id_type);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def396]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:122:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:41:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c: scope_hint: In function 'free_runtime_spec_schema_defs_windows_device.part.0'
#  120|       free (ptr->id_type);
#  121|       ptr->id_type = NULL;
#  122|->     yajl_tree_free (ptr->_residual);
#  123|       ptr->_residual = NULL;
#  124|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def397]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:180:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c: scope_hint: In function 'free_runtime_spec_schema_defs_windows_device.part.0'
#  178|       if (ret == NULL)
#  179|         return NULL;
#  180|->     if (src->id != NULL)
#  181|         {
#  182|           ret->id = strdup (src->id);

Error: CPPCHECK_WARNING (CWE-401): [#def398]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_windows.c:184: error[memleak]: Memory leak: ret
#  182|           ret->id = strdup (src->id);
#  183|           if (ret->id == NULL)
#  184|->           return NULL;
#  185|         }
#  186|       if (src->id_type != NULL)

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def400]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def401]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:21:11: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
#   19|       if (tree == NULL)
#   20|         return NULL;
#   21|->     ret = calloc (1, sizeof (*ret));
#   22|       if (ret == NULL)
#   23|         return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def402]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:48:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c: scope_hint: In function 'free_runtime_spec_schema_defs_zos_namespace_reference.part.0'
#   46|       }
#   47|       while (0);
#   48|->     if (ret->type == NULL)
#   49|         {
#   50|           if (asprintf (err, "Required field '%s' not present", "type") < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def403]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:112:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c: scope_hint: In function 'free_runtime_spec_schema_defs_zos_namespace_reference.part.0'
#  110|       if (ptr == NULL)
#  111|           return;
#  112|->     free (ptr->type);
#  113|       ptr->type = NULL;
#  114|       free (ptr->path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def404]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:116:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c: scope_hint: In function 'free_runtime_spec_schema_defs_zos_namespace_reference.part.0'
#  114|       free (ptr->path);
#  115|       ptr->path = NULL;
#  116|->     yajl_tree_free (ptr->_residual);
#  117|       ptr->_residual = NULL;
#  118|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def405]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:174:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c: scope_hint: In function 'free_runtime_spec_schema_defs_zos_namespace_reference.part.0'
#  172|       if (ret == NULL)
#  173|         return NULL;
#  174|->     if (src->type != NULL)
#  175|         {
#  176|           ret->type = strdup (src->type);

Error: CPPCHECK_WARNING (CWE-401): [#def406]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:178: error[memleak]: Memory leak: ret
#  176|           ret->type = strdup (src->type);
#  177|           if (ret->type == NULL)
#  178|->           return NULL;
#  179|         }
#  180|       if (src->path != NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def407]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_zos.c:184: error[memleak]: Memory leak: ret
#  182|           ret->path = strdup (src->path);
#  183|           if (ret->path == NULL)
#  184|->           return NULL;
#  185|         }
#  186|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:180:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_cgroup.part.0'
#  178|       if (ptr == NULL)
#  179|           return;
#  180|->     yajl_tree_free (ptr->_residual);
#  181|       ptr->_residual = NULL;
#  182|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def409]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:510:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 104)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_seccomp'
#  508|       if (ptr == NULL)
#  509|           return;
#  510|->     if (ptr->actions != NULL)
#  511|         {
#  512|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:751:23: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 104)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_seccomp'
#  749|       if (ret == NULL)
#  750|         return NULL;
#  751|->     ret->enabled = src->enabled;
#  752|       ret->enabled_present = src->enabled_present;
#  753|       if (src->actions)

Error: CPPCHECK_WARNING (CWE-401): [#def411]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:758: error[memleak]: Memory leak: ret
#  756|           ret->actions = calloc (src->actions_len + 1, sizeof (*ret->actions));
#  757|           if (ret->actions == NULL)
#  758|->           return NULL;
#  759|           for (size_t i = 0; i < src->actions_len; i++)
#  760|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:867:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_apparmor.part.0'
#  865|       }
#  866|       while (0);
#  867|->     if (tree->type == yajl_t_object)
#  868|         {
#  869|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def413]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:924:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_apparmor.part.0'
#  922|       if (ptr == NULL)
#  923|           return;
#  924|->     yajl_tree_free (ptr->_residual);
#  925|       ptr->_residual = NULL;
#  926|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def414]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:924:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_apparmor.part.0'
#  922|       if (ptr == NULL)
#  923|           return;
#  924|->     yajl_tree_free (ptr->_residual);
#  925|       ptr->_residual = NULL;
#  926|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def415]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1006:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_selinux.part.0'
# 1004|       }
# 1005|       while (0);
# 1006|->     if (tree->type == yajl_t_object)
# 1007|         {
# 1008|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1063:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_selinux.part.0'
# 1061|       if (ptr == NULL)
# 1062|           return;
# 1063|->     yajl_tree_free (ptr->_residual);
# 1064|       ptr->_residual = NULL;
# 1065|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1063:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_selinux.part.0'
# 1061|       if (ptr == NULL)
# 1062|           return;
# 1063|->     yajl_tree_free (ptr->_residual);
# 1064|       ptr->_residual = NULL;
# 1065|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def418]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1145:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_intel_rdt.part.0'
# 1143|       }
# 1144|       while (0);
# 1145|->     if (tree->type == yajl_t_object)
# 1146|         {
# 1147|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1202:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_intel_rdt.part.0'
# 1200|       if (ptr == NULL)
# 1201|           return;
# 1202|->     yajl_tree_free (ptr->_residual);
# 1203|       ptr->_residual = NULL;
# 1204|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def420]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1202:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_intel_rdt.part.0'
# 1200|       if (ptr == NULL)
# 1201|           return;
# 1202|->     yajl_tree_free (ptr->_residual);
# 1203|       ptr->_residual = NULL;
# 1204|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def421]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1284:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
# 1282|       }
# 1283|       while (0);
# 1284|->     if (tree->type == yajl_t_object)
# 1285|         {
# 1286|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def422]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions_idmap.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1284:13: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions_idmap.part.0'
# 1282|       }
# 1283|       while (0);
# 1284|->     if (tree->type == yajl_t_object)
# 1285|         {
# 1286|           size_t i;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def423]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions_idmap.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1341:5: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions_idmap.part.0'
# 1339|       if (ptr == NULL)
# 1340|           return;
# 1341|->     yajl_tree_free (ptr->_residual);
# 1342|       ptr->_residual = NULL;
# 1343|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def424]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1341:5: warning[-Wanalyzer-malloc-leak]: leak of 'resi'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions_idmap.part.0'
# 1339|       if (ptr == NULL)
# 1340|           return;
# 1341|->     yajl_tree_free (ptr->_residual);
# 1342|       ptr->_residual = NULL;
# 1343|       free (ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def425]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1405:31: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
# 1403|         return NULL;
# 1404|       ret->idmap = make_runtime_spec_schema_features_linux_mount_extensions_idmap (get_val (tree, "idmap", yajl_t_object), ctx, err);
# 1405|->     if (ret->idmap == NULL && *err != 0)
# 1406|         return NULL;
# 1407|       if (tree->type == yajl_t_object)

Error: CPPCHECK_WARNING (CWE-401): [#def426]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1406: error[memleak]: Memory leak: ret
# 1404|       ret->idmap = make_runtime_spec_schema_features_linux_mount_extensions_idmap (get_val (tree, "idmap", yajl_t_object), ctx, err);
# 1405|       if (ret->idmap == NULL && *err != 0)
# 1406|->       return NULL;
# 1407|       if (tree->type == yajl_t_object)
# 1408|         {

Error: CPPCHECK_WARNING (CWE-401): [#def427]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1418: error[memleak]: Memory leak: ret
# 1416|               resi = calloc (1, sizeof(*tree));
# 1417|               if (resi == NULL)
# 1418|->               return NULL;
# 1419|   
# 1420|               resi->type = yajl_t_object;

Error: CPPCHECK_WARNING (CWE-401): [#def428]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1425: error[memleak]: Memory leak: ret
# 1423|                 {
# 1424|                   yajl_tree_free (resi);
# 1425|->                 return NULL;
# 1426|                 }
# 1427|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

Error: CPPCHECK_WARNING (CWE-401): [#def429]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1431: error[memleak]: Memory leak: ret
# 1429|                 {
# 1430|                   yajl_tree_free (resi);
# 1431|->                 return NULL;
# 1432|                 }
# 1433|             }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def430]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1467:20: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
# 1465|         {
# 1466|           free_runtime_spec_schema_features_linux_mount_extensions_idmap (ptr->idmap);
# 1467|->         ptr->idmap = NULL;
# 1468|         }
# 1469|       yajl_tree_free (ptr->_residual);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def431]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1512:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
# 1510|       if (ret == NULL)
# 1511|         return NULL;
# 1512|->     if (src->idmap)
# 1513|         {
# 1514|           ret->idmap = clone_runtime_spec_schema_features_linux_mount_extensions_idmap (src->idmap);

Error: CPPCHECK_WARNING (CWE-401): [#def432]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1516: error[memleak]: Memory leak: ret
# 1514|           ret->idmap = clone_runtime_spec_schema_features_linux_mount_extensions_idmap (src->idmap);
# 1515|           if (ret->idmap == NULL)
# 1516|->           return NULL;
# 1517|         }
# 1518|       return move_ptr (ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def433]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:2020:12: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 96)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux'
# 2018|       if (ret == NULL)
# 2019|         return NULL;
# 2020|->     if (src->namespaces)
# 2021|         {
# 2022|           ret->namespaces_len = src->namespaces_len;

Error: CPPCHECK_WARNING (CWE-401): [#def434]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:2025: error[memleak]: Memory leak: ret
# 2023|           ret->namespaces = calloc (src->namespaces_len + 1, sizeof (*ret->namespaces));
# 2024|           if (ret->namespaces == NULL)
# 2025|->           return NULL;
# 2026|           for (size_t i = 0; i < src->namespaces_len; i++)
# 2027|             {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:222:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 88)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c: scope_hint: In function 'free_runtime_spec_schema_features_schema.part.0'
#  220|       if (ptr == NULL)
#  221|           return;
#  222|->     free (ptr->oci_version_min);
#  223|       ptr->oci_version_min = NULL;
#  224|       free (ptr->oci_version_max);

Error: CPPCHECK_WARNING (CWE-401): [#def436]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:430: error[memleak]: Memory leak: ret
#  428|           ret->oci_version_min = strdup (src->oci_version_min);
#  429|           if (ret->oci_version_min == NULL)
#  430|->           return NULL;
#  431|         }
#  432|       if (src->oci_version_max != NULL)

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_state_schema.c:198:14: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_state_schema.c: scope_hint: In function 'free_runtime_spec_schema_state_schema.part.0'
#  196|       if (ptr == NULL)
#  197|           return;
#  198|->     free (ptr->oci_version);
#  199|       ptr->oci_version = NULL;
#  200|       free (ptr->id);

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

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

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def445]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 104)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1062:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1062:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:1062: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): [#def446]
crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema_config.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 120)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema_config.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_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): [#def447]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 128)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3434:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3434:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:3434: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): [#def448]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd_jail.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 152)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:488:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:488:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd_jail.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:488: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): [#def449]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c: scope_hint: In function 'free_image_spec_schema_image_layout_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_layout_schema.c: scope_hint: In function 'free_image_spec_schema_image_layout_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
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): [#def450]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_memory.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:167:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:167:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris_capped_memory.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:167: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): [#def451]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hypervisor.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hypervisor.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_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): [#def452]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_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): [#def453]
crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:8: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema_manifests_platform.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 56)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema_manifests_platform.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
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): [#def454]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.c: scope_hint: In function 'free_runtime_spec_schema_config_solaris.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_solaris.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): [#def455]
crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c: scope_hint: In function 'free_image_spec_schema_content_descriptor.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 80)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c: scope_hint: In function 'free_image_spec_schema_content_descriptor.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
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): [#def456]
crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c: scope_hint: In function 'free_runtime_spec_schema_features_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:150:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 88)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_schema.c: scope_hint: In function 'free_runtime_spec_schema_features_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_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): [#def457]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_block_io'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 104)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:293:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_block_io'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_block_io'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:293:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources_block_io'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:293:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_memory.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:30:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:30:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_memory.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:30:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:30:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:30:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:30:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_cpu'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:351:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_cpu'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_cpu'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:351:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_resources_cpu'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:351:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def461]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_syscall_arg.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 48)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:250:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_syscall_arg.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:250:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_user.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 56)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:942:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2782:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process_user.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:942:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema_manifests_element.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:373:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:373:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema_manifests_element.part.0'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:373:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 72)'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:658:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:658:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema.part.0'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:658:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 80)'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:42:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:42:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c: scope_hint: In function 'free_image_spec_schema_content_descriptor.part.0'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_content_descriptor.c:42:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 88)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:710:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:29:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:162:29: note: in expansion of macro 'YAJL_IS_STRING'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:255:25: note: in expansion of macro 'YAJL_GET_STRING'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:710:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm_hw_config.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:710:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:151:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 96)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:151:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:151:19: note: in expansion of macro 'YAJL_IS_NUMBER'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:151:19: note: in expansion of macro 'YAJL_IS_NUMBER'
#  149|   /* Various convenience macros to check the type of a `yajl_val` */
#  150|   #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
#  151|-> #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:8: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_net_devices'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:154:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:24:9: note: in expansion of macro 'YAJL_GET_OBJECT'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:24:9: note: in expansion of macro 'YAJL_GET_OBJECT'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:24:9: note: in expansion of macro 'YAJL_GET_OBJECT'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_net_devices'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:177:29: note: in expansion of macro 'YAJL_IS_OBJECT'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:24:9: note: in expansion of macro 'YAJL_GET_OBJECT'
#  152|   #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
#  153|   #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))
#  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  ))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_hooks'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 104)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:27:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_hooks'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
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): [#def470]
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 120)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:42:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema_config.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
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): [#def471]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 128)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:27:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema.part.0'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
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): [#def472]
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 152)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:522:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd_jail.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:522: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): [#def473]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 168)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2701:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_process'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:2701: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): [#def474]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 192)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3821:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:3821: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): [#def475]
crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c:8: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c: scope_hint: In function 'free_runtime_spec_schema_config_zos'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c:27:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.c: scope_hint: In function 'free_runtime_spec_schema_config_zos'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_zos.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): [#def476]
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema_rootfs'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:618:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c: scope_hint: In function 'free_image_spec_schema_config_schema_rootfs'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_config_schema.c:618: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): [#def477]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 40)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:39:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c: scope_hint: In function 'free_runtime_spec_schema_config_vm'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:39: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): [#def478]
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 56)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:63:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c: scope_hint: In function 'free_image_spec_schema_image_index_schema_manifests_platform.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/image_spec_schema_image_index_schema.c:63: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): [#def479]
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 64)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:39:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'free_runtime_spec_schema_defs_hook.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:39: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): [#def480]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_network'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 72)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:981:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_network'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_network'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_network'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows_network'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:981: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): [#def481]
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 80)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:612:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c: scope_hint: In function 'free_runtime_spec_schema_defs_mount.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs.c:612: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): [#def482]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 88)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1541:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c: scope_hint: In function 'free_runtime_spec_schema_config_windows'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_windows.c:1541: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): [#def483]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:155:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 96)'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2182:28: note: in expansion of macro 'YAJL_GET_ARRAY'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c: scope_hint: In function 'free_runtime_spec_schema_config_linux_resources.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:180:29: note: in expansion of macro 'YAJL_IS_ARRAY'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_linux.c:2182: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): [#def484]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_seccomp'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 104)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:304:28: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:304:28: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_seccomp'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:304:28: note: in expansion of macro 'YAJL_IS_TRUE'
#  154|   #define YAJL_IS_OBJECT(v) (((v) != NULL) && ((v)->type == yajl_t_object))
#  155|   #define YAJL_IS_ARRAY(v)  (((v) != NULL) && ((v)->type == yajl_t_array ))
#  156|-> #define YAJL_IS_TRUE(v)   (((v) != NULL) && ((v)->type == yajl_t_true  ))
#  157|   #define YAJL_IS_FALSE(v)  (((v) != NULL) && ((v)->type == yajl_t_false ))
#  158|   #define YAJL_IS_NULL(v)   (((v) != NULL) && ((v)->type == yajl_t_null  ))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def485]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 16)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1270:28: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1270:28: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_mount_extensions'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1270:28: note: in expansion of macro 'YAJL_IS_TRUE'
#  154|   #define YAJL_IS_OBJECT(v) (((v) != NULL) && ((v)->type == yajl_t_object))
#  155|   #define YAJL_IS_ARRAY(v)  (((v) != NULL) && ((v)->type == yajl_t_array ))
#  156|-> #define YAJL_IS_TRUE(v)   (((v) != NULL) && ((v)->type == yajl_t_true  ))
#  157|   #define YAJL_IS_FALSE(v)  (((v) != NULL) && ((v)->type == yajl_t_false ))
#  158|   #define YAJL_IS_NULL(v)   (((v) != NULL) && ((v)->type == yajl_t_null  ))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def486]
crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:8: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_cgroup.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 24)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:29:23: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:29:23: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c: scope_hint: In function 'free_runtime_spec_schema_features_linux_cgroup.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:29:23: note: in expansion of macro 'YAJL_IS_TRUE'
#  154|   #define YAJL_IS_OBJECT(v) (((v) != NULL) && ((v)->type == yajl_t_object))
#  155|   #define YAJL_IS_ARRAY(v)  (((v) != NULL) && ((v)->type == yajl_t_array ))
#  156|-> #define YAJL_IS_TRUE(v)   (((v) != NULL) && ((v)->type == yajl_t_true  ))
#  157|   #define YAJL_IS_FALSE(v)  (((v) != NULL) && ((v)->type == yajl_t_false ))
#  158|   #define YAJL_IS_NULL(v)   (((v) != NULL) && ((v)->type == yajl_t_null  ))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def487]
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 32)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:596:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:596:29: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c: scope_hint: In function 'free_runtime_spec_schema_config_schema_root.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.c:596:29: 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): [#def488]
crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:8: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd_jail_allow'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 48)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:29:33: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:29:33: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'free_runtime_spec_schema_config_freebsd_jail_allow'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:29: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): [#def489]
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_device_cgroup.part.0'
crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(1, 56)'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2002:26: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2002:26: note: in expansion of macro 'YAJL_IS_TRUE'
crun-HEAD/libocispec/src/ocispec/json_common.h:42:7: note: in definition of macro 'define_cleaner_function'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c: scope_hint: In function 'free_runtime_spec_schema_defs_linux_device_cgroup.part.0'
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_linux.c:2002: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-404): [#def490]
crun-HEAD/libocispec/yajl/src/yajl_gen.c: scope_hint: In function 'yajl_gen_config'
crun-HEAD/libocispec/yajl/src/yajl_gen.c:82:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
#   80|           }
#   81|           case yajl_gen_print_callback:
#   82|->             yajl_buf_free(g->ctx);
#   83|               g->print = va_arg(ap, const yajl_print_t);
#   84|               g->ctx = va_arg(ap, void *);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def491]
crun-HEAD/src/crun.c: scope_hint: In function 'libcrun_get_handler_manager'
crun-HEAD/src/crun.c:74:35: warning[-Wanalyzer-malloc-leak]: leak of 'strdup("/usr/local/lib/crun/handlers")'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#   72|   
#   73|         handlers_path = strdup (CRUN_LIBDIR "/handlers");
#   74|->       if (UNLIKELY (handlers_path == NULL))
#   75|           OOM ();
#   76|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def492]
crun-HEAD/src/exec.c:303:23: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  301|         process->env = exec_options.env;
#  302|         process->env_len = exec_options.env_size;
#  303|->       process->user = make_oci_process_user (exec_options.user);
#  304|   
#  305|         if (exec_options.process_label != NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def493]
crun-HEAD/src/exec.c:322:36: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/src/exec.c: scope_hint: In function 'crun_command_exec'
#  320|             capabilities->inheritable_len = 0;
#  321|   
#  322|->           capabilities->bounding = dup_array (exec_options.cap, exec_options.cap_size);
#  323|             capabilities->bounding_len = exec_options.cap_size;
#  324|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def494]
crun-HEAD/src/exec.c:325:35: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/src/exec.c: scope_hint: In function 'crun_command_exec'
#  323|             capabilities->bounding_len = exec_options.cap_size;
#  324|   
#  325|->           capabilities->ambient = dup_array (exec_options.cap, exec_options.cap_size);
#  326|             capabilities->ambient_len = exec_options.cap_size;
#  327|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def495]
crun-HEAD/src/exec.c:328:37: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/src/exec.c: scope_hint: In function 'crun_command_exec'
#  326|             capabilities->ambient_len = exec_options.cap_size;
#  327|   
#  328|->           capabilities->permitted = dup_array (exec_options.cap, exec_options.cap_size);
#  329|             capabilities->permitted_len = exec_options.cap_size;
#  330|   

Error: CPPCHECK_WARNING (CWE-457): [#def496]
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-401): [#def497]
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'check_cgroup_v2_controller_available_wrapper'
crun-HEAD/src/libcrun/cgroup-resources.c:156:11: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(name)'
#  154|         if (it == NULL)
#  155|           {
#  156|->           crun_error_release (err);
#  157|             return crun_make_error (err, 0, "the specified key has not the form CONTROLLER.VALUE `%s`", name);
#  158|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def498]
crun-HEAD/src/libcrun/cgroup-resources.c:166:11: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(name)'
#  164|   
#  165|         /* If the cgroup.controllers file cannot be read, return the original error.  */
#  166|->       if (read_all_file_at (cgroup_dirfd, "cgroup.controllers", &controllers, NULL, &tmp_err) < 0)
#  167|           {
#  168|             crun_error_release (&tmp_err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def499]
crun-HEAD/src/libcrun/cgroup-resources.c:168:11: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(name)'
#  166|         if (read_all_file_at (cgroup_dirfd, "cgroup.controllers", &controllers, NULL, &tmp_err) < 0)
#  167|           {
#  168|->           crun_error_release (&tmp_err);
#  169|             return ret;
#  170|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def500]
crun-HEAD/src/libcrun/cgroup-resources.c:171:20: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(name)'
#  169|             return ret;
#  170|           }
#  171|->       for (token = strtok_r (controllers, " \n", &saveptr); token; token = strtok_r (NULL, " \n", &saveptr))
#  172|           {
#  173|             if (strcmp (token, key) == 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def501]
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'open_cgroup_subsystem'
crun-HEAD/src/libcrun/cgroup-resources.c:1195:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(full_path, 2686976)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'open_cgroup_subsystem'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
# 1193|   
# 1194|     dirfd = open (full_path, O_DIRECTORY | O_PATH | O_CLOEXEC);
# 1195|->   if (UNLIKELY (dirfd < 0))
# 1196|       return crun_make_error (err, errno, "open `%s`", full_path);
# 1197|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def502]
crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'initialize_cpuset_subsystem'
crun-HEAD/src/libcrun/cgroup-setup.c:155:10: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
crun-HEAD/libocispec/src/ocispec/json_common.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.h:7: included_from: Included from here.
crun-HEAD/src/libcrun/container.h:23: included_from: Included from here.
/usr/include/string.h:439:15: note: argument 1 of '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): [#def503]
crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'enter_cgroup_v2'
crun-HEAD/src/libcrun/cgroup-setup.c:470:15: warning[-Wanalyzer-null-argument]: use of NULL 'cgroup_crun_exec_path' where non-null expected
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'enter_cgroup_v2'
/usr/include/string.h:174:12: note: argument 2 of 'strncmp' must be non-null
#  468|   
#  469|             /* Make sure the cgroup is below the initial cgroup specified for the container.  */
#  470|->           if (strncmp (path, cgroup_crun_exec_path, strlen (path)))
#  471|               {
#  472|                 free (cgroup_crun_exec_path);

Error: COMPILER_WARNING (CWE-704): [#def504]
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'get_systemd_scope_and_slice'
crun-HEAD/src/libcrun/cgroup-systemd.c:125:5: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  125 |   n = strchr (cgroup_path, ':');
#      |     ^
#  123|       }
#  124|   
#  125|->   n = strchr (cgroup_path, ':');
#  126|     if (n == NULL)
#  127|       xasprintf (scope, "%s.scope", cgroup_path);

Error: COMPILER_WARNING (CWE-704): [#def505]
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'append_systemd_annotation'
crun-HEAD/src/libcrun/cgroup-systemd.c:641:11: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  641 |       end = strchr (it + 1, '\'');
#      |           ^
#  639|         it = v_start = xstrdup (value);
#  640|   
#  641|->       end = strchr (it + 1, '\'');
#  642|         if (end == NULL)
#  643|           return crun_make_error (err, 0, "invalid variant `%s`", value);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def506]
crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'read_pids_cgroup'
crun-HEAD/src/libcrun/cgroup-utils.c:315:25: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(dfd)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/cgroup-utils.c:652:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-utils.c:652:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'read_pids_cgroup'
crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'read_pids_cgroup'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  313|   
#  314|         dir = fdopendir (dfd);
#  315|->       if (UNLIKELY (dir == NULL))
#  316|           return crun_make_error (err, errno, "open cgroup sub-directory");
#  317|         /* Now dir owns the dfd descriptor.  */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def507]
crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_cgroup_destroy'
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): [#def508]
crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_update_cgroup_resources'
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): [#def509]
crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_cgroup_preenter'
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): [#def510]
crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'libcrun_cgroup_enter'
crun-HEAD/src/libcrun/cgroup.c:323:23: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cgroup_manager'
#  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-775): [#def511]
crun-HEAD/src/libcrun/cloned_binary.c: scope_hint: In function 'is_self_cloned'
crun-HEAD/src/libcrun/cloned_binary.c:125:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/proc/self/exe", 524288)'
#  123|   	 * memfd to /usr/bin/crun to allow reuse).
#  124|   	 */
#  125|-> 	ret = fcntl(fd, F_GET_SEALS);
#  126|   	if (ret >= 0) {
#  127|   		is_cloned = (ret == CRUN_MEMFD_SEALS);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def512]
crun-HEAD/src/libcrun/cloned_binary.c: scope_hint: In function 'read_file'
crun-HEAD/src/libcrun/cloned_binary.c:191:40: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path, 524288)'
#  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-775): [#def513]
crun-HEAD/src/libcrun/cloned_binary.c:195:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path, 524288)'
#  193|   		*length += n;
#  194|   	}
#  195|-> 	close(fd);
#  196|   	return copy;
#  197|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def514]
crun-HEAD/src/libcrun/cloned_binary.c:195:9: warning[-Wanalyzer-malloc-leak]: leak of 'copy'
#  193|   		*length += n;
#  194|   	}
#  195|-> 	close(fd);
#  196|   	return copy;
#  197|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def515]
crun-HEAD/src/libcrun/cloned_binary.c:199:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(path, 524288)'
#  197|   
#  198|   error:
#  199|-> 	close(fd);
#  200|   	free(copy);
#  201|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def516]
crun-HEAD/src/libcrun/cloned_binary.c:199:9: warning[-Wanalyzer-malloc-leak]: leak of 'copy'
#  197|   
#  198|   error:
#  199|-> 	close(fd);
#  200|   	free(copy);
#  201|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def517]
crun-HEAD/src/libcrun/cloned_binary.c: scope_hint: In function 'seal_execfd'
crun-HEAD/src/libcrun/cloned_binary.c:360:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(&fdpath, 2621440)'
#  358|   			return -1;
#  359|   
#  360|-> 		close(*fd);
#  361|   		*fd = newfd;
#  362|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def518]
crun-HEAD/src/libcrun/cloned_binary.c: scope_hint: In function 'try_bindfd'
crun-HEAD/src/libcrun/cloned_binary.c:427:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ret'
#  425|   	if (umount2(template, MNT_DETACH) < 0) {
#  426|   		if (ret >= 0)
#  427|-> 			close(ret);
#  428|   		ret = -ENOTRECOVERABLE;
#  429|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def519]
crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'restore_cgroup_v1_mount'
crun-HEAD/src/libcrun/criu.c:373:22: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
/usr/include/features.h:540: included_from: Included from here.
/usr/include/unistd.h:25: included_from: Included from here.
#  371|         subsystem = strchr (from, ':') + 1;
#  372|         subpath = strchr (subsystem, ':') + 1;
#  373|->       *(subpath - 1) = '\0';
#  374|   
#  375|         if (subsystem[0] == '\0')

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

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

Error: GCC_ANALYZER_WARNING (CWE-476): [#def522]
crun-HEAD/src/libcrun/criu.c:445:20: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  443|         *(subpath - 1) = '\0';
#  444|   
#  445|->       if (subsystem[0] == '\0')
#  446|           continue;
#  447|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def523]
crun-HEAD/src/libcrun/custom-handler.h:23: included_from: Included from here.
crun-HEAD/src/libcrun/custom-handler.c:21: included_from: Included from here.
crun-HEAD/src/libcrun/custom-handler.c: scope_hint: In function 'libcrun_handler_manager_load_directory'
crun-HEAD/src/libcrun/custom-handler.c:172:21: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(path)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  170|   
#  171|     dir = opendir (path);
#  172|->   if (UNLIKELY (dir == NULL))
#  173|       return crun_make_error (err, errno, "cannot opendir `%s`", path);
#  174|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def524]
crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'read_all_progs'
crun-HEAD/src/libcrun/ebpf.c:294:18: warning[-Wanalyzer-infinite-loop]: infinite loop
#  292|         ret = bpf (BPF_PROG_QUERY, &attr, sizeof (attr));
#  293|       }
#  294|->   while (ret < 0 && errno == ENOSPC)
#  295|       ;
#  296|   

Error: COMPILER_WARNING (CWE-704): [#def525]
crun-HEAD/src/libcrun/error.c: scope_hint: In function 'get_log_type'
crun-HEAD/src/libcrun/error.c:194:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  192|   get_log_type (const char *log, const char **data)
#  193|   {
#  194|->   char *sep = strchr (log, ':');
#  195|     if (sep == NULL)
#  196|       {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def526]
crun-HEAD/src/libcrun/error.c: scope_hint: In function 'make_json_error'
crun-HEAD/src/libcrun/error.c:416:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'level'
#  414|   
#  415|     yajl_gen_string (gen, YAJL_STR ("level"), strlen ("level"));
#  416|->   yajl_gen_string (gen, YAJL_STR (level), strlen (level));
#  417|   
#  418|     yajl_gen_string (gen, YAJL_STR ("time"), strlen ("time"));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def527]
crun-HEAD/src/libcrun/error.c:427:3: warning[-Wanalyzer-malloc-leak]: leak of 'ret'
#  425|       ret = strdup ((const char *) buf);
#  426|   
#  427|->   yajl_gen_free (gen);
#  428|   
#  429|     return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def528]
crun-HEAD/src/libcrun/handlers/krun.c: scope_hint: In function 'libkrun_create_context.part.0'
crun-HEAD/src/libcrun/error.h:102:25: warning[-Wanalyzer-malloc-leak]: leak of 'kconf'
crun-HEAD/src/libcrun/handlers/krun.c:95:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/handlers/krun.c:95:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/handlers/krun.c:95:12: note: in expansion of macro 'crun_make_error'
#  100|   LIBCRUN_PUBLIC int libcrun_make_error (libcrun_error_t *err, int status, const char *msg, ...) __attribute__ ((format (printf, 3, 4)));
#  101|   
#  102|-> #define crun_make_error libcrun_make_error
#  103|   
#  104|   LIBCRUN_PUBLIC void libcrun_error_write_warning_and_release (FILE *out, libcrun_error_t **err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def529]
crun-HEAD/src/libcrun/error.h:102:25: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(name)'
crun-HEAD/src/libcrun/cgroup-resources.c:157:18: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-resources.c:157:18: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-resources.c:157:18: note: in expansion of macro 'crun_make_error'
#  100|   LIBCRUN_PUBLIC int libcrun_make_error (libcrun_error_t *err, int status, const char *msg, ...) __attribute__ ((format (printf, 3, 4)));
#  101|   
#  102|-> #define crun_make_error libcrun_make_error
#  103|   
#  104|   LIBCRUN_PUBLIC void libcrun_error_write_warning_and_release (FILE *out, libcrun_error_t **err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def530]
crun-HEAD/src/libcrun/handlers/krun.c: scope_hint: In function 'libkrun_create_context'
crun-HEAD/src/libcrun/handlers/krun.c:97:12: warning[-Wanalyzer-malloc-leak]: leak of 'kconf'
#   95|       return crun_make_error (err, 0, "could not find symbol in the krun library");
#   96|   
#   97|->   ctx_id = krun_create_ctx ();
#   98|     if (UNLIKELY (ctx_id < 0))
#   99|       return crun_make_error (err, -ctx_id, "could not create krun context");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def531]
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_set_sysctl'
crun-HEAD/src/libcrun/linux.c:3671:23: warning[-Wanalyzer-null-dereference]: dereference of NULL 'it'
# 3669|   
# 3670|         name = xstrdup (def->linux->sysctl->keys[i]);
# 3671|->       for (it = name; *it; it++)
# 3672|           if (*it == '.')
# 3673|             *it = '/';

Error: CPPCHECK_WARNING (CWE-457): [#def532]
crun-HEAD/src/libcrun/linux.c:3858: error[uninitvar]: Uninitialized variable: code
# 3856|         if (UNLIKELY (ret < 0))
# 3857|           return false;
# 3858|->       *error = code;
# 3859|       }
# 3860|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def533]
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'join_namespaces'
crun-HEAD/src/libcrun/linux.c:4015:17: warning[-Wanalyzer-null-argument]: use of NULL 'cwd' where non-null expected
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'join_namespaces'
/usr/include/unistd.h:517:12: note: argument 1 of 'chdir' must be non-null
# 4013|         if (value == CLONE_NEWNS)
# 4014|           {
# 4015|->           ret = chdir (cwd);
# 4016|             if (UNLIKELY (ret < 0))
# 4017|               return crun_make_error (err, errno, "chdir `%s`", cwd);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def534]
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_free_init_statusp.part.0'
crun-HEAD/src/libcrun/linux.c:4074:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*ns.fd_len'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_free_init_statusp.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_free_init_statusp.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_free_init_statusp.part.0'
# 4072|       return;
# 4073|   
# 4074|->   for (i = 0; i < ns->fd_len; i++)
# 4075|       TEMP_FAILURE_RETRY (close (ns->fd[i]));
# 4076|   }

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def535]
crun-HEAD/src/libcrun/linux.c:4075:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '*ns.fd[i]'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_free_init_statusp.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_free_init_statusp.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_free_init_statusp.part.0'
# 4073|   
# 4074|     for (i = 0; i < ns->fd_len; i++)
# 4075|->     TEMP_FAILURE_RETRY (close (ns->fd[i]));
# 4076|   }
# 4077|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def536]
crun-HEAD/src/libcrun/linux.c:4075:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'init_status.fd[0]'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_free_init_statusp.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_free_init_statusp.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_free_init_statusp.part.0'
# 4073|   
# 4074|     for (i = 0; i < ns->fd_len; i++)
# 4075|->     TEMP_FAILURE_RETRY (close (ns->fd[i]));
# 4076|   }
# 4077|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def537]
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'configure_init_status'
crun-HEAD/src/libcrun/linux.c:4125:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(**_18.path, 524288)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
# 4123|   
# 4124|             fd = open (def->linux->namespaces[i]->path, O_RDONLY | O_CLOEXEC);
# 4125|->           if (UNLIKELY (fd < 0))
# 4126|               return crun_make_error (err, errno, "open `%s`", def->linux->namespaces[i]->path);
# 4127|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def538]
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'is_bind_mount'
crun-HEAD/src/libcrun/linux.c:4202:19: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
# 4200|   
# 4201|     if (src_nofollow == NULL)
# 4202|->     *src_nofollow = false;
# 4203|   
# 4204|     for (i = 0; i < mnt->options_len; i++)

Error: GCC_ANALYZER_WARNING (CWE-465): [#def539]
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'precreate_device'
crun-HEAD/src/libcrun/linux.c:4407:6: warning[-Wanalyzer-deref-before-check]: check of '*def.linux' for NULL after already dereferencing it
# 4405|       return crun_make_error (err, errno, "mknod `%s`", device->path);
# 4406|   
# 4407|->   if (def->linux)
# 4408|       {
# 4409|         uid = get_id_in_user_namespace (device->uid, true, def);

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def540]
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'receive_mounts'
crun-HEAD/src/libcrun/linux.c:4666:29: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '*fds.fds[<unknown>]'
# 4664|   
# 4665|         if (fds->fds[index] >= 0)
# 4666|->         TEMP_FAILURE_RETRY (close (fds->fds[index]));
# 4667|   
# 4668|         fds->fds[index] = ret;

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def541]
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_join_process'
crun-HEAD/src/libcrun/linux.c:5707:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'sync_socket_fd[0]'
# 5705|   exit:
# 5706|     if (sync_socket_fd[0] >= 0)
# 5707|->     TEMP_FAILURE_RETRY (close (sync_socket_fd[0]));
# 5708|     if (sync_socket_fd[1] >= 0)
# 5709|       TEMP_FAILURE_RETRY (close (sync_socket_fd[1]));

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def542]
crun-HEAD/src/libcrun/linux.c:5709:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'sync_socket_fd[1]'
# 5707|       TEMP_FAILURE_RETRY (close (sync_socket_fd[0]));
# 5708|     if (sync_socket_fd[1] >= 0)
# 5709|->     TEMP_FAILURE_RETRY (close (sync_socket_fd[1]));
# 5710|     return ret;
# 5711|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def543]
crun-HEAD/src/libcrun/net_device.c: scope_hint: In function 'cleanup_ip_addrsp'
crun-HEAD/src/libcrun/net_device.c:92:3: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#   90|       free (ip->rta);
#   91|   
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def544]
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'open_rundir_dirfd'
crun-HEAD/src/libcrun/seccomp.c:471:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor '<unknown>'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  469|   
#  470|     dirfd = TEMP_FAILURE_RETRY (open (dir, O_PATH | O_DIRECTORY | O_CLOEXEC));
#  471|->   if (UNLIKELY (dirfd < 0))
#  472|       return crun_make_error (err, errno, "open `%s`", dir);
#  473|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def545]
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'evict_cache'
crun-HEAD/src/libcrun/seccomp.c:568:7: warning[-Wanalyzer-null-argument]: use of NULL 'entries' where non-null expected
crun-HEAD/src/libcrun/seccomp.h:22: included_from: Included from here.
/usr/include/stdlib.h:998:13: note: argument 1 of 'qsort' must be non-null
#  566|           }
#  567|   
#  568|->       qsort (entries, n_entries, sizeof (struct cache_entry), compare_entries_by_atime);
#  569|   
#  570|         /* Attempt to delete half of them.  */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def546]
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-HEAD/src/libcrun/seccomp.c:597:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '**ctx.container.context'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
#  595|   
#  596|     /* relative path to dirfd.  */
#  597|->   ret = append_paths (&src_path, err, container->context->id, "seccomp.bpf", NULL);
#  598|     if (UNLIKELY (ret < 0))
#  599|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def547]
crun-HEAD/src/libcrun/seccomp.c:597:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '*container.context'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
#  595|   
#  596|     /* relative path to dirfd.  */
#  597|->   ret = append_paths (&src_path, err, container->context->id, "seccomp.bpf", NULL);
#  598|     if (UNLIKELY (ret < 0))
#  599|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def548]
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'get_run_directory'
crun-HEAD/src/libcrun/status.c:86:1: warning[-Wanalyzer-malloc-leak]: leak of 'root'
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-401): [#def549]
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'rmdirfd'
crun-HEAD/src/libcrun/status.c:540:13: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(fd)'
#  538|     fd_cleanup = -1;
#  539|   
#  540|->   for (de = readdir (d); de; de = readdir (d))
#  541|       {
#  542|         if ((strcmp (de->d_name, ".") == 0) || (strcmp (de->d_name, "..") == 0))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def550]
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_container_delete_status'
crun-HEAD/src/libcrun/status.c:620:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'rundir_dfd'
crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_container_delete_status'
#  618|   
#  619|     return 0;
#  620|-> }
#  621|   
#  622|   void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def551]
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_get_containers_list'
crun-HEAD/src/libcrun/status.c:652:21: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(root)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  650|   
#  651|     dir = opendir (root);
#  652|->   if (UNLIKELY (dir == NULL))
#  653|       return crun_make_error (err, errno, "cannot opendir `%s`", root);
#  654|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def552]
crun-HEAD/src/libcrun/status.h:74:6: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'tmp'
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_get_containers_list'
crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_get_containers_list'
#   72|   {
#   73|     libcrun_container_list_t **l = (libcrun_container_list_t **) p;
#   74|->   if (*l != NULL)
#   75|       libcrun_free_containers_list (*l);
#   76|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def553]
crun-HEAD/src/libcrun/syscalls.h:115:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'libcrun_get_cached_proc_fd(container,  err)'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'libcrun_open_proc_file'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'libcrun_open_proc_file'
#  113|   {
#  114|   #if defined __NR_fsopen
#  115|->   return (int) syscall (__NR_fsopen, fs_name, flags);
#  116|   #else
#  117|     (void) fs_name;

Error: COMPILER_WARNING (CWE-704): [#def554]
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'crun_safe_ensure_at'
crun-HEAD/src/libcrun/utils.c:576:10: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  574|         cur = consume_slashes (it + 1);
#  575|         *it = '/';
#  576|->       it = strchr (cur, '/');
#  577|       }
#  578|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def555]
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'unset_cloexec_flag'
crun-HEAD/src/libcrun/utils.c:1620:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dev_null_fd'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'unset_cloexec_flag'
# 1618|   unset_cloexec_flag (int fd)
# 1619|   {
# 1620|->   int flags = fcntl (fd, F_GETFD);
# 1621|     if (flags == -1)
# 1622|       return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def556]
crun-HEAD/src/libcrun/utils.c:1626:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dev_null_fd'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'unset_cloexec_flag'
# 1624|     flags &= ~FD_CLOEXEC;
# 1625|   
# 1626|->   return fcntl (fd, F_SETFD, flags);
# 1627|   }
# 1628|   

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def557]
crun-HEAD/src/libcrun/utils.c:1649:23: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipe_w'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'run_process_child'
# 1647|       }
# 1648|   
# 1649|->   TEMP_FAILURE_RETRY (close (pipe_w));
# 1650|     dup2 (pipe_r, 0);
# 1651|     TEMP_FAILURE_RETRY (close (pipe_r));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def558]
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'run_process_child'
crun-HEAD/src/libcrun/utils.c:1649:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dev_null_fd'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'run_process_child'
# 1647|       }
# 1648|   
# 1649|->   TEMP_FAILURE_RETRY (close (pipe_w));
# 1650|     dup2 (pipe_r, 0);
# 1651|     TEMP_FAILURE_RETRY (close (pipe_r));

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def559]
crun-HEAD/src/libcrun/utils.c:1651:23: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipe_r'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'run_process_child'
# 1649|     TEMP_FAILURE_RETRY (close (pipe_w));
# 1650|     dup2 (pipe_r, 0);
# 1651|->   TEMP_FAILURE_RETRY (close (pipe_r));
# 1652|   
# 1653|     dup2 (out_fd >= 0 ? out_fd : dev_null_fd, 1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def560]
crun-HEAD/src/libcrun/utils.c:1651:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dev_null_fd'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'run_process_child'
# 1649|     TEMP_FAILURE_RETRY (close (pipe_w));
# 1650|     dup2 (pipe_r, 0);
# 1651|->   TEMP_FAILURE_RETRY (close (pipe_r));
# 1652|   
# 1653|     dup2 (out_fd >= 0 ? out_fd : dev_null_fd, 1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def561]
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'find_executable'
crun-HEAD/src/libcrun/utils.c:1991:22: warning[-Wanalyzer-null-dereference]: dereference of NULL 'executable_path'
# 1989|   
# 1990|     /* Absolute path.  It doesn't need to lookup $PATH.  */
# 1991|->   if (executable_path[0] == '/')
# 1992|       {
# 1993|         ret = check_access (executable_path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def562]
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'copy_recursive_fd_to_fd'
crun-HEAD/src/libcrun/utils.c:2187:24: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(srcdirfd)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
# 2185|   
# 2186|     dsrcfd = fdopendir (srcdirfd);
# 2187|->   if (UNLIKELY (dsrcfd == NULL))
# 2188|       {
# 2189|         TEMP_FAILURE_RETRY (close (srcdirfd));

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def563]
crun-HEAD/src/libcrun/utils.c:2189:27: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'srcdirfd'
# 2187|     if (UNLIKELY (dsrcfd == NULL))
# 2188|       {
# 2189|->       TEMP_FAILURE_RETRY (close (srcdirfd));
# 2190|         return crun_make_error (err, errno, "open directory `%s`", destname);
# 2191|       }

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def564]
crun-HEAD/src/libcrun/utils.c:2233:31: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'destfd'
# 2231|   #endif
# 2232|   
# 2233|->           TEMP_FAILURE_RETRY (close (destfd));
# 2234|             destfd = -1;
# 2235|             break;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def565]
crun-HEAD/src/libcrun/utils.c:2267: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
# 2265|               return ret;
# 2266|   
# 2267|->           ret = symlinkat (target_buf, destdirfd, de->d_name);
# 2268|             if (UNLIKELY (ret < 0))
# 2269|               return crun_make_error (err, errno, "symlinkat `%s/%s`", destname, de->d_name);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def566]
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'read_file_as_long_or_default'
crun-HEAD/src/libcrun/utils.c:2580:9: warning[-Wanalyzer-null-argument]: use of NULL 'content' where non-null expected
/usr/include/stdlib.h:219:17: note: argument 1 of 'strtol' must be non-null
# 2578|   
# 2579|     errno = 0;
# 2580|->   val = strtol (content, &endptr, 10);
# 2581|     if (UNLIKELY (errno))
# 2582|       return def_value;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def567]
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'read_dir_entries'
crun-HEAD/src/libcrun/utils.c:2640:21: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(path)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'read_dir_entries'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
# 2638|   
# 2639|     dir = opendir (path);
# 2640|->   if (UNLIKELY (dir == NULL))
# 2641|       {
# 2642|         crun_make_error (err, errno, "opendir `%s`", path);

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def568]
crun-HEAD/src/libcrun/utils.c:2878:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '<unknown>'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'libcrun_open_proc_file'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'libcrun_open_proc_file'
# 2876|     /* requires closing if not cached */
# 2877|     if (! container)
# 2878|->     TEMP_FAILURE_RETRY (close (proc_fd));
# 2879|   
# 2880|     if (UNLIKELY (fd < 0))

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def569]
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'libcrun_open_proc_file'
crun-HEAD/src/libcrun/utils.c:2878:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'libcrun_get_cached_proc_fd(container,  err)'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'libcrun_open_proc_file'
# 2876|     /* requires closing if not cached */
# 2877|     if (! container)
# 2878|->     TEMP_FAILURE_RETRY (close (proc_fd));
# 2879|   
# 2880|     if (UNLIKELY (fd < 0))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def570]
crun-HEAD/src/libcrun/intelrdt.c:23: included_from: Included from here.
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'compare_rdt_configurations'
crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((n_parts_a + 1) * 8)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/intelrdt.c: scope_hint: In function 'compare_rdt_configurations'
/usr/include/features.h:540: 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-HEAD/src/libcrun/linux.h:21: included_from: Included from here.
crun-HEAD/src/libcrun/intelrdt.c:22: included_from: Included from here.
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): [#def571]
crun-HEAD/src/libcrun/utils.c:21: included_from: Included from here.
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'channel_fd_pair_new'
crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(24)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
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): [#def572]
crun-HEAD/src/exec.c:30: included_from: Included from here.
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'crun_command_exec'
crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(88)'
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-HEAD/src/libcrun/utils.h:29: included_from: Included from here.
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'crun_command_exec'
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): [#def573]
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'copy_from_fd_to_fd'
crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(get_page_size())'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/utils.h:24: included_from: Included from here.
crun-HEAD/src/libcrun/utils.h:26: included_from: Included from here.
crun-HEAD/src/libcrun/utils.c:1343:16: note: in expansion of macro 'crun_make_error'
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): [#def574]
crun-HEAD/src/libcrun/seccomp.c:25: included_from: Included from here.
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_copy_seccomp'
crun-HEAD/src/libcrun/utils.h:65:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(in_size + 1)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
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): [#def575]
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'crun_command_exec'
crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(168)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
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): [#def576]
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'make_oci_process_user'
crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(56)'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
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): [#def577]
crun-HEAD/src/libcrun/net_device.c:23: included_from: Included from here.
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'xrealloc'
crun-HEAD/src/libcrun/utils.h:82:15: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#   80|   xrealloc (void *ptr, size_t size)
#   81|   {
#   82|->   void *res = realloc (ptr, size);
#   83|     if (UNLIKELY (res == NULL))
#   84|       OOM ();

Error: GCC_ANALYZER_WARNING (CWE-415): [#def578]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of 'progs'
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): [#def579]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-double-free]: double-'free' of 'tmp_buf'
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-775): [#def580]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'cgroup_dirfd'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'update_cgroup_v2_resources'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'update_cgroup_v2_resources'
crun-HEAD/src/libcrun/error.h:42: included_from: Included from here.
crun-HEAD/src/libcrun/container.h:24: included_from: Included from here.
crun-HEAD/src/libcrun/cgroup.h:21: included_from: Included from here.
crun-HEAD/src/libcrun/cgroup-resources.c:22: included_from: Included from here.
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def581]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dirfd'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-HEAD/src/libcrun/error.h:42: included_from: Included from here.
crun-HEAD/src/libcrun/seccomp.h:23: included_from: Included from here.
crun-HEAD/src/libcrun/seccomp.c:23: included_from: Included from here.
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'store_seccomp_cache'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

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

Error: GCC_ANALYZER_WARNING (CWE-457): [#def583]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'a_copy'
crun-HEAD/src/libcrun/intelrdt.c: scope_hint: In function 'compare_rdt_configurations'
crun-HEAD/src/libcrun/intelrdt.c: scope_hint: In function 'compare_rdt_configurations'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def584]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'allocated_mems'
crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'initialize_cpuset_subsystem_rec'
crun-HEAD/src/libcrun/utils.h:24: included_from: Included from here.
crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'initialize_cpuset_subsystem_rec'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'initialize_cpuset_subsystem_rec'
crun-HEAD/src/libcrun/error.h:42: included_from: Included from here.
crun-HEAD/src/libcrun/container.h:24: included_from: Included from here.
crun-HEAD/src/libcrun/cgroup.h:21: included_from: Included from here.
crun-HEAD/src/libcrun/cgroup-setup.c:22: included_from: Included from here.
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def585]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'b'
crun-HEAD/src/libcrun/seccomp_notify.c: scope_hint: In function 'libcrun_load_seccomp_notify_plugins'
crun-HEAD/src/libcrun/seccomp_notify.c:19: included_from: Included from here.
crun-HEAD/src/libcrun/utils.h:26: included_from: Included from here.
crun-HEAD/src/libcrun/seccomp_notify.c:93:12: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def586]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'bpf_data'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'libcrun_copy_seccomp'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def587]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'buf'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'copy_xattr'
crun-HEAD/src/libcrun/utils.c:2101:14: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/utils.c:2101:14: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def588]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'buffer'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'safe_read_xattr'
crun-HEAD/src/libcrun/utils.c:2067:16: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def589]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'bundle_cleanup'
crun-HEAD/src/spec.c: scope_hint: In function 'crun_command_spec'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def590]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'cleaned_l3_cache_schema'
crun-HEAD/src/libcrun/intelrdt.c: scope_hint: In function 'resctl_update'
crun-HEAD/src/libcrun/linux.h:24: included_from: Included from here.
crun-HEAD/src/libcrun/linux.h:23: included_from: Included from here.
crun-HEAD/src/libcrun/intelrdt.c:225:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'resctl_update'
crun-HEAD/src/libcrun/error.h:42: included_from: Included from here.
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def591]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'config_file_cleanup'
crun-HEAD/src/run_create.c: scope_hint: In function 'crun_run_create_internal'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def592]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'cwd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'join_namespaces'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def593]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'cwd_allocated'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'find_executable'
/usr/include/features.h:540: 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-HEAD/src/libcrun/utils.h:22: included_from: Included from here.
crun-HEAD/src/libcrun/utils.c:2359:18: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/utils.c:2359:18: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def594]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'dup_options'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'maybe_create_userns_for_idmapped_mount'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'maybe_create_userns_for_idmapped_mount'
crun-HEAD/src/libcrun/linux.c:572:16: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c:572:16: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def595]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'entries'
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-457): [#def596]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'handlers_path'
crun-HEAD/src/crun.c: scope_hint: In function 'libcrun_get_handler_manager'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def597]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'json'
crun-HEAD/src/libcrun/error.c: scope_hint: In function 'write_log'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def598]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'key'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'check_cgroup_v2_controller_available_wrapper'
crun-HEAD/src/libcrun/utils.h:24: included_from: Included from here.
/usr/include/features.h:540: included_from: Included from here.
/usr/include/sys/types.h:25: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.h:5: included_from: Included from here.
crun-HEAD/src/libcrun/container.h:23: included_from: Included from here.
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def599]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'log'
crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'libcrun_ebpf_load'
crun-HEAD/src/libcrun/ebpf.c:526:18: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def600]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'mappings'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'parse_idmapped_mount_option'
/usr/include/features.h:540: 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-HEAD/src/libcrun/linux.h:21: included_from: Included from here.
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'parse_idmapped_mount_option'
crun-HEAD/src/libcrun/linux.c:364:20: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c:364:20: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def601]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'mask'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'cpuset_string_to_bitmask'
crun-HEAD/src/libcrun/utils.c:2730:10: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def602]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'name'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_set_sysctl'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_set_sysctl'
crun-HEAD/src/libcrun/linux.c:3598:20: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c:3598:20: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c:3598:20: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_set_sysctl'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def603]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'path_to_scope'
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'libcrun_destroy_cgroup_systemd'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def604]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'period_str'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'write_cpu_resources'
crun-HEAD/src/libcrun/cgroup-resources.c:1196:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-resources.c:1052:16: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-resources.c:1052:16: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def605]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'program'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'write_devices_resources_v2_internal'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def606]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'progs'
crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'read_all_progs'
crun-HEAD/src/libcrun/ebpf.c:298:12: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def607]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'reason'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_set_sysctl'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_set_sysctl'
crun-HEAD/src/libcrun/linux.c:3608:16: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c:3689:18: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c:3689:18: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c:3689:18: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def608]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'ret'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'format_mount_mappings'
crun-HEAD/src/libcrun/linux.c:443:16: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def609]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'schemata_joined'
crun-HEAD/src/libcrun/intelrdt.c: scope_hint: In function 'get_rdt_value'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def610]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'tmp'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'find_executable'
crun-HEAD/src/libcrun/utils.c:1967:12: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def611]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'tmp_buf'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'safe_readlinkat'
crun-HEAD/src/libcrun/utils.c:434:16: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def612]
crun-HEAD/src/libcrun/utils.h:92:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'v_start'
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'append_systemd_annotation'
/usr/include/features.h:540: included_from: Included from here.
/usr/include/sys/types.h:25: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.h:5: included_from: Included from here.
crun-HEAD/src/libcrun/container.h:23: included_from: Included from here.
crun-HEAD/src/libcrun/cgroup.h:21: included_from: Included from here.
crun-HEAD/src/libcrun/cgroup-systemd.c:22: included_from: Included from here.
crun-HEAD/src/libcrun/container.h:24: included_from: Included from here.
crun-HEAD/src/libcrun/cgroup-systemd.c:643:16: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-systemd.c:643:16: note: in expansion of macro 'crun_make_error'
#   90|   {
#   91|     void **pp = (void **) p;
#   92|->   free (*pp);
#   93|   }
#   94|   

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def613]
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
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): [#def614]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '<unknown>'
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): [#def615]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'binfd'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
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): [#def616]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'cfd'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def617]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'cgroup_dirfd'
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): [#def618]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'cgroup_fd'
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): [#def619]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'client_fd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
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): [#def620]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'console_socket_fd'
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): [#def621]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'current_mountns'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c:4572:13: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def622]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dest_fd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def623]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'destdirfd'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def624]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'devfd'
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): [#def625]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd'
crun-HEAD/src/libcrun/cgroup-setup.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def626]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd_cpu'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/cgroup-resources.c:1052:16: note: in expansion of macro 'crun_make_error'
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): [#def627]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd_cpuset'
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def628]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd_htlb'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def629]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd_netclass'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def630]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dirfd_pid'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def631]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd'
crun-HEAD/src/libcrun/cgroup.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def632]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd_cleanup'
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): [#def633]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'map_fd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c:364:20: note: in expansion of macro 'crun_make_error'
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): [#def634]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'memfd'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
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): [#def635]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'netns_fd'
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): [#def636]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'nfd'
crun-HEAD/src/libcrun/cgroup-utils.c:652:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-utils.c:652:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
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): [#def637]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'root_fd'
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): [#def638]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'rootfsfd_cleanup'
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): [#def639]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'rundir_dfd'
crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-HEAD/src/libcrun/utils.h:24: included_from: Included from here.
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def640]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'sock'
crun-HEAD/src/libcrun/net_device.c:111:12: note: in expansion of macro 'crun_make_error'
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): [#def641]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'sockfd'
crun-HEAD/src/libcrun/linux.c:5797:16: note: in expansion of macro 'crun_make_error'
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): [#def642]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'srcfd'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def643]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'sync_fd'
crun-HEAD/src/libcrun/linux.c:5284:12: note: in expansion of macro 'crun_make_error'
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): [#def644]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'tasksfd'
crun-HEAD/src/libcrun/cgroup-utils.c:652:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-utils.c:652:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/cgroup-utils.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def645]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'wfd'
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): [#def646]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dirfd'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def647]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dirfd_cpu'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/cgroup-resources.c:1052:16: note: in expansion of macro 'crun_make_error'
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): [#def648]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dirfd_htlb'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def649]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dirfd_netclass'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def650]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dirfd_pid'
crun-HEAD/src/libcrun/cgroup-resources.c: scope_hint: In function 'cleanup_closep.part.0'
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): [#def651]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
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): [#def652]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ret'
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): [#def653]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'root_fd'
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): [#def654]
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_set_stdio'
crun-HEAD/src/libcrun/utils.h:109:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ret'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_set_stdio'
#  107|     if (*pp >= 0)
#  108|       TEMP_FAILURE_RETRY (close (*pp));
#  109|-> }
#  110|   
#  111|   static inline void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def655]
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_close_mapp'
crun-HEAD/src/libcrun/utils.h:181:27: warning[-Wanalyzer-malloc-leak]: leak of 'mount_fds'
#  179|     for (i = 0; i < m->nfds; i++)
#  180|       if (m->fds[i] >= 0)
#  181|->       TEMP_FAILURE_RETRY (close (m->fds[i]));
#  182|   
#  183|     free (m);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def656]
crun-HEAD/src/libcrun/utils.h:203:6: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'd'
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'rmdirfd'
crun-HEAD/src/libcrun/status.c: scope_hint: In function 'rmdirfd'
#  201|   {
#  202|     DIR *dir = *p;
#  203|->   if (dir)
#  204|       closedir (dir);
#  205|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def657]
crun-HEAD/src/libcrun/utils.h:204:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'read_dir_entries'
#  202|     DIR *dir = *p;
#  203|     if (dir)
#  204|->     closedir (dir);
#  205|   }
#  206|   

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

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def659]
crun-HEAD/src/libcrun/utils.h:213:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
#  211|     if (*fd >= 0)
#  212|       {
#  213|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  214|         if (LIKELY (ret == 0))
#  215|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def660]
crun-HEAD/src/libcrun/utils.h:213:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'memfd'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  211|     if (*fd >= 0)
#  212|       {
#  213|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  214|         if (LIKELY (ret == 0))
#  215|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def661]
crun-HEAD/src/libcrun/utils.h:213:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'targetfd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
#  211|     if (*fd >= 0)
#  212|       {
#  213|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  214|         if (LIKELY (ret == 0))
#  215|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def662]
crun-HEAD/src/spec.c: scope_hint: In function 'crun_command_spec'
crun-HEAD/src/spec.c:130:47: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(where, "w+e")'
#  128|       return libcrun_make_error (err, errno, "cannot open `%s`", where);
#  129|   
#  130|->   ret = libcrun_container_spec (! spec_options.rootless, f, err);
#  131|   
#  132|     return ret >= 0 ? 0 : ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def663]
crun-HEAD/src/spec.c:130:47: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(where, "w+e")'
#  128|       return libcrun_make_error (err, errno, "cannot open `%s`", where);
#  129|   
#  130|->   ret = libcrun_container_spec (! spec_options.rootless, f, err);
#  131|   
#  132|     return ret >= 0 ? 0 : ret;

Scan Properties

analyzer-version-clippy1.93.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.1
analyzer-version-gcc-analyzer16.0.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-102.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260119.105402.g7a5be1b.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namecrun-1.26-1.20260201201124532167.main.47.gb05680e3
store-results-to/tmp/tmpi952vmkb/crun-1.26-1.20260201201124532167.main.47.gb05680e3.tar.xz
time-created2026-02-02 07:52:55
time-finished2026-02-02 08:03:28
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,unicontrol,shellcheck,gcc,clippy' '-o' '/tmp/tmpi952vmkb/crun-1.26-1.20260201201124532167.main.47.gb05680e3.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpi952vmkb/crun-1.26-1.20260201201124532167.main.47.gb05680e3.src.rpm'
tool-versioncsmock-3.8.3.20260128.181932.g41af877-1.el9