Task #335 - added.err

back to task #335
download
Error: CPPCHECK_WARNING (CWE-401):
crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1256: error[memleak]: Memory leak: ret
# 1254|       ret->idmap = make_runtime_spec_schema_features_linux_mount_extensions_idmap (get_val (tree, "idmap", yajl_t_object), ctx, err);
# 1255|       if (ret->idmap == NULL && *err != 0)
# 1256|->       return NULL;
# 1257|   
# 1258|       if (tree->type == yajl_t_object)

Error: CLANG_WARNING:
crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1256:14: warning[unix.Malloc]: Potential leak of memory pointed to by 'ret'
# 1254|       ret->idmap = make_runtime_spec_schema_features_linux_mount_extensions_idmap (get_val (tree, "idmap", yajl_t_object), ctx, err);
# 1255|       if (ret->idmap == NULL && *err != 0)
# 1256|->       return NULL;
# 1257|   
# 1258|       if (tree->type == yajl_t_object)

Error: CPPCHECK_WARNING (CWE-401):
crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1269: error[memleak]: Memory leak: ret
# 1267|               resi = calloc (1, sizeof(*tree));
# 1268|               if (resi == NULL)
# 1269|->               return NULL;
# 1270|   
# 1271|               resi->type = yajl_t_object;

Error: CPPCHECK_WARNING (CWE-401):
crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1276: error[memleak]: Memory leak: ret
# 1274|                 {
# 1275|                   yajl_tree_free (resi);
# 1276|->                 return NULL;
# 1277|                 }
# 1278|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

Error: CLANG_WARNING:
crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1276:17: warning[unix.Malloc]: Potential leak of memory pointed to by 'resi'
# 1274|                 {
# 1275|                   yajl_tree_free (resi);
# 1276|->                 return NULL;
# 1277|                 }
# 1278|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

Error: CPPCHECK_WARNING (CWE-401):
crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1282: error[memleak]: Memory leak: ret
# 1280|                 {
# 1281|                   yajl_tree_free (resi);
# 1282|->                 return NULL;
# 1283|                 }
# 1284|             }

Error: CLANG_WARNING:
crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1378:22: warning[unix.Malloc]: Potential leak of memory pointed to by 'ret'
# 1376|               ret->namespaces = calloc (len + 1, sizeof (*ret->namespaces));
# 1377|               if (ret->namespaces == NULL)
# 1378|->               return NULL;
# 1379|               for (i = 0; i < len; i++)
# 1380|                 {

Error: CLANG_WARNING:
crun-1.15-build/crun-1.15/libocispec/src/ocispec/runtime_spec_schema_features_linux.c:1456:17: warning[unix.Malloc]: Potential leak of memory pointed to by 'resi'
# 1454|                 {
# 1455|                   yajl_tree_free (resi);
# 1456|->                 return NULL;
# 1457|                 }
# 1458|               resi->u.object.values = calloc (cnt, sizeof (yajl_val));

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

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