Fixed defects

List of Defects

Error: CLANG_WARNING: [#def1]
libselinux-3.6-build/libselinux-3.6/utils/getdefaultcon.c:55:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'role'
#   53|   	/* If selinux isn't available, bail out. */
#   54|   	if (!is_selinux_enabled()) {
#   55|-> 		fprintf(stderr,
#   56|   			"%s may be used only on a SELinux kernel.\n", argv[0]);
#   57|   		return 1;

Error: CLANG_WARNING: [#def2]
libselinux-3.6-build/libselinux-3.6/utils/getdefaultcon.c:55:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'service'
#   53|   	/* If selinux isn't available, bail out. */
#   54|   	if (!is_selinux_enabled()) {
#   55|-> 		fprintf(stderr,
#   56|   			"%s may be used only on a SELinux kernel.\n", argv[0]);
#   57|   		return 1;

Error: CLANG_WARNING: [#def3]
libselinux-3.6-build/libselinux-3.6/utils/selinuxexeccon.c:48:4: warning[unix.Malloc]: Potential leak of memory pointed to by 'con'
#   46|   		if (security_check_context(con)) {
#   47|   			fprintf(stderr, "%s:  invalid from context '%s'\n", argv[0], con);
#   48|-> 			return -1;
#   49|   		}
#   50|   	}

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-76.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namelibselinux-3.7-1.fc41
diffbase-store-results-to/tmp/tmpxql7v3mb/libselinux-3.7-1.fc41.tar.xz
diffbase-time-created2024-07-03 15:54:17
diffbase-time-finished2024-07-03 15:56:34
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpxql7v3mb/libselinux-3.7-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpxql7v3mb/libselinux-3.7-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-76.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibselinux-3.6-4.fc40
store-results-to/tmp/tmpbg4aflxv/libselinux-3.6-4.fc40.tar.xz
time-created2024-07-03 15:51:13
time-finished2024-07-03 15:53:52
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpbg4aflxv/libselinux-3.6-4.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpbg4aflxv/libselinux-3.6-4.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9