Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
libblockdev-3.4.0/src/plugins/fs/mount.c:491:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'pipefd[0]'
libblockdev-3.4.0/src/plugins/fs/mount.c:631:10: enter_function: entry to 'bd_fs_unmount'
libblockdev-3.4.0/src/plugins/fs/mount.c:652:8: branch_true: following 'true' branch (when 'extra' is non-NULL)...
libblockdev-3.4.0/src/plugins/fs/mount.c:652:8: branch_true: ...to here
libblockdev-3.4.0/src/plugins/fs/mount.c:653:29: branch_true: following 'true' branch...
libblockdev-3.4.0/src/plugins/fs/mount.c:654:17: branch_true: ...to here
libblockdev-3.4.0/src/plugins/fs/mount.c:654:16: branch_true: following 'true' branch...
libblockdev-3.4.0/src/plugins/fs/mount.c:680:8: branch_true: following 'true' branch...
libblockdev-3.4.0/src/plugins/fs/mount.c:681:15: branch_true: ...to here
libblockdev-3.4.0/src/plugins/fs/mount.c:681:15: call_function: calling 'run_as_user' from 'bd_fs_unmount'
#  489|           g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,
#  490|                        "Not running as root, cannot change the UID/GID.");
#  491|->         return FALSE;
#  492|       }
#  493|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
libblockdev-3.4.0/src/plugins/fs/mount.c:491:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'pipefd[1]'
libblockdev-3.4.0/src/plugins/fs/mount.c:631:10: enter_function: entry to 'bd_fs_unmount'
libblockdev-3.4.0/src/plugins/fs/mount.c:652:8: branch_true: following 'true' branch (when 'extra' is non-NULL)...
libblockdev-3.4.0/src/plugins/fs/mount.c:652:8: branch_true: ...to here
libblockdev-3.4.0/src/plugins/fs/mount.c:653:29: branch_true: following 'true' branch...
libblockdev-3.4.0/src/plugins/fs/mount.c:654:17: branch_true: ...to here
libblockdev-3.4.0/src/plugins/fs/mount.c:654:16: branch_true: following 'true' branch...
libblockdev-3.4.0/src/plugins/fs/mount.c:680:8: branch_true: following 'true' branch...
libblockdev-3.4.0/src/plugins/fs/mount.c:681:15: branch_true: ...to here
libblockdev-3.4.0/src/plugins/fs/mount.c:681:15: call_function: calling 'run_as_user' from 'bd_fs_unmount'
#  489|           g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,
#  490|                        "Not running as root, cannot change the UID/GID.");
#  491|->         return FALSE;
#  492|       }
#  493|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:410:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor '_open_dev(device,  error)'
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:470:24: enter_function: entry to 'bd_nvme_get_controller_info'
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:477:10: call_function: calling '_open_dev' from 'bd_nvme_get_controller_info'
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:477:10: return_function: returning to 'bd_nvme_get_controller_info' from '_open_dev'
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:478:8: branch_false: following 'false' branch...
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:481:15: branch_false: ...to here
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:481:15: call_function: calling '_nvme_alloc' from 'bd_nvme_get_controller_info'
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:481:15: return_function: returning to 'bd_nvme_get_controller_info' from '_nvme_alloc'
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:410:19: danger: '_open_dev(device,  error)' leaks here; was opened at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  408|   void *_nvme_alloc (size_t len, GError **error)
#  409|   {
#  410|->     size_t _len = ROUND_UP (len, 0x1000);
#  411|       void *p;
#  412|   

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-224.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namelibblockdev-3.5.0-4.fc45
diffbase-store-results-to/tmp/tmpbl2sbg7q/libblockdev-3.5.0-4.fc45.tar.xz
diffbase-time-created2026-08-03 16:59:55
diffbase-time-finished2026-08-03 17:02:28
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpbl2sbg7q/libblockdev-3.5.0-4.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpbl2sbg7q/libblockdev-3.5.0-4.fc45.src.rpm'
diffbase-tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-224.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibblockdev-3.4.0-2.fc44
store-results-to/tmp/tmpjjnsmoht/libblockdev-3.4.0-2.fc44.tar.xz
time-created2026-08-03 16:56:09
time-finished2026-08-03 16:59:32
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpjjnsmoht/libblockdev-3.4.0-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpjjnsmoht/libblockdev-3.4.0-2.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9