Task #78090 - fixed.err
back to task #78090download
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.34/lib/device/persist.c:176:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&path, "r")’
LVM2.2.03.34/lib/device/persist.c:164:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/lib/device/persist.c:167:20: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:167:20: acquire_resource: opened here
LVM2.2.03.34/lib/device/persist.c:167:12: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:172:16: branch_true: following ‘true’ branch...
LVM2.2.03.34/lib/device/persist.c:173:21: branch_true: ...to here
LVM2.2.03.34/lib/device/persist.c:176:17: danger: ‘fopen(&path, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 174| continue;
# 175|
# 176|-> dm_strncpy(buf_key, line, sizeof(buf_key));
# 177| break;
# 178| }
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.34/lib/device/persist.c:176:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&path, "r")’
LVM2.2.03.34/lib/device/persist.c:164:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/lib/device/persist.c:167:20: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:167:20: acquire_memory: allocated here
LVM2.2.03.34/lib/device/persist.c:167:12: branch_false: following ‘false’ branch...
<unknown>: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:172:16: branch_true: following ‘true’ branch...
LVM2.2.03.34/lib/device/persist.c:173:21: branch_true: ...to here
LVM2.2.03.34/lib/device/persist.c:176:17: danger: ‘fopen(&path, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 174| continue;
# 175|
# 176|-> dm_strncpy(buf_key, line, sizeof(buf_key));
# 177| break;
# 178| }
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.34/lib/device/persist.c:241:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&path, "w")’
LVM2.2.03.34/lib/device/persist.c:231:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/lib/device/persist.c:234:20: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:234:20: acquire_resource: opened here
LVM2.2.03.34/lib/device/persist.c:234:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/lib/device/persist.c:239:9: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:241:13: danger: ‘fopen(&path, "w")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 239| fprintf(fp, "0x%llx\n", (unsigned long long)key);
# 240|
# 241|-> if (fflush(fp))
# 242| log_debug("Failed to write/flush key file");
# 243| if (fclose(fp))
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.34/lib/device/persist.c:241:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&path, "w")’
LVM2.2.03.34/lib/device/persist.c:231:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/lib/device/persist.c:234:20: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:234:20: acquire_memory: allocated here
LVM2.2.03.34/lib/device/persist.c:234:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/lib/device/persist.c:239:9: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:241:13: danger: ‘fopen(&path, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 239| fprintf(fp, "0x%llx\n", (unsigned long long)key);
# 240|
# 241|-> if (fflush(fp))
# 242| log_debug("Failed to write/flush key file");
# 243| if (fclose(fp))
Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.34/lib/device/persist.c:242:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&path, "w")’
LVM2.2.03.34/lib/device/persist.c:231:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/lib/device/persist.c:234:20: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:234:20: acquire_resource: opened here
LVM2.2.03.34/lib/device/persist.c:234:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/lib/device/persist.c:239:9: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:241:12: branch_true: following ‘true’ branch...
LVM2.2.03.34/lib/device/persist.c:242:17: branch_true: ...to here
LVM2.2.03.34/lib/device/persist.c:242:17: danger: ‘fopen(&path, "w")’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 240|
# 241| if (fflush(fp))
# 242|-> log_debug("Failed to write/flush key file");
# 243| if (fclose(fp))
# 244| log_debug("Failed to write/close key file");
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.34/lib/device/persist.c:242:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&path, "w")’
LVM2.2.03.34/lib/device/persist.c:231:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/lib/device/persist.c:234:20: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:234:20: acquire_memory: allocated here
LVM2.2.03.34/lib/device/persist.c:234:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/lib/device/persist.c:239:9: branch_false: ...to here
LVM2.2.03.34/lib/device/persist.c:241:12: branch_true: following ‘true’ branch...
LVM2.2.03.34/lib/device/persist.c:242:17: branch_true: ...to here
LVM2.2.03.34/lib/device/persist.c:242:17: danger: ‘fopen(&path, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 240|
# 241| if (fflush(fp))
# 242|-> log_debug("Failed to write/flush key file");
# 243| if (fclose(fp))
# 244| log_debug("Failed to write/close key file");
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.34/lib/raid/raid.c:722:21: warning[-Wanalyzer-malloc-leak]: leak of ‘_init_raid_segtype(cmd, & _raid_types[i], get_monitor_dso_path(cmd, 284), monitored)’
LVM2.2.03.34/lib/raid/raid.c:699:5: enter_function: entry to ‘init_raid_segtypes’
LVM2.2.03.34/lib/raid/raid.c:721:21: branch_true: following ‘true’ branch (when ‘i != 21’)...
LVM2.2.03.34/lib/raid/raid.c:722:32: branch_true: ...to here
LVM2.2.03.34/lib/raid/raid.c:722:32: call_function: calling ‘_init_raid_segtype’ from ‘init_raid_segtypes’
LVM2.2.03.34/lib/raid/raid.c:722:32: return_function: returning to ‘init_raid_segtypes’ from ‘_init_raid_segtype’
LVM2.2.03.34/lib/raid/raid.c:722:20: branch_true: following ‘true’ branch...
LVM2.2.03.34/lib/raid/raid.c:723:22: branch_true: ...to here
LVM2.2.03.34/lib/raid/raid.c:722:21: danger: ‘_init_raid_segtype(cmd, & _raid_types[i], get_monitor_dso_path(cmd, 284), monitored)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
# 720|
# 721| for (i = 0; i < DM_ARRAY_SIZE(_raid_types); ++i)
# 722|-> if ((segtype = _init_raid_segtype(cmd, &_raid_types[i], dso, monitored)) &&
# 723| !lvm_register_segtype(seglib, segtype)) {
# 724| /* segtype is already destroyed */
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.34/tools/pvck.c:968:33: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, meta_size + 1)’
LVM2.2.03.34/tools/pvck.c:885:12: enter_function: entry to ‘_dump_current_text’
LVM2.2.03.34/tools/pvck.c:901:26: call_function: inlined call to ‘zalloc’ from ‘_dump_current_text’
LVM2.2.03.34/tools/pvck.c:901:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/tools/pvck.c:915:13: branch_false: ...to here
LVM2.2.03.34/tools/pvck.c:939:22: call_function: calling ‘_read_bytes’ from ‘_dump_current_text’
LVM2.2.03.34/tools/pvck.c:939:22: return_function: returning to ‘_dump_current_text’ from ‘_read_bytes’
LVM2.2.03.34/tools/pvck.c:939:20: branch_true: following ‘true’ branch...
LVM2.2.03.34/tools/pvck.c:947:17: branch_true: ...to here
LVM2.2.03.34/tools/pvck.c:955:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/tools/pvck.c:959:22: branch_false: ...to here
LVM2.2.03.34/tools/pvck.c:959:20: branch_false: following ‘false’ branch...
LVM2.2.03.34/tools/pvck.c:965:29: branch_false: ...to here
LVM2.2.03.34/tools/pvck.c:965:28: branch_true: following ‘true’ branch...
LVM2.2.03.34/tools/pvck.c:965:42: branch_true: ...to here
LVM2.2.03.34/tools/pvck.c:965:29: branch_false: following ‘false’ branch...
LVM2.2.03.34/tools/pvck.c:967:28: branch_false: ...to here
LVM2.2.03.34/tools/pvck.c:967:28: branch_true: following ‘true’ branch...
LVM2.2.03.34/tools/pvck.c:968:33: danger: ‘calloc(1, meta_size + 1)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
# 966| vgname = strdup(cft->root->key);
# 967| if (cft->root && cft->root->child)
# 968|-> dm_config_get_uint32(cft->root->child, "seqno", &seqno);
# 969| }
# 970| config_destroy(cft);
Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.34/tools/pvck.c:968:33: warning[-Wanalyzer-malloc-leak]: leak of ‘vgname’
LVM2.2.03.34/tools/pvck.c:885:12: enter_function: entry to ‘_dump_current_text’
LVM2.2.03.34/tools/pvck.c:901:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/tools/pvck.c:915:13: branch_false: ...to here
LVM2.2.03.34/tools/pvck.c:939:22: call_function: calling ‘_read_bytes’ from ‘_dump_current_text’
LVM2.2.03.34/tools/pvck.c:939:22: return_function: returning to ‘_dump_current_text’ from ‘_read_bytes’
LVM2.2.03.34/tools/pvck.c:939:20: branch_true: following ‘true’ branch...
LVM2.2.03.34/tools/pvck.c:947:17: branch_true: ...to here
LVM2.2.03.34/tools/pvck.c:955:12: branch_false: following ‘false’ branch...
LVM2.2.03.34/tools/pvck.c:959:22: branch_false: ...to here
LVM2.2.03.34/tools/pvck.c:959:20: branch_false: following ‘false’ branch...
LVM2.2.03.34/tools/pvck.c:965:29: branch_false: ...to here
LVM2.2.03.34/tools/pvck.c:965:28: branch_true: following ‘true’ branch...
LVM2.2.03.34/tools/pvck.c:966:42: acquire_memory: allocated here
LVM2.2.03.34/tools/pvck.c:967:28: branch_true: following ‘true’ branch...
LVM2.2.03.34/tools/pvck.c:968:33: danger: ‘vgname’ leaks here; was allocated at [(17)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/16)
# 966| vgname = strdup(cft->root->key);
# 967| if (cft->root && cft->root->child)
# 968|-> dm_config_get_uint32(cft->root->child, "seqno", &seqno);
# 969| }
# 970| config_destroy(cft);