Task #34107 - fixed.err

back to task #34107
download
Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c:461:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open_rundir_dirfd(*container_44->context.state_root,  err)'
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY'
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY'
#  459|   
#  460|     dir = libcrun_get_state_directory (state_root, NULL);
#  461|->   if (UNLIKELY (dir == NULL))
#  462|       return crun_make_error (err, 0, "cannot get state directory");
#  463|   

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

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

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_container_delete_status'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:50:12: warning[-Wanalyzer-malloc-leak]: leak of 'get_run_directory(state_root)'
#   48|     if (state_root)
#   49|       root = xstrdup (state_root);
#   50|->   if (root == NULL)
#   51|       {
#   52|         const char *runtime_dir = getenv ("XDG_RUNTIME_DIR");

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_container_delete_status'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:536:36: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(get_run_directory(state_root), 2686976)'
#  534|       return crun_make_error (err, 0, "cannot get state directory");
#  535|   
#  536|->   rundir_dfd = TEMP_FAILURE_RETRY (open (dir, O_DIRECTORY | O_PATH | O_CLOEXEC));
#  537|     if (UNLIKELY (rundir_dfd < 0))
#  538|       return crun_make_error (err, errno, "cannot open run directory `%s`", dir);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:583:9: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(get_run_directory(state_root))'
#  581|   
#  582|     *ret = NULL;
#  583|->   dir = opendir (path);
#  584|     if (UNLIKELY (dir == NULL))
#  585|       return crun_make_error (err, errno, "cannot opendir `%s`", path);

Error: GCC_ANALYZER_WARNING (CWE-688):
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_get_containers_list'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:583:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:27: included_from: Included from here.
/usr/include/dirent.h:141:13: note: argument 1 of 'opendir' must be non-null
#  581|   
#  582|     *ret = NULL;
#  583|->   dir = opendir (path);
#  584|     if (UNLIKELY (dir == NULL))
#  585|       return crun_make_error (err, errno, "cannot opendir `%s`", path);

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