Task #91536 - added.err
back to task #91536download
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:616:13: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_action()’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7249:13: enter_function: entry to ‘process_fence_result’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7258:21: call_function: calling ‘alloc_action’ from ‘process_fence_result’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7258:21: return_function: returning to ‘process_fence_result’ from ‘alloc_action’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7258:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7265:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7266:14: call_function: calling ‘find_lockspace_name’ from ‘process_fence_result’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7266:14: return_function: returning to ‘process_fence_result’ from ‘find_lockspace_name’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7267:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7274:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7275:9: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7276:21: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7279:20: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7281:25: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7281:25: call_function: calling ‘log_level’ from ‘process_fence_result’
# 614|
# 615| pthread_mutex_lock(&unused_struct_mutex);
# 616|-> if (!unused_action_count || alloc_new_structs) {
# 617| act = malloc(sizeof(struct action));
# 618| } else {
Error: COMPILER_WARNING:
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c: scope_hint: In function ‘worker_thread_main’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7072:17: warning[-Wstringop-truncation]: ‘strncpy’ output may be truncated copying 64 bytes from a string of length 64
# 7072 | strncpy(msg.ls_name, ls_name, MAX_NAME);
# | ^
# 7070|
# 7071| if (act->op == LD_OP_FENCE) {
# 7072|-> strncpy(msg.ls_name, ls_name, MAX_NAME);
# 7073| msg.type = HELPER_COMMAND;
# 7074| msg.act = LD_OP_FENCE;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7168:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7168:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7168:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7168:17: danger: ‘cr_fd’ leaks here
# 7166|
# 7167| if (pipe2(pfd, O_NONBLOCK | O_CLOEXEC)) {
# 7168|-> close(cr_fd);
# 7169| close(pw_fd);
# 7170| return -errno;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7168:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7168:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7168:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7168:17: danger: ‘pw_fd’ leaks here
# 7166|
# 7167| if (pipe2(pfd, O_NONBLOCK | O_CLOEXEC)) {
# 7168|-> close(cr_fd);
# 7169| close(pw_fd);
# 7170| return -errno;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7169:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7168:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7169:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7169:17: danger: ‘pw_fd’ leaks here
# 7167| if (pipe2(pfd, O_NONBLOCK | O_CLOEXEC)) {
# 7168| close(cr_fd);
# 7169|-> close(pw_fd);
# 7170| return -errno;
# 7171| }
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: danger: ‘cr_fd’ leaks here
# 7176| pid = fork();
# 7177| if (pid < 0) {
# 7178|-> close(cr_fd);
# 7179| close(pw_fd);
# 7180| close(pr_fd);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: danger: ‘cw_fd’ leaks here
# 7176| pid = fork();
# 7177| if (pid < 0) {
# 7178|-> close(cr_fd);
# 7179| close(pw_fd);
# 7180| close(pr_fd);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: danger: ‘pr_fd’ leaks here
# 7176| pid = fork();
# 7177| if (pid < 0) {
# 7178|-> close(cr_fd);
# 7179| close(pw_fd);
# 7180| close(pr_fd);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: danger: ‘pw_fd’ leaks here
# 7176| pid = fork();
# 7177| if (pid < 0) {
# 7178|-> close(cr_fd);
# 7179| close(pw_fd);
# 7180| close(pr_fd);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7179:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7179:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7179:17: danger: ‘cw_fd’ leaks here
# 7177| if (pid < 0) {
# 7178| close(cr_fd);
# 7179|-> close(pw_fd);
# 7180| close(pr_fd);
# 7181| close(cw_fd);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7179:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7179:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7179:17: danger: ‘pr_fd’ leaks here
# 7177| if (pid < 0) {
# 7178| close(cr_fd);
# 7179|-> close(pw_fd);
# 7180| close(pr_fd);
# 7181| close(cw_fd);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7179:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7179:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7179:17: danger: ‘pw_fd’ leaks here
# 7177| if (pid < 0) {
# 7178| close(cr_fd);
# 7179|-> close(pw_fd);
# 7180| close(pr_fd);
# 7181| close(cw_fd);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7180:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7180:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7180:17: danger: ‘cw_fd’ leaks here
# 7178| close(cr_fd);
# 7179| close(pw_fd);
# 7180|-> close(pr_fd);
# 7181| close(cw_fd);
# 7182| return -errno;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7180:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7180:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7180:17: danger: ‘pr_fd’ leaks here
# 7178| close(cr_fd);
# 7179| close(pw_fd);
# 7180|-> close(pr_fd);
# 7181| close(cw_fd);
# 7182| return -errno;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7181:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_true: following ‘true’ branch (when ‘pid < 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7178:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7181:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7181:17: danger: ‘cw_fd’ leaks here
# 7179| close(pw_fd);
# 7180| close(pr_fd);
# 7181|-> close(cw_fd);
# 7182| return -errno;
# 7183| }
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_true: following ‘true’ branch (when ‘pid != 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: danger: ‘cr_fd’ leaks here
# 7184|
# 7185| if (pid) {
# 7186|-> close(cr_fd);
# 7187| close(cw_fd);
# 7188| helper_send_fd = pw_fd;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_true: following ‘true’ branch (when ‘pid != 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: danger: ‘cw_fd’ leaks here
# 7184|
# 7185| if (pid) {
# 7186|-> close(cr_fd);
# 7187| close(cw_fd);
# 7188| helper_send_fd = pw_fd;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_true: following ‘true’ branch (when ‘pid != 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: danger: ‘pr_fd’ leaks here
# 7184|
# 7185| if (pid) {
# 7186|-> close(cr_fd);
# 7187| close(cw_fd);
# 7188| helper_send_fd = pw_fd;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_true: following ‘true’ branch (when ‘pid != 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: danger: ‘pw_fd’ leaks here
# 7184|
# 7185| if (pid) {
# 7186|-> close(cr_fd);
# 7187| close(cw_fd);
# 7188| helper_send_fd = pw_fd;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7187:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_true: following ‘true’ branch (when ‘pid != 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7187:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7187:17: danger: ‘cw_fd’ leaks here
# 7185| if (pid) {
# 7186| close(cr_fd);
# 7187|-> close(cw_fd);
# 7188| helper_send_fd = pw_fd;
# 7189| helper_recv_fd = pr_fd;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7187:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_true: following ‘true’ branch (when ‘pid != 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7187:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7187:17: danger: ‘pr_fd’ leaks here
# 7185| if (pid) {
# 7186| close(cr_fd);
# 7187|-> close(cw_fd);
# 7188| helper_send_fd = pw_fd;
# 7189| helper_recv_fd = pr_fd;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7187:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_true: following ‘true’ branch (when ‘pid != 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7186:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7187:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7187:17: danger: ‘pw_fd’ leaks here
# 7185| if (pid) {
# 7186| close(cr_fd);
# 7187|-> close(cw_fd);
# 7188| helper_send_fd = pw_fd;
# 7189| helper_recv_fd = pr_fd;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: danger: ‘cr_fd’ leaks here
# 7191| return 0;
# 7192| } else {
# 7193|-> close(pr_fd);
# 7194| close(pw_fd);
# 7195| helper_main(cr_fd, cw_fd, daemon_debug);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: danger: ‘cw_fd’ leaks here
# 7191| return 0;
# 7192| } else {
# 7193|-> close(pr_fd);
# 7194| close(pw_fd);
# 7195| helper_main(cr_fd, cw_fd, daemon_debug);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: danger: ‘pr_fd’ leaks here
# 7191| return 0;
# 7192| } else {
# 7193|-> close(pr_fd);
# 7194| close(pw_fd);
# 7195| helper_main(cr_fd, cw_fd, daemon_debug);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: danger: ‘pw_fd’ leaks here
# 7191| return 0;
# 7192| } else {
# 7193|-> close(pr_fd);
# 7194| close(pw_fd);
# 7195| helper_main(cr_fd, cw_fd, daemon_debug);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7194:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7194:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7194:17: danger: ‘cr_fd’ leaks here
# 7192| } else {
# 7193| close(pr_fd);
# 7194|-> close(pw_fd);
# 7195| helper_main(cr_fd, cw_fd, daemon_debug);
# 7196| exit(0);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7194:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7194:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7194:17: danger: ‘cw_fd’ leaks here
# 7192| } else {
# 7193| close(pr_fd);
# 7194|-> close(pw_fd);
# 7195| helper_main(cr_fd, cw_fd, daemon_debug);
# 7196| exit(0);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7194:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7194:17: throw: if ‘close’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7194:17: danger: ‘pw_fd’ leaks here
# 7192| } else {
# 7193| close(pr_fd);
# 7194|-> close(pw_fd);
# 7195| helper_main(cr_fd, cw_fd, daemon_debug);
# 7196| exit(0);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7195:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cr_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7195:17: throw: if ‘helper_main’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7195:17: danger: ‘cr_fd’ leaks here
# 7193| close(pr_fd);
# 7194| close(pw_fd);
# 7195|-> helper_main(cr_fd, cw_fd, daemon_debug);
# 7196| exit(0);
# 7197| }
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7195:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘cw_fd’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7164:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7167:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7173:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7177:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7185:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7193:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7195:17: throw: if ‘helper_main’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7195:17: danger: ‘cw_fd’ leaks here
# 7193| close(pr_fd);
# 7194| close(pw_fd);
# 7195|-> helper_main(cr_fd, cw_fd, daemon_debug);
# 7196| exit(0);
# 7197| }
Error: GCC_ANALYZER_WARNING (CWE-688):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:140:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘av[0]’ where non-null expected
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:86:21: branch_true: following ‘true’ branch (when ‘i != 33’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:87:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:89:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:93:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:99:21: branch_true: following ‘true’ branch (when ‘i < cmd_len’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:100:29: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:100:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:103:20: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:103:20: branch_false: following ‘false’ branch (when ‘av_count != 32’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:106:20: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:136:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:137:34: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:137:34: acquire_memory: this call could return NULL
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-helper.c:140:9: danger: argument 1 (‘av[0]’) from [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12) could be NULL where non-null expected
# 138| }
# 139|
# 140|-> execvp(av[0], av);
# 141| }
# 142|
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:429:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&path, "w")’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:414:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:20: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:20: acquire_resource: opened here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:422:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:429:13: throw: if ‘fflush’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:429:13: danger: ‘fopen(&path, "w")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 427| fprintf(fp, "no_timeout %d\n", no_timeout);
# 428|
# 429|-> if (fflush(fp))
# 430| log_warn("Failed to write/flush %s", path);
# 431| _fclose(fp, path);
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:429:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&path, "w")’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:414:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:20: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:20: acquire_memory: allocated here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:422:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:429:13: throw: if ‘fflush’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:429:13: danger: ‘fopen(&path, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 427| fprintf(fp, "no_timeout %d\n", no_timeout);
# 428|
# 429|-> if (fflush(fp))
# 430| log_warn("Failed to write/flush %s", path);
# 431| _fclose(fp, path);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:430:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&path, "w")’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:414:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:20: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:20: acquire_resource: opened here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:422:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:429:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:430:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:430:17: throw: if ‘log_level’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:430:17: danger: ‘fopen(&path, "w")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 428|
# 429| if (fflush(fp))
# 430|-> log_warn("Failed to write/flush %s", path);
# 431| _fclose(fp, path);
# 432|
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:430:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&path, "w")’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:414:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:20: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:20: acquire_memory: allocated here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:417:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:422:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:429:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:430:17: branch_true: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:430:17: throw: if ‘log_level’ throws an exception...
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:430:17: danger: ‘fopen(&path, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 428|
# 429| if (fflush(fp))
# 430|-> log_warn("Failed to write/flush %s", path);
# 431| _fclose(fp, path);
# 432|
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/lib/commands/toolcontext.c:1662:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 18448)’
LVM2.2.03.38/lib/commands/toolcontext.c:1638:21: enter_function: entry to ‘create_toolcontext’
LVM2.2.03.38/lib/commands/toolcontext.c:1658:21: call_function: inlined call to ‘zalloc’ from ‘create_toolcontext’
LVM2.2.03.38/lib/commands/toolcontext.c:1658:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/commands/toolcontext.c:1662:9: branch_false: ...to here
LVM2.2.03.38/lib/commands/toolcontext.c:1671:9: throw: if ‘dm_list_init’ throws an exception...
LVM2.2.03.38/lib/commands/toolcontext.c:1662:9: danger: ‘calloc(1, 18448)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 1660| return NULL;
# 1661| }
# 1662|-> cmd->is_long_lived = is_clvmd;
# 1663| cmd->is_clvmd = is_clvmd;
# 1664| cmd->threaded = threaded ? 1 : 0;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/lib/device/nvme.c:187:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev_name(dev), 0)’
LVM2.2.03.38/lib/device/nvme.c:177:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/device/nvme.c:180:19: branch_false: ...to here
LVM2.2.03.38/lib/device/nvme.c:182:19: acquire_resource: opened here
LVM2.2.03.38/lib/device/nvme.c:182:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/device/nvme.c:187:13: branch_false: ...to here
LVM2.2.03.38/lib/device/nvme.c:187:13: throw: if ‘nvme_get_nsid’ throws an exception...
LVM2.2.03.38/lib/device/nvme.c:187:13: danger: ‘open(dev_name(dev), 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 185| }
# 186|
# 187|-> if (nvme_get_nsid(fd, &nsid)) {
# 188| log_debug("dev_read_nvme_wwids nvme_get_nsid error %d %s", errno, devpath);
# 189| goto out;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/lib/device/nvme.c:318:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev_name(dev), 0)’
LVM2.2.03.38/lib/device/nvme.c:313:19: acquire_resource: opened here
LVM2.2.03.38/lib/device/nvme.c:313:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/device/nvme.c:318:13: branch_false: ...to here
LVM2.2.03.38/lib/device/nvme.c:318:13: throw: if ‘nvme_get_nsid’ throws an exception...
LVM2.2.03.38/lib/device/nvme.c:318:13: danger: ‘open(dev_name(dev), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 316| }
# 317|
# 318|-> if (nvme_get_nsid(fd, &nsid)) {
# 319| log_error("dev_read_reservation %s nvme_get_nsid error %d", devname, errno);
# 320| goto out;
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/lib/device/nvme.c:335:20: warning[-Wanalyzer-malloc-leak]: leak of ‘status’
LVM2.2.03.38/lib/device/nvme.c:313:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/device/nvme.c:318:13: branch_false: ...to here
LVM2.2.03.38/lib/device/nvme.c:318:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/device/nvme.c:323:24: branch_false: ...to here
LVM2.2.03.38/lib/device/nvme.c:323:24: acquire_memory: allocated here
LVM2.2.03.38/lib/device/nvme.c:323:12: branch_false: following ‘false’ branch (when ‘status’ is non-NULL)...
LVM2.2.03.38/lib/device/nvme.c:326:9: branch_false: ...to here
LVM2.2.03.38/lib/device/nvme.c:335:20: throw: if ‘nvme_resv_report’ throws an exception...
LVM2.2.03.38/lib/device/nvme.c:335:20: danger: ‘status’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 333| args.result = NULL;
# 334|
# 335|-> if ((err = nvme_resv_report(&args))) {
# 336| log_error("dev_read_reservation %s error %d", devname, err);
# 337| goto out;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/lib/device/nvme.c:402:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev_name(dev), 0)’
LVM2.2.03.38/lib/device/nvme.c:397:19: acquire_resource: opened here
LVM2.2.03.38/lib/device/nvme.c:397:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/device/nvme.c:402:13: branch_false: ...to here
LVM2.2.03.38/lib/device/nvme.c:402:13: throw: if ‘nvme_get_nsid’ throws an exception...
LVM2.2.03.38/lib/device/nvme.c:402:13: danger: ‘open(dev_name(dev), 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 400| }
# 401|
# 402|-> if (nvme_get_nsid(fd, &nsid)) {
# 403| if (may_fail)
# 404| log_debug("dev_find_key_nvme %s nvme_get_nsid error %d", devname, errno);
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/lib/device/nvme.c:422:20: warning[-Wanalyzer-malloc-leak]: leak of ‘status’
LVM2.2.03.38/lib/device/nvme.c:397:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/device/nvme.c:402:13: branch_false: ...to here
LVM2.2.03.38/lib/device/nvme.c:402:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/device/nvme.c:410:24: branch_false: ...to here
LVM2.2.03.38/lib/device/nvme.c:410:24: acquire_memory: allocated here
LVM2.2.03.38/lib/device/nvme.c:410:12: branch_false: following ‘false’ branch (when ‘status’ is non-NULL)...
LVM2.2.03.38/lib/device/nvme.c:413:9: branch_false: ...to here
LVM2.2.03.38/lib/device/nvme.c:422:20: throw: if ‘nvme_resv_report’ throws an exception...
LVM2.2.03.38/lib/device/nvme.c:422:20: danger: ‘status’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 420| args.result = NULL;
# 421|
# 422|-> if ((err = nvme_resv_report(&args))) {
# 423| if (may_fail)
# 424| log_debug("dev_find_key_nvme %s error %d", devname, err);
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/lib/device/persist.c:197:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/var/lib/lvm")’
LVM2.2.03.38/lib/device/persist.c:2094:5: enter_function: entry to ‘persist_vgcreate_begin’
LVM2.2.03.38/lib/device/persist.c:2106:9: call_function: calling ‘persist_key_file_remove_name’ from ‘persist_vgcreate_begin’
# 195| return;
# 196|
# 197|-> while ((de = readdir(dir))) {
# 198| if (de->d_name[0] == '.')
# 199| continue;
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/lib/raid/raid.c:681:25: warning[-Wanalyzer-malloc-leak]: leak of ‘_init_raid_segtype(cmd, & _raid_types[i], get_monitor_dso_path(cmd, 285), monitored)’
LVM2.2.03.38/lib/raid/raid.c:699:5: enter_function: entry to ‘init_raid_segtypes’
LVM2.2.03.38/lib/raid/raid.c:721:21: branch_true: following ‘true’ branch (when ‘i != 21’)...
LVM2.2.03.38/lib/raid/raid.c:722:32: branch_true: ...to here
LVM2.2.03.38/lib/raid/raid.c:722:32: call_function: calling ‘_init_raid_segtype’ from ‘init_raid_segtypes’
LVM2.2.03.38/lib/raid/raid.c:722:32: return_function: returning to ‘init_raid_segtypes’ from ‘_init_raid_segtype’
LVM2.2.03.38/lib/raid/raid.c:722:20: branch_true: following ‘true’ branch...
LVM2.2.03.38/lib/raid/raid.c:723:22: branch_true: ...to here
LVM2.2.03.38/lib/raid/raid.c:681:25: danger: ‘_init_raid_segtype(cmd, & _raid_types[i], get_monitor_dso_path(cmd, 285), monitored)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 679|
# 680| segtype->ops = &_raid_ops;
# 681|-> segtype->name = rt->name;
# 682| segtype->flags = SEG_RAID | SEG_ONLY_EXCLUSIVE | rt->extra_flags;
# 683|
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:345:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:345:17: branch_true: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:345:17: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 343| sigemptyset(&my_sigset);
# 344| if (sigprocmask(SIG_SETMASK, &my_sigset, NULL) < 0) {
# 345|-> fprintf(stderr, "Unable to restore signals.\n");
# 346| (void) close(fd);
# 347| exit(EXIT_FAILURE);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:353:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:353:17: throw: if ‘perror’ throws an exception...
LVM2.2.03.38/libdaemon/server/daemon-server.c:353:17: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 351| switch (pid = fork()) {
# 352| case -1:
# 353|-> perror("fork failed:");
# 354| (void) close(fd);
# 355| exit(EXIT_FAILURE);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:361:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:361:24: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
# 359|
# 360| default:
# 361|-> (void) close(fd);
# 362| /* Wait for response from child */
# 363| while (!waitpid(pid, &child_status, WNOHANG) && !_shutdown_requested) {
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:384:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:384:17: branch_true: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:384:17: throw: if ‘perror’ throws an exception...
LVM2.2.03.38/libdaemon/server/daemon-server.c:384:17: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 382|
# 383| if (chdir("/")) {
# 384|-> perror("Cannot chdir to /");
# 385| (void) close(fd);
# 386| exit(1);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:385:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:384:17: branch_true: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:385:24: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
# 383| if (chdir("/")) {
# 384| perror("Cannot chdir to /");
# 385|-> (void) close(fd);
# 386| exit(1);
# 387| }
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:39: branch_true: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:39: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: danger: ‘dup2(open("/dev/null", 2), 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/10)
# 387| }
# 388|
# 389|-> if (((fd != STDIN_FILENO) && (dup2(fd, STDIN_FILENO) == -1)) ||
# 390| ((fd != STDOUT_FILENO) && (dup2(fd, STDOUT_FILENO) == -1)) ||
# 391| ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) == -1))) {
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:390:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 387| }
# 388|
# 389|-> if (((fd != STDIN_FILENO) && (dup2(fd, STDIN_FILENO) == -1)) ||
# 390| ((fd != STDOUT_FILENO) && (dup2(fd, STDOUT_FILENO) == -1)) ||
# 391| ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) == -1))) {
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:390:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:390:40: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:390:13: danger: ‘dup2(open("/dev/null", 2), 1)’ leaks here; was opened at [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
# 388|
# 389| if (((fd != STDIN_FILENO) && (dup2(fd, STDIN_FILENO) == -1)) ||
# 390|-> ((fd != STDOUT_FILENO) && (dup2(fd, STDOUT_FILENO) == -1)) ||
# 391| ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) == -1))) {
# 392| perror("Error setting terminal FDs to /dev/null");
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:391:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:13: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:391:40: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:391:13: danger: ‘dup2(open("/dev/null", 2), 2)’ leaks here; was opened at [(11)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/10)
# 389| if (((fd != STDIN_FILENO) && (dup2(fd, STDIN_FILENO) == -1)) ||
# 390| ((fd != STDOUT_FILENO) && (dup2(fd, STDOUT_FILENO) == -1)) ||
# 391|-> ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) == -1))) {
# 392| perror("Error setting terminal FDs to /dev/null");
# 393| if (fd > STDERR_FILENO)
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:392:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:392:17: throw: if ‘perror’ throws an exception...
LVM2.2.03.38/libdaemon/server/daemon-server.c:392:17: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 390| ((fd != STDOUT_FILENO) && (dup2(fd, STDOUT_FILENO) == -1)) ||
# 391| ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) == -1))) {
# 392|-> perror("Error setting terminal FDs to /dev/null");
# 393| if (fd > STDERR_FILENO)
# 394| (void) close(fd);
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:393:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:393:20: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
# 391| ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) == -1))) {
# 392| perror("Error setting terminal FDs to /dev/null");
# 393|-> if (fd > STDERR_FILENO)
# 394| (void) close(fd);
# 395| /* coverity[leaked_handle] fd is stdin/stdout/stderr */
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdaemon/server/daemon-server.c:394:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:19: acquire_resource: opened here
LVM2.2.03.38/libdaemon/server/daemon-server.c:338:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:343:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:344:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:349:9: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:383:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:389:12: branch_false: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:393:20: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdaemon/server/daemon-server.c:394:32: branch_true: ...to here
LVM2.2.03.38/libdaemon/server/daemon-server.c:394:32: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
# 392| perror("Error setting terminal FDs to /dev/null");
# 393| if (fd > STDERR_FILENO)
# 394|-> (void) close(fd);
# 395| /* coverity[leaked_handle] fd is stdin/stdout/stderr */
# 396| exit(2);
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:171:26: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&path_buf)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:147:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:150:13: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:150:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:159:13: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:159:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:165:17: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:165:17: acquire_memory: allocated here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:166:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:166:12: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:171:26: throw: if ‘readdir’ throws an exception...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:171:26: danger: ‘opendir(&path_buf)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
# 169| }
# 170|
# 171|-> while ((pid_dp = readdir(pid_d)) != NULL) {
# 172| if (pid_dp->d_name[0] == '.')
# 173| continue;
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:225:27: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:222:18: acquire_memory: allocated here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:223:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:223:12: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:225:27: throw: if ‘readdir’ throws an exception...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:225:27: danger: ‘opendir("/proc")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 223| if (!proc_d)
# 224| return 0;
# 225|-> while ((proc_dp = readdir(proc_d)) != NULL) {
# 226| if (!isdigit(proc_dp->d_name[0]))
# 227| continue;
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:637:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:642:20: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:642:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:647:12: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:647:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:653:13: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:653:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:658:13: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:658:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:659:27: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:659:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:20: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:20: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:47: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:47: acquire_resource: opened here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:21: danger: ‘dup2(open("/dev/null", 2), 0)’ leaks here; was opened at [(15)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/14)
# 662| }
# 663|
# 664|-> if (((fd != STDIN_FILENO) && (dup2(fd, STDIN_FILENO) == -1)) ||
# 665| ((fd != STDOUT_FILENO) && (dup2(fd, STDOUT_FILENO) == -1)) ||
# 666| ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) == -1))) {
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:637:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:642:20: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:642:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:647:12: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:647:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:653:13: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:653:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:658:13: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:658:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:659:27: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:659:27: acquire_resource: opened here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:659:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:20: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:665:21: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:21: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:21: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(11)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/10)
# 662| }
# 663|
# 664|-> if (((fd != STDIN_FILENO) && (dup2(fd, STDIN_FILENO) == -1)) ||
# 665| ((fd != STDOUT_FILENO) && (dup2(fd, STDOUT_FILENO) == -1)) ||
# 666| ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) == -1))) {
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:665:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:637:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:642:20: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:642:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:647:12: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:647:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:653:13: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:653:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:658:13: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:658:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:659:27: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:659:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:20: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:665:48: acquire_resource: opened here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:665:21: danger: ‘dup2(open("/dev/null", 2), 1)’ leaks here; was opened at [(13)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/12)
# 663|
# 664| if (((fd != STDIN_FILENO) && (dup2(fd, STDIN_FILENO) == -1)) ||
# 665|-> ((fd != STDOUT_FILENO) && (dup2(fd, STDOUT_FILENO) == -1)) ||
# 666| ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) == -1))) {
# 667| if (fd > STDERR_FILENO)
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:666:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:637:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:642:20: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:642:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:647:12: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:647:12: branch_false: following ‘false’ branch (when ‘pid == 0’)...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:653:13: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:653:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:658:13: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:658:12: branch_true: following ‘true’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:659:27: branch_true: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:659:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:20: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:21: branch_false: following ‘false’ branch...
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:664:21: branch_false: ...to here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:666:48: acquire_resource: opened here
LVM2.2.03.38/libdm/dm-tools/dmfilemapd.c:666:21: danger: ‘dup2(open("/dev/null", 2), 2)’ leaks here; was opened at [(15)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/14)
# 664| if (((fd != STDIN_FILENO) && (dup2(fd, STDIN_FILENO) == -1)) ||
# 665| ((fd != STDOUT_FILENO) && (dup2(fd, STDOUT_FILENO) == -1)) ||
# 666|-> ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) == -1))) {
# 667| if (fd > STDERR_FILENO)
# 668| (void) close(fd);
Error: GCC_ANALYZER_WARNING (CWE-457):
LVM2.2.03.38/test/unit/radix_tree_t.c:437:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘k[1]’
LVM2.2.03.38/test/unit/radix_tree_t.c:426:13: enter_function: entry to ‘test_iterate_subset’
LVM2.2.03.38/test/unit/radix_tree_t.c:435:21: branch_true: following ‘true’ branch (when ‘i != 100000’)...
LVM2.2.03.38/test/unit/radix_tree_t.c:436:17: branch_true: ...to here
LVM2.2.03.38/test/unit/radix_tree_t.c:436:17: call_function: calling ‘_gen_key’ from ‘test_iterate_subset’
LVM2.2.03.38/test/unit/radix_tree_t.c:436:17: return_function: returning to ‘test_iterate_subset’ from ‘_gen_key’
LVM2.2.03.38/test/unit/radix_tree_t.c:437:20: branch_true: following ‘true’ branch...
LVM2.2.03.38/test/unit/radix_tree_t.c:437:35: branch_true: ...to here
LVM2.2.03.38/test/unit/radix_tree_t.c:437:35: danger: use of uninitialized value ‘k[1]’ here
# 435| for (i = 0; i < 100000; i++) {
# 436| _gen_key(k, k + sizeof(k));
# 437|-> if (k[0] == 21 && k[1] == 12)
# 438| subset_count++;
# 439| v.n = i;
Error: CPPCHECK_WARNING (CWE-457):
LVM2.2.03.38/tools/lvmdevices.c:1036: error[legacyUninitvar]: Uninitialized variable: idname
# 1034| goto_bad;
# 1035|
# 1036|-> if (!idtype_str || !idname || !strlen(idname) || !strlen(idtype_str))
# 1037| goto_bad;
# 1038|
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/tools/pvck.c:972:30: warning[-Wanalyzer-malloc-leak]: leak of ‘vgname’
LVM2.2.03.38/tools/pvck.c:885:12: enter_function: entry to ‘_dump_current_text’
LVM2.2.03.38/tools/pvck.c:901:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/pvck.c:915:13: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:939:22: call_function: calling ‘_read_bytes’ from ‘_dump_current_text’
LVM2.2.03.38/tools/pvck.c:939:22: return_function: returning to ‘_dump_current_text’ from ‘_read_bytes’
LVM2.2.03.38/tools/pvck.c:939:20: branch_true: following ‘true’ branch...
LVM2.2.03.38/tools/pvck.c:947:17: branch_true: ...to here
LVM2.2.03.38/tools/pvck.c:955:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/pvck.c:959:22: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:959:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/pvck.c:965:29: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:965:28: branch_true: following ‘true’ branch...
LVM2.2.03.38/tools/pvck.c:966:48: acquire_memory: allocated here
LVM2.2.03.38/tools/pvck.c:966:36: branch_false: following ‘false’ branch (when ‘vgname’ is non-NULL)...
LVM2.2.03.38/tools/pvck.c:971:28: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:971:28: branch_true: following ‘true’ branch...
LVM2.2.03.38/tools/pvck.c:972:30: throw: if ‘dm_config_get_uint32’ throws an exception...
LVM2.2.03.38/tools/pvck.c:972:30: danger: ‘vgname’ leaks here; was allocated at [(17)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/16)
# 970| }
# 971| if ((cft->root && cft->root->child) &&
# 972|-> !dm_config_get_uint32(cft->root->child, "seqno", &seqno)) {
# 973| log_print("CHECK: failed to parse seqno text at %llu",
# 974| (unsigned long long)(mda_offset + meta_offset));
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.38/tools/pvck.c:973:33: warning[-Wanalyzer-malloc-leak]: leak of ‘vgname’
LVM2.2.03.38/tools/pvck.c:885:12: enter_function: entry to ‘_dump_current_text’
LVM2.2.03.38/tools/pvck.c:901:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/pvck.c:915:13: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:939:22: call_function: calling ‘_read_bytes’ from ‘_dump_current_text’
LVM2.2.03.38/tools/pvck.c:939:22: return_function: returning to ‘_dump_current_text’ from ‘_read_bytes’
LVM2.2.03.38/tools/pvck.c:939:20: branch_true: following ‘true’ branch...
LVM2.2.03.38/tools/pvck.c:947:17: branch_true: ...to here
LVM2.2.03.38/tools/pvck.c:955:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/pvck.c:959:22: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:959:20: branch_false: following ‘false’ branch...
LVM2.2.03.38/tools/pvck.c:965:29: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:965:28: branch_true: following ‘true’ branch...
LVM2.2.03.38/tools/pvck.c:966:48: acquire_memory: allocated here
LVM2.2.03.38/tools/pvck.c:966:36: branch_false: following ‘false’ branch (when ‘vgname’ is non-NULL)...
LVM2.2.03.38/tools/pvck.c:971:28: branch_false: ...to here
LVM2.2.03.38/tools/pvck.c:971:28: branch_true: following ‘true’ branch...
LVM2.2.03.38/tools/pvck.c:973:33: throw: if ‘print_log’ throws an exception...
LVM2.2.03.38/tools/pvck.c:973:33: danger: ‘vgname’ leaks here; was allocated at [(17)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/16)
# 971| if ((cft->root && cft->root->child) &&
# 972| !dm_config_get_uint32(cft->root->child, "seqno", &seqno)) {
# 973|-> log_print("CHECK: failed to parse seqno text at %llu",
# 974| (unsigned long long)(mda_offset + meta_offset));
# 975| bad++;