mdadm-4.3-9.fc44
List of Findings
Error: SHELLCHECK_WARNING (CWE-571): [#def1]
/usr/bin/raid-check:23:12: warning[SC2155]: Declare and assign separately to avoid masking return values.
Error: SHELLCHECK_WARNING (CWE-477): [#def2]
/usr/bin/raid-check:73:33: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Error: SHELLCHECK_WARNING (CWE-477): [#def3]
/usr/bin/raid-check:100:25: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Error: SHELLCHECK_WARNING (CWE-477): [#def4]
/usr/bin/raid-check:105:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Error: SHELLCHECK_WARNING (CWE-477): [#def5]
/usr/bin/raid-check:107:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Error: SHELLCHECK_WARNING (CWE-477): [#def6]
/usr/bin/raid-check:128:29: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
Error: SHELLCHECK_WARNING (CWE-156): [#def7]
/usr/share/mdadm/mdcheck:36:6: warning[SC2046]: Quote this to prevent word splitting.
Error: SHELLCHECK_WARNING (CWE-477): [#def8]
/usr/share/mdadm/mdcheck:98:23: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
Error: SHELLCHECK_WARNING (CWE-156): [#def9]
/usr/share/mdadm/mdcheck:121:9: warning[SC2046]: Quote this to prevent word splitting.
Error: SHELLCHECK_WARNING (CWE-156): [#def10]
/usr/share/mdadm/mdcheck:165:47: warning[SC2046]: Quote this to prevent word splitting.
Error: COMPILER_WARNING: [#def11]
mdadm-4.3/Assemble.c: scope_hint: In function ‘Assemble’
mdadm-4.3/Assemble.c:1410:55: warning[-Wunused-but-set-variable=]: variable ‘replcnt’ set but not used
Error: GCC_ANALYZER_WARNING (CWE-775): [#def12]
mdadm-4.3/Create.c:282:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
mdadm-4.3/Create.c:269:12: branch_false: following ‘false’ branch (when ‘have_container == 0’)...
mdadm-4.3/Create.c:272:21: branch_false: ...to here
mdadm-4.3/Create.c:275:30: acquire_resource: opened here
mdadm-4.3/Create.c:277:20: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
mdadm-4.3/Create.c:282:22: branch_false: ...to here
mdadm-4.3/Create.c:282:22: throw: if ‘fstat_is_blkdev’ throws an exception...
mdadm-4.3/Create.c:282:22: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
mdadm-4.3/Create.c:566:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*devlist.devname, 0)’
mdadm-4.3/Create.c:499:21: branch_false: following ‘false’ branch...
mdadm-4.3/Create.c:504:13: branch_false: ...to here
mdadm-4.3/Create.c:536:12: branch_false: following ‘false’ branch...
mdadm-4.3/Create.c:540:13: branch_false: ...to here
mdadm-4.3/Create.c:557:12: branch_true: following ‘true’ branch...
mdadm-4.3/Create.c:564:22: acquire_resource: opened here
mdadm-4.3/Create.c:565:20: branch_true: following ‘true’ branch...
mdadm-4.3/Create.c:566:21: branch_true: ...to here
mdadm-4.3/Create.c:566:21: throw: if ‘md_get_array_info’ throws an exception...
mdadm-4.3/Create.c:566:21: danger: ‘open(*devlist.devname, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
Error: COMPILER_WARNING: [#def14]
mdadm-4.3/Detail.c: scope_hint: In function ‘Detail’
mdadm-4.3/Detail.c:68:13: warning[-Wunused-but-set-variable=]: variable ‘failed’ set but not used
Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
mdadm-4.3/Detail.c:78:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, 0)’
mdadm-4.3/Detail.c:57:18: acquire_resource: opened here
mdadm-4.3/Detail.c:86:12: branch_false: following ‘false’ branch...
mdadm-4.3/Detail.c:91:15: branch_false: ...to here
mdadm-4.3/Detail.c:91:15: throw: if ‘sysfs_read’ throws an exception...
mdadm-4.3/Detail.c:78:18: danger: ‘open(dev, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
mdadm-4.3/Dump.c:129:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/dev/disk/by-id")’
mdadm-4.3/Dump.c:23:5: enter_function: entry to ‘Dump_metadata’
mdadm-4.3/Dump.c:41:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:42:23: branch_false: ...to here
mdadm-4.3/Dump.c:41:13: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:48:14: branch_false: ...to here
mdadm-4.3/Dump.c:49:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:54:14: branch_false: ...to here
mdadm-4.3/Dump.c:54:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:59:12: branch_false: ...to here
mdadm-4.3/Dump.c:68:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:74:13: branch_false: ...to here
mdadm-4.3/Dump.c:74:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:81:16: branch_false: ...to here
mdadm-4.3/Dump.c:86:9: call_function: calling ‘xasprintf’ from ‘Dump_metadata’
mdadm-4.3/Dump.c:86:9: return_function: returning to ‘Dump_metadata’ from ‘xasprintf’
mdadm-4.3/Dump.c:88:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:95:13: branch_false: ...to here
mdadm-4.3/Dump.c:95:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:104:13: branch_false: ...to here
mdadm-4.3/Dump.c:104:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:113:13: branch_false: ...to here
mdadm-4.3/Dump.c:118:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:124:16: branch_false: ...to here
mdadm-4.3/Dump.c:124:16: acquire_memory: allocated here
mdadm-4.3/Dump.c:125:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:125:12: branch_false: ...to here
mdadm-4.3/Dump.c:129:22: throw: if ‘readdir’ throws an exception...
mdadm-4.3/Dump.c:129:22: danger: ‘opendir("/dev/disk/by-id")’ leaks here; was allocated at [(27)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/26)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
mdadm-4.3/Dump.c:205:35: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dir)’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_true: following ‘true’ branch...
mdadm-4.3/Dump.c:198:26: branch_true: ...to here
mdadm-4.3/Dump.c:198:26: acquire_memory: allocated here
mdadm-4.3/Dump.c:205:24: branch_true: following ‘true’ branch...
mdadm-4.3/Dump.c:205:35: branch_true: ...to here
mdadm-4.3/Dump.c:205:35: throw: if ‘readdir’ throws an exception...
mdadm-4.3/Dump.c:205:35: danger: ‘opendir(dir)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-688): [#def18]
mdadm-4.3/Dump.c:244:17: warning[-Wanalyzer-null-argument]: use of NULL ‘opendir(dir)’ where non-null expected
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_true: following ‘true’ branch...
mdadm-4.3/Dump.c:198:26: branch_true: ...to here
mdadm-4.3/Dump.c:198:26: acquire_memory: allocated here
mdadm-4.3/Dump.c:205:24: release_memory: assuming ‘opendir(dir)’ is NULL
mdadm-4.3/Dump.c:205:24: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:244:17: branch_false: ...to here
mdadm-4.3/Dump.c:244:17: danger: argument 1 (‘opendir(dir)’) NULL where non-null expected
Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
mdadm-4.3/Dump.c:269:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fname’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:260:25: branch_false: ...to here
mdadm-4.3/Dump.c:260:25: acquire_memory: allocated here
mdadm-4.3/Dump.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:269:14: branch_false: ...to here
mdadm-4.3/Dump.c:269:14: throw: if ‘open’ throws an exception...
mdadm-4.3/Dump.c:269:14: danger: ‘fname’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def20]
mdadm-4.3/Dump.c:271:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 0)’
mdadm-4.3/Dump.c:158:5: enter_function: entry to ‘Restore_metadata’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_true: following ‘true’ branch...
mdadm-4.3/Dump.c:198:26: branch_true: ...to here
mdadm-4.3/Dump.c:205:24: branch_true: following ‘true’ branch...
mdadm-4.3/Dump.c:205:35: branch_true: ...to here
mdadm-4.3/Dump.c:245:20: branch_true: following ‘true’ branch (when ‘chosen’ is NULL)...
mdadm-4.3/Dump.c:247:38: branch_true: ...to here
mdadm-4.3/Dump.c:252:25: call_function: calling ‘xasprintf’ from ‘Restore_metadata’
mdadm-4.3/Dump.c:252:25: return_function: returning to ‘Restore_metadata’ from ‘xasprintf’
mdadm-4.3/Dump.c:253:28: branch_true: following ‘true’ branch...
mdadm-4.3/Dump.c:254:33: branch_true: ...to here
mdadm-4.3/Dump.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:269:14: branch_false: ...to here
mdadm-4.3/Dump.c:269:14: acquire_resource: opened here
mdadm-4.3/Dump.c:315:9: throw: if ‘close’ throws an exception...
mdadm-4.3/Dump.c:271:17: danger: ‘open(fname, 0)’ leaks here; was opened at [(23)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/22)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
mdadm-4.3/Dump.c:275:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 0)’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:260:25: branch_false: ...to here
mdadm-4.3/Dump.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:269:14: branch_false: ...to here
mdadm-4.3/Dump.c:269:14: acquire_resource: opened here
mdadm-4.3/Dump.c:270:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:275:13: branch_false: ...to here
mdadm-4.3/Dump.c:275:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:280:34: branch_false: ...to here
mdadm-4.3/Dump.c:280:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:285:12: branch_false: ...to here
mdadm-4.3/Dump.c:285:12: branch_true: following ‘true’ branch (when ‘st’ is NULL)...
mdadm-4.3/Dump.c:286:22: branch_true: ...to here
mdadm-4.3/Dump.c:286:22: throw: if ‘guess_super_type’ throws an exception...
mdadm-4.3/Dump.c:275:13: danger: ‘open(fname, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
mdadm-4.3/Dump.c:286:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fname’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:260:25: branch_false: ...to here
mdadm-4.3/Dump.c:260:25: acquire_memory: allocated here
mdadm-4.3/Dump.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:269:14: branch_false: ...to here
mdadm-4.3/Dump.c:270:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:275:13: branch_false: ...to here
mdadm-4.3/Dump.c:275:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:280:34: branch_false: ...to here
mdadm-4.3/Dump.c:280:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:285:12: branch_false: ...to here
mdadm-4.3/Dump.c:285:12: branch_true: following ‘true’ branch (when ‘st’ is NULL)...
mdadm-4.3/Dump.c:286:22: branch_true: ...to here
mdadm-4.3/Dump.c:286:22: throw: if ‘guess_super_type’ throws an exception...
mdadm-4.3/Dump.c:286:22: danger: ‘fname’ leaks here; was allocated at [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
mdadm-4.3/Dump.c:292:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fname’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:260:25: branch_false: ...to here
mdadm-4.3/Dump.c:260:25: acquire_memory: allocated here
mdadm-4.3/Dump.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:269:14: branch_false: ...to here
mdadm-4.3/Dump.c:270:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:275:13: branch_false: ...to here
mdadm-4.3/Dump.c:275:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:280:34: branch_false: ...to here
mdadm-4.3/Dump.c:280:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:285:12: branch_false: ...to here
mdadm-4.3/Dump.c:285:12: branch_false: following ‘false’ branch (when ‘st’ is non-NULL)...
mdadm-4.3/Dump.c:291:9: branch_false: ...to here
mdadm-4.3/Dump.c:292:13: throw: if the called function throws an exception...
mdadm-4.3/Dump.c:292:13: danger: ‘fname’ leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
mdadm-4.3/Dump.c:302:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fname’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:260:25: branch_false: ...to here
mdadm-4.3/Dump.c:260:25: acquire_memory: allocated here
mdadm-4.3/Dump.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:269:14: branch_false: ...to here
mdadm-4.3/Dump.c:270:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:275:13: branch_false: ...to here
mdadm-4.3/Dump.c:275:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:280:34: branch_false: ...to here
mdadm-4.3/Dump.c:280:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:285:12: branch_false: ...to here
mdadm-4.3/Dump.c:285:12: branch_false: following ‘false’ branch (when ‘st’ is non-NULL)...
mdadm-4.3/Dump.c:291:9: branch_false: ...to here
mdadm-4.3/Dump.c:292:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:297:13: branch_false: ...to here
mdadm-4.3/Dump.c:297:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:302:13: branch_false: ...to here
mdadm-4.3/Dump.c:302:13: throw: if the called function throws an exception...
mdadm-4.3/Dump.c:302:13: danger: ‘fname’ leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
mdadm-4.3/Dump.c:309:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fname’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:260:25: branch_false: ...to here
mdadm-4.3/Dump.c:260:25: acquire_memory: allocated here
mdadm-4.3/Dump.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:269:14: branch_false: ...to here
mdadm-4.3/Dump.c:270:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:275:13: branch_false: ...to here
mdadm-4.3/Dump.c:275:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:280:34: branch_false: ...to here
mdadm-4.3/Dump.c:280:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:285:12: branch_false: ...to here
mdadm-4.3/Dump.c:285:12: branch_false: following ‘false’ branch (when ‘st’ is non-NULL)...
mdadm-4.3/Dump.c:291:9: branch_false: ...to here
mdadm-4.3/Dump.c:292:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:297:13: branch_false: ...to here
mdadm-4.3/Dump.c:297:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:302:13: branch_false: ...to here
mdadm-4.3/Dump.c:302:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:307:13: branch_false: ...to here
mdadm-4.3/Dump.c:309:9: throw: if ‘close’ throws an exception...
mdadm-4.3/Dump.c:309:9: danger: ‘fname’ leaks here; was allocated at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
mdadm-4.3/Dump.c:310:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fname’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:260:25: branch_false: ...to here
mdadm-4.3/Dump.c:260:25: acquire_memory: allocated here
mdadm-4.3/Dump.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:269:14: branch_false: ...to here
mdadm-4.3/Dump.c:270:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:275:13: branch_false: ...to here
mdadm-4.3/Dump.c:275:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:280:34: branch_false: ...to here
mdadm-4.3/Dump.c:280:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:285:12: branch_false: ...to here
mdadm-4.3/Dump.c:285:12: branch_false: following ‘false’ branch (when ‘st’ is non-NULL)...
mdadm-4.3/Dump.c:291:9: branch_false: ...to here
mdadm-4.3/Dump.c:292:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:297:13: branch_false: ...to here
mdadm-4.3/Dump.c:297:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:302:13: branch_false: ...to here
mdadm-4.3/Dump.c:302:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:307:13: branch_false: ...to here
mdadm-4.3/Dump.c:310:9: throw: if ‘close’ throws an exception...
mdadm-4.3/Dump.c:310:9: danger: ‘fname’ leaks here; was allocated at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
mdadm-4.3/Dump.c:315:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fname’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:260:25: branch_false: ...to here
mdadm-4.3/Dump.c:260:25: acquire_memory: allocated here
mdadm-4.3/Dump.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:269:14: branch_false: ...to here
mdadm-4.3/Dump.c:270:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:275:13: branch_false: ...to here
mdadm-4.3/Dump.c:275:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:280:34: branch_false: ...to here
mdadm-4.3/Dump.c:280:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:285:12: branch_false: ...to here
mdadm-4.3/Dump.c:287:12: branch_true: following ‘true’ branch...
mdadm-4.3/Dump.c:288:17: branch_true: ...to here
mdadm-4.3/Dump.c:315:9: throw: if ‘close’ throws an exception...
mdadm-4.3/Dump.c:315:9: danger: ‘fname’ leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
mdadm-4.3/Dump.c:316:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fname’
mdadm-4.3/Dump.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:180:30: branch_false: ...to here
mdadm-4.3/Dump.c:186:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:191:14: branch_false: ...to here
mdadm-4.3/Dump.c:191:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:196:23: branch_false: ...to here
mdadm-4.3/Dump.c:196:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:260:25: branch_false: ...to here
mdadm-4.3/Dump.c:260:25: acquire_memory: allocated here
mdadm-4.3/Dump.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:269:14: branch_false: ...to here
mdadm-4.3/Dump.c:270:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:275:13: branch_false: ...to here
mdadm-4.3/Dump.c:275:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:280:34: branch_false: ...to here
mdadm-4.3/Dump.c:280:12: branch_false: following ‘false’ branch...
mdadm-4.3/Dump.c:285:12: branch_false: ...to here
mdadm-4.3/Dump.c:287:12: branch_true: following ‘true’ branch...
mdadm-4.3/Dump.c:288:17: branch_true: ...to here
mdadm-4.3/Dump.c:316:9: throw: if ‘close’ throws an exception...
mdadm-4.3/Dump.c:316:9: danger: ‘fname’ leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
mdadm-4.3/Grow.c:4704:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(backup_file, 0)’
mdadm-4.3/Grow.c:4690:45: branch_true: following ‘true’ branch (when ‘i < cnt’)...
mdadm-4.3/Grow.c:4704:26: branch_true: ...to here
mdadm-4.3/Grow.c:4704:20: branch_true: following ‘true’ branch...
mdadm-4.3/Grow.c:4705:30: branch_true: ...to here
mdadm-4.3/Grow.c:4705:30: acquire_resource: opened here
mdadm-4.3/Grow.c:4690:45: branch_true: following ‘true’ branch (when ‘i < cnt’)...
mdadm-4.3/Grow.c:4704:26: branch_true: ...to here
mdadm-4.3/Grow.c:4704:20: branch_true: following ‘true’ branch...
mdadm-4.3/Grow.c:4705:30: branch_true: ...to here
mdadm-4.3/Grow.c:4705:30: throw: if ‘open’ throws an exception...
mdadm-4.3/Grow.c:4704:26: danger: ‘open(backup_file, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
mdadm-4.3/Grow.c:4713:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
mdadm-4.3/Grow.c:4690:45: branch_true: following ‘true’ branch (when ‘i < cnt’)...
mdadm-4.3/Grow.c:4704:26: branch_true: ...to here
mdadm-4.3/Grow.c:4704:20: branch_true: following ‘true’ branch...
mdadm-4.3/Grow.c:4705:30: branch_true: ...to here
mdadm-4.3/Grow.c:4705:30: acquire_resource: opened here
mdadm-4.3/Grow.c:4690:45: branch_true: following ‘true’ branch (when ‘i < cnt’)...
mdadm-4.3/Grow.c:4704:26: branch_true: ...to here
mdadm-4.3/Grow.c:4704:20: branch_false: following ‘false’ branch...
mdadm-4.3/Grow.c:4713:36: branch_false: ...to here
mdadm-4.3/Grow.c:4714:28: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
mdadm-4.3/Grow.c:4716:29: branch_false: ...to here
mdadm-4.3/Grow.c:4716:29: throw: if the called function throws an exception...
mdadm-4.3/Grow.c:4713:25: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
mdadm-4.3/Grow.c:4731:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
mdadm-4.3/Grow.c:4690:45: branch_true: following ‘true’ branch (when ‘i < cnt’)...
mdadm-4.3/Grow.c:4704:26: branch_true: ...to here
mdadm-4.3/Grow.c:4705:30: acquire_resource: opened here
mdadm-4.3/Grow.c:4731:20: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-465): [#def32]
mdadm-4.3/Incremental.c:144:15: warning[-Wanalyzer-deref-before-check]: check of ‘devlist’ for NULL after already dereferencing it
mdadm-4.3/Incremental.c:110:12: branch_false: following ‘false’ branch...
mdadm-4.3/Incremental.c:112:15: branch_false: ...to here
mdadm-4.3/Incremental.c:113:12: branch_false: following ‘false’ branch...
mdadm-4.3/Incremental.c:120:13: branch_false: ...to here
mdadm-4.3/Incremental.c:120:12: branch_false: following ‘false’ branch...
mdadm-4.3/Incremental.c:120:12: branch_false: ...to here
mdadm-4.3/Incremental.c:144:15: danger: pointer ‘devlist’ is checked for NULL here but it was already dereferenced at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
mdadm-4.3/Incremental.c:1077:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/dev/disk/by-path")’
mdadm-4.3/Incremental.c:1074:15: acquire_memory: allocated here
mdadm-4.3/Incremental.c:1075:12: branch_false: following ‘false’ branch...
mdadm-4.3/Incremental.c:1075:12: branch_false: ...to here
mdadm-4.3/Incremental.c:1077:22: throw: if ‘readdir’ throws an exception...
mdadm-4.3/Incremental.c:1077:22: danger: ‘opendir("/dev/disk/by-path")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def34]
mdadm-4.3/Incremental.c:1120:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(devname, 0)’
mdadm-4.3/Incremental.c:1075:12: branch_false: following ‘false’ branch...
mdadm-4.3/Incremental.c:1075:12: branch_false: ...to here
mdadm-4.3/Incremental.c:1077:16: branch_true: following ‘true’ branch...
mdadm-4.3/Incremental.c:1080:36: branch_true: ...to here
mdadm-4.3/Incremental.c:1088:20: branch_false: following ‘false’ branch...
mdadm-4.3/Incremental.c:1106:20: branch_false: following ‘false’ branch...
mdadm-4.3/Incremental.c:1110:17: branch_false: ...to here
mdadm-4.3/Incremental.c:1113:20: branch_false: following ‘false’ branch...
mdadm-4.3/Incremental.c:1117:22: branch_false: ...to here
mdadm-4.3/Incremental.c:1117:22: acquire_resource: opened here
mdadm-4.3/Incremental.c:1118:20: branch_false: following ‘false’ branch...
mdadm-4.3/Incremental.c:1120:21: branch_false: ...to here
mdadm-4.3/Incremental.c:1120:21: throw: if ‘get_dev_size’ throws an exception...
mdadm-4.3/Incremental.c:1120:21: danger: ‘open(devname, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def35]
mdadm-4.3/Incremental.c:1434:42: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(devname, 0)’
mdadm-4.3/Incremental.c:1431:12: branch_true: following ‘true’ branch...
mdadm-4.3/Incremental.c:1432:26: branch_true: ...to here
mdadm-4.3/Incremental.c:1432:26: acquire_resource: opened here
mdadm-4.3/Incremental.c:1433:20: branch_true: following ‘true’ branch...
mdadm-4.3/Incremental.c:1434:42: branch_true: ...to here
mdadm-4.3/Incremental.c:1434:42: throw: if ‘fd2devnm’ throws an exception...
mdadm-4.3/Incremental.c:1434:42: danger: ‘open(devname, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def36]
mdadm-4.3/Kill.c:60:27: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, <unknown>)’
mdadm-4.3/Kill.c:49:14: acquire_resource: opened here
mdadm-4.3/Kill.c:50:12: branch_false: following ‘false’ branch...
mdadm-4.3/Kill.c:56:12: branch_false: ...to here
mdadm-4.3/Kill.c:56:12: branch_false: following ‘false’ branch (when ‘st’ is non-NULL)...
mdadm-4.3/Kill.c:60:27: branch_false: ...to here
mdadm-4.3/Kill.c:60:13: branch_true: following ‘true’ branch...
mdadm-4.3/Kill.c:61:20: branch_true: ...to here
mdadm-4.3/Kill.c:60:27: danger: ‘open(dev, <unknown>)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def37]
mdadm-4.3/Manage.c:209:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
mdadm-4.3/Manage.c:206:23: branch_true: following ‘true’ branch...
mdadm-4.3/Manage.c:207:25: branch_true: ...to here
mdadm-4.3/Manage.c:207:25: acquire_resource: opened here
mdadm-4.3/Manage.c:206:16: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
mdadm-4.3/Manage.c:209:24: branch_false: ...to here
mdadm-4.3/Manage.c:209:24: throw: if ‘fd2devnm’ throws an exception...
mdadm-4.3/Manage.c:209:24: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def38]
mdadm-4.3/Manage.c:1818:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(to_devname, 0)’
mdadm-4.3/Manage.c:1817:19: acquire_resource: opened here
mdadm-4.3/Manage.c:1818:19: throw: if ‘open’ throws an exception...
mdadm-4.3/Manage.c:1818:19: danger: ‘open(to_devname, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def39]
mdadm-4.3/Manage.c:1820:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(from_devname, 0)’
mdadm-4.3/Manage.c:1818:19: acquire_resource: opened here
mdadm-4.3/Manage.c:1820:12: branch_true: following ‘true’ branch...
mdadm-4.3/Manage.c:1821:20: branch_true: ...to here
mdadm-4.3/Manage.c:1821:20: branch_true: following ‘true’ branch...
mdadm-4.3/Manage.c:1822:25: branch_true: ...to here
mdadm-4.3/Manage.c:1822:25: throw: if ‘close’ throws an exception...
mdadm-4.3/Manage.c:1820:13: danger: ‘open(from_devname, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
mdadm-4.3/Manage.c:1820:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(to_devname, 0)’
mdadm-4.3/Manage.c:1817:19: acquire_resource: opened here
mdadm-4.3/Manage.c:1820:12: branch_true: following ‘true’ branch...
mdadm-4.3/Manage.c:1821:20: branch_true: ...to here
mdadm-4.3/Manage.c:1821:20: branch_true: following ‘true’ branch...
mdadm-4.3/Manage.c:1822:25: branch_true: ...to here
mdadm-4.3/Manage.c:1820:13: danger: ‘open(to_devname, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
mdadm-4.3/Monitor.c:651:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen("/usr/sbin/sendmail -t", "w")’
mdadm-4.3/Monitor.c:730:12: enter_function: entry to ‘check_array’
mdadm-4.3/Monitor.c:757:12: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:760:13: branch_false: ...to here
mdadm-4.3/Monitor.c:763:29: branch_true: following ‘true’ branch (when ‘mse2’ is non-NULL)...
mdadm-4.3/Monitor.c:764:41: branch_true: ...to here
mdadm-4.3/Monitor.c:764:20: branch_true: following ‘true’ branch (when the strings are equal)...
mdadm-4.3/Monitor.c:765:25: branch_true: ...to here
mdadm-4.3/Monitor.c:769:12: branch_false: following ‘false’ branch (when ‘mse’ is non-NULL)...
mdadm-4.3/Monitor.c:777:13: branch_false: ...to here
mdadm-4.3/Monitor.c:784:12: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:787:12: branch_false: ...to here
mdadm-4.3/Monitor.c:793:12: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:799:13: branch_false: ...to here
mdadm-4.3/Monitor.c:799:12: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:807:13: branch_false: ...to here
mdadm-4.3/Monitor.c:878:12: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:879:13: branch_true: ...to here
mdadm-4.3/Monitor.c:878:13: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:880:13: call_function: inlined call to ‘is_subarray’ from ‘check_array’
mdadm-4.3/Monitor.c:878:13: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:882:17: branch_true: ...to here
mdadm-4.3/Monitor.c:884:20: branch_false: following ‘false’ branch (when ‘sl’ is NULL)...
mdadm-4.3/Monitor.c:888:13: branch_false: ...to here
mdadm-4.3/Monitor.c:891:21: branch_true: following ‘true’ branch (when ‘i != 4096’)...
mdadm-4.3/Monitor.c:897:20: branch_true: ...to here
mdadm-4.3/Monitor.c:907:21: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:909:48: call_function: inlined call to ‘gnu_dev_minor’ from ‘check_array’
mdadm-4.3/Monitor.c:911:20: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:912:28: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:913:33: branch_true: ...to here
mdadm-4.3/Monitor.c:913:33: call_function: calling ‘alert’ from ‘check_array’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
mdadm-4.3/Monitor.c:760:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, 0)’
mdadm-4.3/Monitor.c:756:14: acquire_resource: opened here
mdadm-4.3/Monitor.c:757:12: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:760:13: branch_false: ...to here
mdadm-4.3/Monitor.c:760:12: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:761:17: branch_true: ...to here
mdadm-4.3/Monitor.c:761:17: throw: if ‘fd2devnm’ throws an exception...
mdadm-4.3/Monitor.c:760:13: danger: ‘open(dev, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
mdadm-4.3/Monitor.c:971:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&*<unknown>.devname, 0)’
mdadm-4.3/Monitor.c:955:28: branch_true: following ‘true’ branch (when ‘mse’ is non-NULL)...
mdadm-4.3/Monitor.c:956:21: branch_true: ...to here
mdadm-4.3/Monitor.c:956:20: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:956:40: branch_true: ...to here
mdadm-4.3/Monitor.c:970:35: acquire_resource: opened here
mdadm-4.3/Monitor.c:970:28: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:971:29: branch_false: ...to here
mdadm-4.3/Monitor.c:971:29: throw: if ‘md_get_array_info’ throws an exception...
mdadm-4.3/Monitor.c:971:29: danger: ‘open(&*<unknown>.devname, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def44]
mdadm-4.3/Monitor.c:998:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sl’
mdadm-4.3/Monitor.c:949:12: enter_function: entry to ‘add_new_arrays’
mdadm-4.3/Monitor.c:955:28: branch_true: following ‘true’ branch (when ‘mse’ is non-NULL)...
mdadm-4.3/Monitor.c:956:21: branch_true: ...to here
mdadm-4.3/Monitor.c:956:20: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:956:40: branch_true: ...to here
mdadm-4.3/Monitor.c:970:28: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:971:29: branch_false: ...to here
mdadm-4.3/Monitor.c:970:29: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:983:25: branch_false: ...to here
mdadm-4.3/Monitor.c:990:28: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:991:29: branch_true: ...to here
mdadm-4.3/Monitor.c:990:29: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:993:29: call_function: inlined call to ‘is_subarray’ from ‘add_new_arrays’
mdadm-4.3/Monitor.c:990:29: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:995:33: branch_true: ...to here
mdadm-4.3/Monitor.c:998:33: danger: dereference of NULL ‘sl’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
mdadm-4.3/Monitor.c:1023:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&*st.devname, 0)’
mdadm-4.3/Monitor.c:1014:12: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:1020:14: acquire_resource: opened here
mdadm-4.3/Monitor.c:1021:12: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:1023:13: branch_false: ...to here
mdadm-4.3/Monitor.c:1023:12: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:1024:17: branch_true: ...to here
mdadm-4.3/Monitor.c:1024:17: throw: if the called function throws an exception...
mdadm-4.3/Monitor.c:1023:13: danger: ‘open(&*st.devname, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
mdadm-4.3/Monitor.c:1117:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&*from.devname, 0)’
mdadm-4.3/Monitor.c:1111:18: acquire_resource: opened here
mdadm-4.3/Monitor.c:1115:12: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:1117:14: branch_false: ...to here
mdadm-4.3/Monitor.c:1117:12: branch_true: following ‘true’ branch...
mdadm-4.3/Monitor.c:1118:17: branch_true: ...to here
mdadm-4.3/Monitor.c:1117:14: danger: ‘open(&*from.devname, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
mdadm-4.3/Monitor.c:1367:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, 0)’
mdadm-4.3/Monitor.c:1358:12: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:1360:14: branch_false: ...to here
mdadm-4.3/Monitor.c:1360:14: acquire_resource: opened here
mdadm-4.3/Monitor.c:1361:12: branch_false: following ‘false’ branch...
mdadm-4.3/Monitor.c:1367:23: branch_false: ...to here
mdadm-4.3/Monitor.c:1367:23: throw: if ‘fd2devnm’ throws an exception...
mdadm-4.3/Monitor.c:1367:23: danger: ‘open(dev, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
mdadm-4.3/bitmap.c:470:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "w")’
mdadm-4.3/bitmap.c:428:5: enter_function: entry to ‘CreateBitmap’
mdadm-4.3/bitmap.c:449:14: acquire_resource: opened here
mdadm-4.3/bitmap.c:450:12: branch_false: following ‘false’ branch...
mdadm-4.3/bitmap.c:456:12: branch_false: ...to here
mdadm-4.3/bitmap.c:471:12: branch_false: following ‘false’ branch (when ‘uuid’ is NULL)...
mdadm-4.3/bitmap.c:473:9: branch_false: ...to here
mdadm-4.3/bitmap.c:480:12: branch_false: following ‘false’ branch...
mdadm-4.3/bitmap.c:486:18: call_function: inlined call to ‘bitmap_bits’ from ‘CreateBitmap’
mdadm-4.3/bitmap.c:487:12: branch_false: following ‘false’ branch...
mdadm-4.3/bitmap.c:492:20: branch_false: ...to here
mdadm-4.3/bitmap.c:505:9: throw: if ‘fflush’ throws an exception...
mdadm-4.3/bitmap.c:470:9: danger: ‘fopen(filename, "w")’ leaks here; was opened at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
mdadm-4.3/bitmap.c:470:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "w")’
mdadm-4.3/bitmap.c:428:5: enter_function: entry to ‘CreateBitmap’
mdadm-4.3/bitmap.c:449:14: acquire_memory: allocated here
mdadm-4.3/bitmap.c:450:12: branch_false: following ‘false’ branch...
mdadm-4.3/bitmap.c:456:12: branch_false: ...to here
mdadm-4.3/bitmap.c:471:12: branch_false: following ‘false’ branch (when ‘uuid’ is NULL)...
mdadm-4.3/bitmap.c:473:9: branch_false: ...to here
mdadm-4.3/bitmap.c:480:12: branch_false: following ‘false’ branch...
mdadm-4.3/bitmap.c:486:18: call_function: inlined call to ‘bitmap_bits’ from ‘CreateBitmap’
mdadm-4.3/bitmap.c:487:12: branch_false: following ‘false’ branch...
mdadm-4.3/bitmap.c:492:20: branch_false: ...to here
mdadm-4.3/bitmap.c:505:9: throw: if ‘fflush’ throws an exception...
mdadm-4.3/bitmap.c:470:9: danger: ‘fopen(filename, "w")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
mdadm-4.3/config.c:870:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
mdadm-4.3/config.c:979:6: enter_function: entry to ‘load_conffile’
mdadm-4.3/config.c:987:12: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:992:13: branch_false: ...to here
mdadm-4.3/config.c:992:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
mdadm-4.3/config.c:998:20: branch_false: ...to here
mdadm-4.3/config.c:998:19: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:999:21: branch_false: ...to here
mdadm-4.3/config.c:999:21: acquire_resource: opened here
mdadm-4.3/config.c:1005:20: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:1013:25: branch_false: ...to here
mdadm-4.3/config.c:1013:25: call_function: calling ‘conf_file_or_dir’ from ‘load_conffile’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
mdadm-4.3/config.c:870:24: warning[-Wanalyzer-malloc-leak]: leak of ‘f2’
mdadm-4.3/config.c:979:6: enter_function: entry to ‘load_conffile’
mdadm-4.3/config.c:987:12: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:992:13: branch_false: ...to here
mdadm-4.3/config.c:992:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
mdadm-4.3/config.c:998:20: branch_false: ...to here
mdadm-4.3/config.c:998:19: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:999:21: branch_false: ...to here
mdadm-4.3/config.c:1005:20: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:1013:25: branch_false: ...to here
mdadm-4.3/config.c:1013:25: call_function: calling ‘conf_file_or_dir’ from ‘load_conffile’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
mdadm-4.3/config.c:870:24: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
mdadm-4.3/config.c:979:6: enter_function: entry to ‘load_conffile’
mdadm-4.3/config.c:987:12: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:992:13: branch_false: ...to here
mdadm-4.3/config.c:992:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
mdadm-4.3/config.c:998:20: branch_false: ...to here
mdadm-4.3/config.c:998:19: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:999:21: branch_false: ...to here
mdadm-4.3/config.c:999:21: acquire_memory: allocated here
mdadm-4.3/config.c:1005:20: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:1013:25: branch_false: ...to here
mdadm-4.3/config.c:1013:25: call_function: calling ‘conf_file_or_dir’ from ‘load_conffile’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
mdadm-4.3/config.c:939:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopendir(fileno(f))’
mdadm-4.3/config.c:979:6: enter_function: entry to ‘load_conffile’
mdadm-4.3/config.c:987:12: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:992:13: branch_false: ...to here
mdadm-4.3/config.c:992:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
mdadm-4.3/config.c:998:20: branch_false: ...to here
mdadm-4.3/config.c:998:19: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:999:21: branch_false: ...to here
mdadm-4.3/config.c:1005:20: branch_false: following ‘false’ branch...
mdadm-4.3/config.c:1013:25: branch_false: ...to here
mdadm-4.3/config.c:1013:25: call_function: calling ‘conf_file_or_dir’ from ‘load_conffile’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
mdadm-4.3/lib.c:343:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/devices", "r")’
mdadm-4.3/lib.c:63:5: enter_function: entry to ‘get_mdp_major’
mdadm-4.3/lib.c:75:14: acquire_resource: opened here
mdadm-4.3/lib.c:76:12: branch_false: following ‘false’ branch...
mdadm-4.3/lib.c:76:12: branch_false: ...to here
mdadm-4.3/lib.c:79:21: call_function: calling ‘conf_word’ from ‘get_mdp_major’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
mdadm-4.3/lib.c:343:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/devices", "r")’
mdadm-4.3/lib.c:63:5: enter_function: entry to ‘get_mdp_major’
mdadm-4.3/lib.c:75:14: acquire_memory: allocated here
mdadm-4.3/lib.c:76:12: branch_false: following ‘false’ branch...
mdadm-4.3/lib.c:76:12: branch_false: ...to here
mdadm-4.3/lib.c:79:21: call_function: calling ‘conf_word’ from ‘get_mdp_major’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
mdadm-4.3/lib.c:356:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/proc/devices", "r")’
mdadm-4.3/lib.c:63:5: enter_function: entry to ‘get_mdp_major’
mdadm-4.3/lib.c:75:14: acquire_resource: opened here
mdadm-4.3/lib.c:76:12: branch_false: following ‘false’ branch...
mdadm-4.3/lib.c:76:12: branch_false: ...to here
mdadm-4.3/lib.c:79:21: call_function: calling ‘conf_word’ from ‘get_mdp_major’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
mdadm-4.3/lib.c:356:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/proc/devices", "r")’
mdadm-4.3/lib.c:63:5: enter_function: entry to ‘get_mdp_major’
mdadm-4.3/lib.c:75:14: acquire_memory: allocated here
mdadm-4.3/lib.c:76:12: branch_false: following ‘false’ branch...
mdadm-4.3/lib.c:76:12: branch_false: ...to here
mdadm-4.3/lib.c:79:21: call_function: calling ‘conf_word’ from ‘get_mdp_major’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
mdadm-4.3/mapfile.c:67:14: warning[-Wanalyzer-malloc-leak]: leak of ‘open_map(1)’
mdadm-4.3/mapfile.c:356:6: enter_function: entry to ‘RebuildMap’
mdadm-4.3/mapfile.c:504:13: call_function: calling ‘map_write’ from ‘RebuildMap’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
mdadm-4.3/mdadm.c:1060:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(optarg, 2)’
mdadm-4.3/mdadm.c:110:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdadm.c:115:9: branch_false: ...to here
mdadm-4.3/mdadm.c:117:16: branch_true: following ‘true’ branch (when ‘opt != -1’)...
mdadm-4.3/mdadm.c:122:17: branch_true: ...to here
mdadm-4.3/mdadm.c:261:20: branch_false: following ‘false’ branch...
mdadm-4.3/mdadm.c:263:36: branch_false: ...to here
mdadm-4.3/mdadm.c:263:27: branch_false: following ‘false’ branch...
mdadm-4.3/mdadm.c:274:28: branch_false: ...to here
mdadm-4.3/mdadm.c:274:27: branch_true: following ‘true’ branch...
mdadm-4.3/mdadm.c:276:29: branch_true: ...to here
mdadm-4.3/mdadm.c:276:28: branch_false: following ‘false’ branch...
mdadm-4.3/mdadm.c:321:17: branch_false: ...to here
mdadm-4.3/mdadm.c:333:20: branch_false: following ‘false’ branch (when ‘opt != 1’)...
mdadm-4.3/mdadm.c:368:25: branch_false: ...to here
mdadm-4.3/mdadm.c:1049:28: branch_false: following ‘false’ branch...
mdadm-4.3/mdadm.c:1053:29: branch_false: ...to here
mdadm-4.3/mdadm.c:1053:28: branch_false: following ‘false’ branch (when the strings are non-equal)...
mdadm-4.3/mdadm.c:1054:29: branch_false: ...to here
mdadm-4.3/mdadm.c:1053:29: branch_false: following ‘false’ branch (when the strings are non-equal)...
mdadm-4.3/mdadm.c:1059:37: branch_false: ...to here
mdadm-4.3/mdadm.c:1059:37: acquire_resource: opened here
mdadm-4.3/mdadm.c:1060:30: danger: ‘open(optarg, 2)’ leaks here; was opened at [(27)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/26)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
mdadm-4.3/mdadm.c:1981:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, 0)’
mdadm-4.3/mdadm.c:1973:18: acquire_resource: opened here
mdadm-4.3/mdadm.c:1977:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdadm.c:1981:18: branch_false: ...to here
mdadm-4.3/mdadm.c:1981:18: throw: if ‘sysfs_init’ throws an exception...
mdadm-4.3/mdadm.c:1981:18: danger: ‘open(dev, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
mdadm-4.3/mdadm.h:1365:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, <unknown>)’
mdadm-4.3/Kill.c:32:5: enter_function: entry to ‘Kill’
mdadm-4.3/Kill.c:49:14: acquire_resource: opened here
mdadm-4.3/Kill.c:50:12: branch_false: following ‘false’ branch...
mdadm-4.3/Kill.c:56:12: branch_false: ...to here
mdadm-4.3/Kill.c:56:12: branch_true: following ‘true’ branch (when ‘st’ is NULL)...
mdadm-4.3/Kill.c:57:22: call_function: inlined call to ‘guess_super’ from ‘Kill’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
mdadm-4.3/mdmon.c:187:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&buf, 0)’
mdadm-4.3/mdmon.c:176:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:180:9: branch_false: ...to here
mdadm-4.3/mdmon.c:181:14: acquire_resource: opened here
mdadm-4.3/mdmon.c:182:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:185:13: branch_false: ...to here
mdadm-4.3/mdmon.c:187:9: danger: ‘open(&buf, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def63]
mdadm-4.3/mdmon.c:250:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sfd’
mdadm-4.3/mdmon.c:233:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:236:9: branch_false: ...to here
mdadm-4.3/mdmon.c:238:15: acquire_resource: stream socket created here
mdadm-4.3/mdmon.c:239:12: branch_false: following ‘false’ branch (when ‘sfd >= 0’)...
mdadm-4.3/mdmon.c:242:9: branch_false: ...to here
mdadm-4.3/mdmon.c:245:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:249:9: branch_false: ...to here
mdadm-4.3/mdmon.c:250:14: throw: if ‘fcntl’ throws an exception...
mdadm-4.3/mdmon.c:250:14: danger: ‘sfd’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
mdadm-4.3/mdmon.c:446:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[0]’
mdadm-4.3/mdmon.c:444:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:450:12: branch_false: ...to here
mdadm-4.3/mdmon.c:450:12: branch_true: following ‘true’ branch (when ‘must_fork != 0’)...
mdadm-4.3/mdmon.c:451:21: branch_true: ...to here
mdadm-4.3/mdmon.c:451:20: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:455:24: branch_false: ...to here
mdadm-4.3/mdmon.c:446:24: danger: ‘pfd[0]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
mdadm-4.3/mdmon.c:446:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[1]’
mdadm-4.3/mdmon.c:444:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:450:12: branch_false: ...to here
mdadm-4.3/mdmon.c:450:12: branch_true: following ‘true’ branch (when ‘must_fork != 0’)...
mdadm-4.3/mdmon.c:451:21: branch_true: ...to here
mdadm-4.3/mdmon.c:451:20: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:455:24: branch_false: ...to here
mdadm-4.3/mdmon.c:446:24: danger: ‘pfd[1]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def66]
mdadm-4.3/mdmon.c:446:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[status]’
mdadm-4.3/mdmon.c:302:5: enter_function: entry to ‘main’
mdadm-4.3/mdmon.c:327:16: branch_true: following ‘true’ branch (when ‘opt != -1’)...
mdadm-4.3/mdmon.c:328:17: branch_true: ...to here
mdadm-4.3/mdmon.c:330:29: call_function: inlined call to ‘is_duplicate_opt’ from ‘main’
mdadm-4.3/mdmon.c:332:46: branch_false: ...to here
mdadm-4.3/mdmon.c:370:12: branch_false: following ‘false’ branch (when ‘all != 0’)...
mdadm-4.3/mdmon.c:381:12: branch_false: ...to here
mdadm-4.3/mdmon.c:381:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:387:12: branch_false: following ‘false’ branch (when ‘help == 0’)...
mdadm-4.3/mdmon.c:390:12: branch_false: ...to here
mdadm-4.3/mdmon.c:390:12: branch_true: following ‘true’ branch (when ‘all != 0’)...
mdadm-4.3/mdmon.c:392:37: branch_true: ...to here
mdadm-4.3/mdmon.c:396:34: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
mdadm-4.3/mdmon.c:397:29: branch_true: ...to here
mdadm-4.3/mdmon.c:397:28: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:398:29: branch_true: ...to here
mdadm-4.3/mdmon.c:397:29: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:399:30: call_function: inlined call to ‘is_subarray’ from ‘main’
mdadm-4.3/mdmon.c:397:29: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:403:44: branch_false: ...to here
mdadm-4.3/mdmon.c:407:43: call_function: calling ‘mdmon’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
mdadm-4.3/mdmon.c:460:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[0]’
mdadm-4.3/mdmon.c:444:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:450:12: branch_false: ...to here
mdadm-4.3/mdmon.c:450:12: branch_true: following ‘true’ branch (when ‘must_fork != 0’)...
mdadm-4.3/mdmon.c:451:21: branch_true: ...to here
mdadm-4.3/mdmon.c:451:20: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:455:24: branch_false: ...to here
mdadm-4.3/mdmon.c:460:25: throw: if ‘close’ throws an exception...
mdadm-4.3/mdmon.c:460:25: danger: ‘pfd[0]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def68]
mdadm-4.3/mdmon.c:460:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[1]’
mdadm-4.3/mdmon.c:444:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:450:12: branch_false: ...to here
mdadm-4.3/mdmon.c:450:12: branch_true: following ‘true’ branch (when ‘must_fork != 0’)...
mdadm-4.3/mdmon.c:451:21: branch_true: ...to here
mdadm-4.3/mdmon.c:451:20: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:455:24: branch_false: ...to here
mdadm-4.3/mdmon.c:460:25: throw: if ‘close’ throws an exception...
mdadm-4.3/mdmon.c:460:25: danger: ‘pfd[1]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def69]
mdadm-4.3/mdmon.c:460:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[status]’
mdadm-4.3/mdmon.c:302:5: enter_function: entry to ‘main’
mdadm-4.3/mdmon.c:327:16: branch_true: following ‘true’ branch (when ‘opt != -1’)...
mdadm-4.3/mdmon.c:328:17: branch_true: ...to here
mdadm-4.3/mdmon.c:330:29: call_function: inlined call to ‘is_duplicate_opt’ from ‘main’
mdadm-4.3/mdmon.c:332:46: branch_false: ...to here
mdadm-4.3/mdmon.c:370:12: branch_false: following ‘false’ branch (when ‘all != 0’)...
mdadm-4.3/mdmon.c:381:12: branch_false: ...to here
mdadm-4.3/mdmon.c:381:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:387:12: branch_false: following ‘false’ branch (when ‘help == 0’)...
mdadm-4.3/mdmon.c:390:12: branch_false: ...to here
mdadm-4.3/mdmon.c:390:12: branch_true: following ‘true’ branch (when ‘all != 0’)...
mdadm-4.3/mdmon.c:392:37: branch_true: ...to here
mdadm-4.3/mdmon.c:396:34: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
mdadm-4.3/mdmon.c:397:29: branch_true: ...to here
mdadm-4.3/mdmon.c:397:28: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:398:29: branch_true: ...to here
mdadm-4.3/mdmon.c:397:29: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:399:30: call_function: inlined call to ‘is_subarray’ from ‘main’
mdadm-4.3/mdmon.c:397:29: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:403:44: branch_false: ...to here
mdadm-4.3/mdmon.c:407:43: call_function: calling ‘mdmon’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def70]
mdadm-4.3/mdmon.c:463:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[0]’
mdadm-4.3/mdmon.c:444:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:450:12: branch_false: ...to here
mdadm-4.3/mdmon.c:450:12: branch_true: following ‘true’ branch (when ‘must_fork != 0’)...
mdadm-4.3/mdmon.c:451:21: branch_true: ...to here
mdadm-4.3/mdmon.c:451:20: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:455:24: branch_false: ...to here
mdadm-4.3/mdmon.c:463:25: throw: if ‘close’ throws an exception...
mdadm-4.3/mdmon.c:463:25: danger: ‘pfd[0]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
mdadm-4.3/mdmon.c:463:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[1]’
mdadm-4.3/mdmon.c:444:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:450:12: branch_false: ...to here
mdadm-4.3/mdmon.c:450:12: branch_true: following ‘true’ branch (when ‘must_fork != 0’)...
mdadm-4.3/mdmon.c:451:21: branch_true: ...to here
mdadm-4.3/mdmon.c:451:20: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:455:24: branch_false: ...to here
mdadm-4.3/mdmon.c:463:25: throw: if ‘close’ throws an exception...
mdadm-4.3/mdmon.c:463:25: danger: ‘pfd[1]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def72]
mdadm-4.3/mdmon.c:463:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[status]’
mdadm-4.3/mdmon.c:302:5: enter_function: entry to ‘main’
mdadm-4.3/mdmon.c:327:16: branch_true: following ‘true’ branch (when ‘opt != -1’)...
mdadm-4.3/mdmon.c:328:17: branch_true: ...to here
mdadm-4.3/mdmon.c:330:29: call_function: inlined call to ‘is_duplicate_opt’ from ‘main’
mdadm-4.3/mdmon.c:332:46: branch_false: ...to here
mdadm-4.3/mdmon.c:370:12: branch_false: following ‘false’ branch (when ‘all != 0’)...
mdadm-4.3/mdmon.c:381:12: branch_false: ...to here
mdadm-4.3/mdmon.c:381:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:387:12: branch_false: following ‘false’ branch (when ‘help == 0’)...
mdadm-4.3/mdmon.c:390:12: branch_false: ...to here
mdadm-4.3/mdmon.c:390:12: branch_true: following ‘true’ branch (when ‘all != 0’)...
mdadm-4.3/mdmon.c:392:37: branch_true: ...to here
mdadm-4.3/mdmon.c:396:34: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
mdadm-4.3/mdmon.c:397:29: branch_true: ...to here
mdadm-4.3/mdmon.c:397:28: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:398:29: branch_true: ...to here
mdadm-4.3/mdmon.c:397:29: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:399:30: call_function: inlined call to ‘is_subarray’ from ‘main’
mdadm-4.3/mdmon.c:397:29: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:403:44: branch_false: ...to here
mdadm-4.3/mdmon.c:407:43: call_function: calling ‘mdmon’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def73]
mdadm-4.3/mdmon.c:465:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[0]’
mdadm-4.3/mdmon.c:444:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:450:12: branch_false: ...to here
mdadm-4.3/mdmon.c:450:12: branch_true: following ‘true’ branch (when ‘must_fork != 0’)...
mdadm-4.3/mdmon.c:451:21: branch_true: ...to here
mdadm-4.3/mdmon.c:451:20: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:455:24: branch_false: ...to here
mdadm-4.3/mdmon.c:464:28: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:465:33: branch_true: ...to here
mdadm-4.3/mdmon.c:465:33: throw: if ‘wait’ throws an exception...
mdadm-4.3/mdmon.c:465:33: danger: ‘pfd[0]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def74]
mdadm-4.3/mdmon.c:465:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[status]’
mdadm-4.3/mdmon.c:302:5: enter_function: entry to ‘main’
mdadm-4.3/mdmon.c:327:16: branch_true: following ‘true’ branch (when ‘opt != -1’)...
mdadm-4.3/mdmon.c:328:17: branch_true: ...to here
mdadm-4.3/mdmon.c:330:29: call_function: inlined call to ‘is_duplicate_opt’ from ‘main’
mdadm-4.3/mdmon.c:332:46: branch_false: ...to here
mdadm-4.3/mdmon.c:370:12: branch_false: following ‘false’ branch (when ‘all != 0’)...
mdadm-4.3/mdmon.c:381:12: branch_false: ...to here
mdadm-4.3/mdmon.c:381:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:387:12: branch_false: following ‘false’ branch (when ‘help == 0’)...
mdadm-4.3/mdmon.c:390:12: branch_false: ...to here
mdadm-4.3/mdmon.c:390:12: branch_true: following ‘true’ branch (when ‘all != 0’)...
mdadm-4.3/mdmon.c:392:37: branch_true: ...to here
mdadm-4.3/mdmon.c:396:34: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
mdadm-4.3/mdmon.c:397:29: branch_true: ...to here
mdadm-4.3/mdmon.c:397:28: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:398:29: branch_true: ...to here
mdadm-4.3/mdmon.c:397:29: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:399:30: call_function: inlined call to ‘is_subarray’ from ‘main’
mdadm-4.3/mdmon.c:397:29: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:403:44: branch_false: ...to here
mdadm-4.3/mdmon.c:407:43: call_function: calling ‘mdmon’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def75]
mdadm-4.3/mdmon.c:468:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[0]’
mdadm-4.3/mdmon.c:444:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:450:12: branch_false: ...to here
mdadm-4.3/mdmon.c:450:12: branch_true: following ‘true’ branch (when ‘must_fork != 0’)...
mdadm-4.3/mdmon.c:451:21: branch_true: ...to here
mdadm-4.3/mdmon.c:451:20: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:455:24: branch_false: ...to here
mdadm-4.3/mdmon.c:468:25: throw: if ‘close’ throws an exception...
mdadm-4.3/mdmon.c:468:25: danger: ‘pfd[0]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def76]
mdadm-4.3/mdmon.c:468:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[status]’
mdadm-4.3/mdmon.c:302:5: enter_function: entry to ‘main’
mdadm-4.3/mdmon.c:327:16: branch_true: following ‘true’ branch (when ‘opt != -1’)...
mdadm-4.3/mdmon.c:328:17: branch_true: ...to here
mdadm-4.3/mdmon.c:330:29: call_function: inlined call to ‘is_duplicate_opt’ from ‘main’
mdadm-4.3/mdmon.c:332:46: branch_false: ...to here
mdadm-4.3/mdmon.c:370:12: branch_false: following ‘false’ branch (when ‘all != 0’)...
mdadm-4.3/mdmon.c:381:12: branch_false: ...to here
mdadm-4.3/mdmon.c:381:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:387:12: branch_false: following ‘false’ branch (when ‘help == 0’)...
mdadm-4.3/mdmon.c:390:12: branch_false: ...to here
mdadm-4.3/mdmon.c:390:12: branch_true: following ‘true’ branch (when ‘all != 0’)...
mdadm-4.3/mdmon.c:392:37: branch_true: ...to here
mdadm-4.3/mdmon.c:396:34: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
mdadm-4.3/mdmon.c:397:29: branch_true: ...to here
mdadm-4.3/mdmon.c:397:28: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:398:29: branch_true: ...to here
mdadm-4.3/mdmon.c:397:29: branch_true: following ‘true’ branch...
mdadm-4.3/mdmon.c:399:30: call_function: inlined call to ‘is_subarray’ from ‘main’
mdadm-4.3/mdmon.c:397:29: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:403:44: branch_false: ...to here
mdadm-4.3/mdmon.c:407:43: call_function: calling ‘mdmon’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def77]
mdadm-4.3/mdmon.c:474:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pfd[1]’
mdadm-4.3/mdmon.c:444:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:450:12: branch_false: ...to here
mdadm-4.3/mdmon.c:450:12: branch_true: following ‘true’ branch (when ‘must_fork != 0’)...
mdadm-4.3/mdmon.c:451:21: branch_true: ...to here
mdadm-4.3/mdmon.c:451:20: branch_false: following ‘false’ branch...
mdadm-4.3/mdmon.c:455:24: branch_false: ...to here
mdadm-4.3/mdmon.c:474:21: throw: if ‘xcalloc’ throws an exception...
mdadm-4.3/mdmon.c:474:21: danger: ‘pfd[1]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def78]
mdadm-4.3/mdopen.c:120:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
mdadm-4.3/mdopen.c:114:14: acquire_resource: opened here
mdadm-4.3/mdopen.c:115:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdopen.c:120:21: branch_false: ...to here
mdadm-4.3/mdopen.c:120:21: throw: if ‘write’ throws an exception...
mdadm-4.3/mdopen.c:120:21: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def79]
mdadm-4.3/mdopen.c:121:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
mdadm-4.3/mdopen.c:114:14: acquire_resource: opened here
mdadm-4.3/mdopen.c:115:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdopen.c:120:21: branch_false: ...to here
mdadm-4.3/mdopen.c:121:17: throw: if ‘close’ throws an exception...
mdadm-4.3/mdopen.c:121:17: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
mdadm-4.3/mdopen.c:470:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, 0)’
mdadm-4.3/mdopen.c:461:20: acquire_resource: opened here
mdadm-4.3/mdopen.c:463:12: branch_false: following ‘false’ branch...
mdadm-4.3/mdopen.c:470:13: branch_false: ...to here
mdadm-4.3/mdopen.c:470:13: throw: if ‘md_array_valid’ throws an exception...
mdadm-4.3/mdopen.c:470:13: danger: ‘open(dev, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def81]
mdadm-4.3/mdstat.c:150:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
mdadm-4.3/mdstat.c:411:20: enter_function: entry to ‘mdstat_by_subdev’
mdadm-4.3/mdstat.c:413:37: call_function: calling ‘mdstat_read’ from ‘mdstat_by_subdev’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
mdadm-4.3/mdstat.c:150:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
mdadm-4.3/mdstat.c:411:20: enter_function: entry to ‘mdstat_by_subdev’
mdadm-4.3/mdstat.c:413:37: call_function: calling ‘mdstat_read’ from ‘mdstat_by_subdev’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def83]
mdadm-4.3/mdstat.c:154:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
mdadm-4.3/mdstat.c:411:20: enter_function: entry to ‘mdstat_by_subdev’
mdadm-4.3/mdstat.c:413:37: call_function: calling ‘mdstat_read’ from ‘mdstat_by_subdev’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
mdadm-4.3/mdstat.c:154:24: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
mdadm-4.3/mdstat.c:411:20: enter_function: entry to ‘mdstat_by_subdev’
mdadm-4.3/mdstat.c:413:37: call_function: calling ‘mdstat_read’ from ‘mdstat_by_subdev’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
mdadm-4.3/platform-intel.c:86:19: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&path)’
mdadm-4.3/platform-intel.c:278:17: enter_function: entry to ‘find_intel_devices’
mdadm-4.3/platform-intel.c:288:16: call_function: calling ‘find_driver_devices’ from ‘find_intel_devices’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
mdadm-4.3/platform-intel.c:226:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(__builtin_alloca_with_align(strnlen(dev_path, 4096) + strnlen(entry, 4096) + 2, 8), 0)’
mdadm-4.3/platform-intel.c:278:17: enter_function: entry to ‘find_intel_devices’
mdadm-4.3/platform-intel.c:288:16: call_function: calling ‘find_driver_devices’ from ‘find_intel_devices’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def87]
mdadm-4.3/platform-intel.c:250:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(__builtin_alloca_with_align(strlen(dev_path) + 8, 8), 0)’
mdadm-4.3/platform-intel.c:278:17: enter_function: entry to ‘find_intel_devices’
mdadm-4.3/platform-intel.c:288:16: call_function: calling ‘find_driver_devices’ from ‘find_intel_devices’
Error: CPPCHECK_WARNING (CWE-758): [#def88]
mdadm-4.3/platform-intel.c:460: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
Error: GCC_ANALYZER_WARNING (CWE-775): [#def89]
mdadm-4.3/platform-intel.c:551:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
mdadm-4.3/platform-intel.c:614:25: enter_function: entry to ‘find_imsm_efi’
mdadm-4.3/platform-intel.c:632:22: call_function: calling ‘read_efi_variable’ from ‘find_imsm_efi’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
mdadm-4.3/platform-intel.c:556:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
mdadm-4.3/platform-intel.c:614:25: enter_function: entry to ‘find_imsm_efi’
mdadm-4.3/platform-intel.c:632:22: call_function: calling ‘read_efi_variable’ from ‘find_imsm_efi’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def91]
mdadm-4.3/platform-intel.c:586:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
mdadm-4.3/platform-intel.c:614:25: enter_function: entry to ‘find_imsm_efi’
mdadm-4.3/platform-intel.c:632:22: call_function: calling ‘read_efi_variable’ from ‘find_imsm_efi’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def92]
mdadm-4.3/platform-intel.c:605:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
mdadm-4.3/platform-intel.c:614:25: enter_function: entry to ‘find_imsm_efi’
mdadm-4.3/platform-intel.c:632:22: call_function: calling ‘read_efi_variable’ from ‘find_imsm_efi’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
mdadm-4.3/platform-intel.c:995:20: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/sys/bus/pci/drivers/vmd")’
mdadm-4.3/platform-intel.c:991:15: acquire_memory: allocated here
mdadm-4.3/platform-intel.c:992:12: branch_false: following ‘false’ branch...
mdadm-4.3/platform-intel.c:995:20: branch_false: ...to here
mdadm-4.3/platform-intel.c:995:20: throw: if ‘readdir’ throws an exception...
mdadm-4.3/platform-intel.c:995:20: danger: ‘opendir("/sys/bus/pci/drivers/vmd")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
Error: COMPILER_WARNING: [#def94]
mdadm-4.3/platform-intel.c:20: included_from: Included from here.
mdadm-4.3/platform-intel.c: scope_hint: In function ‘imsm_platform_test’
mdadm-4.3/platform-intel.h:28:37: warning[-Wunterminated-string-initialization]: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (5 chars into 4 available)
mdadm-4.3/platform-intel.c:447:30: note: in expansion of macro ‘IMSM_OROM_SIGNATURE’
Error: COMPILER_WARNING: [#def95]
mdadm-4.3/platform-intel.c: scope_hint: In function ‘find_imsm_nvme’
mdadm-4.3/platform-intel.h:29:49: warning[-Wunterminated-string-initialization]: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (5 chars into 4 available)
mdadm-4.3/platform-intel.c:683:38: note: in expansion of macro ‘IMSM_NVME_OROM_COMPAT_SIGNATURE’
Error: COMPILER_WARNING: [#def96]
mdadm-4.3/platform-intel.c: scope_hint: In function ‘add_vmd_orom’
mdadm-4.3/platform-intel.h:30:48: warning[-Wunterminated-string-initialization]: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (5 chars into 4 available)
mdadm-4.3/platform-intel.c:751:30: note: in expansion of macro ‘IMSM_VMD_OROM_COMPAT_SIGNATURE’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
mdadm-4.3/policy.c:207:31: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&symlink)’
mdadm-4.3/policy.c:773:5: enter_function: entry to ‘policy_check_path’
mdadm-4.3/policy.c:777:27: call_function: calling ‘disk_paths’ from ‘policy_check_path’
Error: GCC_ANALYZER_WARNING (CWE-688): [#def98]
mdadm-4.3/policy.c:340:37: warning[-Wanalyzer-null-argument]: use of NULL ‘part’ where non-null expected
mdadm-4.3/policy.c:706:20: enter_function: entry to ‘domain_from_array’
mdadm-4.3/policy.c:710:12: branch_false: following ‘false’ branch (when ‘mdi’ is non-NULL)...
mdadm-4.3/policy.c:712:14: branch_false: ...to here
mdadm-4.3/policy.c:712:32: branch_true: following ‘true’ branch (when ‘mdi’ is non-NULL)...
mdadm-4.3/policy.c:713:46: branch_true: ...to here
mdadm-4.3/policy.c:713:17: call_function: calling ‘domainlist_add_dev’ from ‘domain_from_array’
Error: GCC_ANALYZER_WARNING (CWE-688): [#def99]
mdadm-4.3/policy.c:344:61: warning[-Wanalyzer-null-argument]: use of NULL ‘part’ where non-null expected
mdadm-4.3/policy.c:706:20: enter_function: entry to ‘domain_from_array’
mdadm-4.3/policy.c:710:12: branch_false: following ‘false’ branch (when ‘mdi’ is non-NULL)...
mdadm-4.3/policy.c:712:14: branch_false: ...to here
mdadm-4.3/policy.c:712:32: branch_true: following ‘true’ branch (when ‘mdi’ is non-NULL)...
mdadm-4.3/policy.c:713:46: branch_true: ...to here
mdadm-4.3/policy.c:713:17: call_function: calling ‘domainlist_add_dev’ from ‘domain_from_array’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def100]
mdadm-4.3/policy.c:911:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
mdadm-4.3/policy.c:899:12: branch_true: following ‘true’ branch (when ‘rule_name’ is non-NULL)...
mdadm-4.3/policy.c:900:17: branch_true: ...to here
mdadm-4.3/policy.c:903:22: acquire_resource: opened here
mdadm-4.3/policy.c:905:20: branch_false: following ‘false’ branch...
mdadm-4.3/policy.c:911:13: branch_false: ...to here
mdadm-4.3/policy.c:911:13: throw: if ‘write’ throws an exception...
mdadm-4.3/policy.c:911:13: danger: ‘fd’ leaks here; was opened at [(4)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/3)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def101]
mdadm-4.3/policy.c:919:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
mdadm-4.3/policy.c:899:12: branch_true: following ‘true’ branch (when ‘rule_name’ is non-NULL)...
mdadm-4.3/policy.c:900:17: branch_true: ...to here
mdadm-4.3/policy.c:903:22: acquire_resource: opened here
mdadm-4.3/policy.c:905:20: branch_false: following ‘false’ branch...
mdadm-4.3/policy.c:911:13: branch_false: ...to here
mdadm-4.3/policy.c:911:12: branch_false: following ‘false’ branch...
mdadm-4.3/policy.c:916:13: branch_false: ...to here
mdadm-4.3/policy.c:919:9: throw: if ‘fsync’ throws an exception...
mdadm-4.3/policy.c:919:9: danger: ‘fd’ leaks here; was opened at [(4)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/3)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def102]
mdadm-4.3/policy.c:927:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
mdadm-4.3/policy.c:899:12: branch_true: following ‘true’ branch (when ‘rule_name’ is non-NULL)...
mdadm-4.3/policy.c:900:17: branch_true: ...to here
mdadm-4.3/policy.c:903:22: acquire_resource: opened here
mdadm-4.3/policy.c:905:20: branch_false: following ‘false’ branch...
mdadm-4.3/policy.c:911:13: branch_false: ...to here
mdadm-4.3/policy.c:911:12: branch_true: following ‘true’ branch...
mdadm-4.3/policy.c:913:17: branch_true: ...to here
mdadm-4.3/policy.c:926:12: branch_true: following ‘true’ branch (when ‘rule_name’ is non-NULL)...
mdadm-4.3/policy.c:927:17: branch_true: ...to here
mdadm-4.3/policy.c:927:17: throw: if ‘close’ throws an exception...
mdadm-4.3/policy.c:927:17: danger: ‘fd’ leaks here; was opened at [(4)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/3)
Error: GCC_ANALYZER_WARNING (CWE-465): [#def103]
mdadm-4.3/probe_roms.c:316:20: warning[-Wanalyzer-deref-before-check]: check of ‘res’ for NULL after already dereferencing it
mdadm-4.3/probe_roms.c:243:6: enter_function: entry to ‘probe_roms’
mdadm-4.3/probe_roms.c:251:12: branch_false: following ‘false’ branch...
mdadm-4.3/probe_roms.c:255:9: branch_false: ...to here
mdadm-4.3/probe_roms.c:292:16: branch_true: following ‘true’ branch (when ‘start < upper’)...
mdadm-4.3/probe_roms.c:293:23: call_function: inlined call to ‘isa_bus_to_virt’ from ‘probe_roms’
mdadm-4.3/probe_roms.c:294:22: call_function: inlined call to ‘romsignature’ from ‘probe_roms’
mdadm-4.3/probe_roms.c:313:59: call_function: calling ‘romchecksum’ from ‘probe_roms’
mdadm-4.3/probe_roms.c:313:59: return_function: returning to ‘probe_roms’ from ‘romchecksum’
mdadm-4.3/probe_roms.c:316:20: danger: pointer ‘res’ is checked for NULL here but it was already dereferenced at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def104]
mdadm-4.3/raid6check.c:566:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(argv[1], 0)’
mdadm-4.3/raid6check.c:551:12: branch_false: following ‘false’ branch (when ‘argc > 3’)...
mdadm-4.3/raid6check.c:558:16: branch_false: ...to here
mdadm-4.3/raid6check.c:558:16: acquire_resource: opened here
mdadm-4.3/raid6check.c:559:11: branch_false: following ‘false’ branch...
mdadm-4.3/raid6check.c:566:16: branch_false: ...to here
mdadm-4.3/raid6check.c:566:16: throw: if ‘sysfs_read’ throws an exception...
mdadm-4.3/raid6check.c:566:16: danger: ‘open(argv[1], 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def105]
mdadm-4.3/super-ddf.c:861:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
mdadm-4.3/super-ddf.c:3556:12: enter_function: entry to ‘load_container_ddf’
mdadm-4.3/super-ddf.c:3559:16: call_function: calling ‘load_super_ddf_all’ from ‘load_container_ddf’
Error: CPPCHECK_WARNING (CWE-457): [#def106]
mdadm-4.3/super-ddf.c:1604: warning[uninitvar]: Uninitialized variable: end
Error: CPPCHECK_WARNING (CWE-457): [#def107]
mdadm-4.3/super-ddf.c:1605: warning[uninitvar]: Uninitialized variable: vcnum
Error: CPPCHECK_WARNING (CWE-457): [#def108]
mdadm-4.3/super-intel.c:8348: error[legacyUninitvar]: Uninitialized variable: insync
Error: GCC_ANALYZER_WARNING (CWE-775): [#def109]
mdadm-4.3/super1.c:1320:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(devname, 0)’
mdadm-4.3/super1.c:1196:12: branch_false: following ‘false’ branch...
mdadm-4.3/super1.c:1211:9: branch_false: ...to here
mdadm-4.3/super1.c:1297:20: branch_false: following ‘false’ branch (when ‘max <= 1920’)...
mdadm-4.3/super1.c:1297:20: branch_false: ...to here
mdadm-4.3/super1.c:1304:20: branch_false: following ‘false’ branch...
mdadm-4.3/super1.c:1306:34: branch_false: ...to here
mdadm-4.3/super1.c:1310:20: branch_false: following ‘false’ branch (when ‘i <= max’)...
mdadm-4.3/super1.c:1313:29: branch_false: ...to here
mdadm-4.3/super1.c:1317:22: acquire_resource: opened here
mdadm-4.3/super1.c:1318:20: branch_true: following ‘true’ branch...
mdadm-4.3/super1.c:1320:25: branch_true: ...to here
mdadm-4.3/super1.c:1320:25: throw: if ‘get_dev_size’ throws an exception...
mdadm-4.3/super1.c:1320:25: danger: ‘open(devname, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def110]
mdadm-4.3/sysfs.c:51:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 0)’
mdadm-4.3/sysfs.c:47:18: acquire_resource: opened here
mdadm-4.3/sysfs.c:49:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:51:13: branch_false: ...to here
mdadm-4.3/sysfs.c:51:13: danger: ‘open(path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
mdadm-4.3/sysfs.c:286:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&fname)’
mdadm-4.3/sysfs.c:138:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:143:45: branch_false: ...to here
mdadm-4.3/sysfs.c:198:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:206:13: branch_false: ...to here
mdadm-4.3/sysfs.c:206:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:212:13: branch_false: ...to here
mdadm-4.3/sysfs.c:212:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:241:13: branch_false: ...to here
mdadm-4.3/sysfs.c:241:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:255:13: branch_false: ...to here
mdadm-4.3/sysfs.c:255:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:262:13: branch_false: ...to here
mdadm-4.3/sysfs.c:262:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:271:15: branch_false: ...to here
mdadm-4.3/sysfs.c:271:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:275:9: branch_false: ...to here
mdadm-4.3/sysfs.c:276:15: acquire_memory: allocated here
mdadm-4.3/sysfs.c:277:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:279:9: branch_false: ...to here
mdadm-4.3/sysfs.c:286:22: throw: if ‘readdir’ throws an exception...
mdadm-4.3/sysfs.c:286:22: danger: ‘opendir(&fname)’ leaks here; was allocated at [(17)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/16)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def112]
mdadm-4.3/sysfs.c:453:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 0)’
mdadm-4.3/sysfs.c:445:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:447:9: branch_false: ...to here
mdadm-4.3/sysfs.c:449:14: acquire_resource: opened here
mdadm-4.3/sysfs.c:450:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:452:13: branch_false: ...to here
mdadm-4.3/sysfs.c:453:9: danger: ‘open(&fname, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def113]
mdadm-4.3/sysfs.c:472:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 1)’
mdadm-4.3/sysfs.c:469:14: acquire_resource: opened here
mdadm-4.3/sysfs.c:470:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:472:13: branch_false: ...to here
mdadm-4.3/sysfs.c:472:13: throw: if ‘write’ throws an exception...
mdadm-4.3/sysfs.c:472:13: danger: ‘open(&fname, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def114]
mdadm-4.3/sysfs.c:473:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 1)’
mdadm-4.3/sysfs.c:469:14: acquire_resource: opened here
mdadm-4.3/sysfs.c:470:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:472:13: branch_false: ...to here
mdadm-4.3/sysfs.c:473:9: danger: ‘open(&fname, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def115]
mdadm-4.3/sysfs.c:509:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 1)’
mdadm-4.3/sysfs.c:506:14: acquire_resource: opened here
mdadm-4.3/sysfs.c:507:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:509:13: branch_false: ...to here
mdadm-4.3/sysfs.c:509:13: throw: if ‘write’ throws an exception...
mdadm-4.3/sysfs.c:509:13: danger: ‘open(&fname, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def116]
mdadm-4.3/sysfs.c:510:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 1)’
mdadm-4.3/sysfs.c:506:14: acquire_resource: opened here
mdadm-4.3/sysfs.c:507:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:509:13: branch_false: ...to here
mdadm-4.3/sysfs.c:510:9: danger: ‘open(&fname, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
mdadm-4.3/sysfs.c:825:19: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&path)’
mdadm-4.3/sysfs.c:815:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:818:9: branch_false: ...to here
mdadm-4.3/sysfs.c:821:15: acquire_memory: allocated here
mdadm-4.3/sysfs.c:822:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:825:19: branch_false: ...to here
mdadm-4.3/sysfs.c:825:19: throw: if ‘readdir’ throws an exception...
mdadm-4.3/sysfs.c:825:19: danger: ‘opendir(&path)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
mdadm-4.3/sysfs.c:867:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dirname)’
mdadm-4.3/sysfs.c:863:15: acquire_memory: allocated here
mdadm-4.3/sysfs.c:864:12: branch_false: following ‘false’ branch...
mdadm-4.3/sysfs.c:866:13: branch_false: ...to here
mdadm-4.3/sysfs.c:867:22: throw: if ‘readdir’ throws an exception...
mdadm-4.3/sysfs.c:867:22: danger: ‘opendir(&dirname)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def119]
mdadm-4.3/util.c:955:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
mdadm-4.3/util.c:951:14: acquire_resource: opened here
mdadm-4.3/util.c:952:12: branch_true: following ‘true’ branch...
mdadm-4.3/util.c:954:25: branch_true: ...to here
mdadm-4.3/util.c:955:17: danger: ‘open(&path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def120]
mdadm-4.3/util.c:1056:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dev_open(&buf, 0)’
mdadm-4.3/util.c:1582:5: enter_function: entry to ‘open_container’
mdadm-4.3/util.c:1596:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1599:46: branch_false: ...to here
mdadm-4.3/util.c:1603:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1603:12: branch_false: ...to here
mdadm-4.3/util.c:1605:16: branch_true: following ‘true’ branch...
mdadm-4.3/util.c:1606:21: branch_true: ...to here
mdadm-4.3/util.c:1636:23: call_function: calling ‘dev_open’ from ‘open_container’
mdadm-4.3/util.c:1636:23: return_function: returning to ‘open_container’ from ‘dev_open’
mdadm-4.3/util.c:1638:25: throw: if ‘closedir’ throws an exception...
mdadm-4.3/util.c:1056:9: danger: ‘dev_open(&buf, 0)’ leaks here; was opened at [(12)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/11)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
mdadm-4.3/util.c:1605:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&path)’
mdadm-4.3/util.c:1596:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1599:46: branch_false: ...to here
mdadm-4.3/util.c:1602:15: acquire_memory: allocated here
mdadm-4.3/util.c:1603:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1603:12: branch_false: ...to here
mdadm-4.3/util.c:1605:22: throw: if ‘readdir’ throws an exception...
mdadm-4.3/util.c:1605:22: danger: ‘opendir(&path)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def122]
mdadm-4.3/util.c:1616:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
mdadm-4.3/util.c:1596:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1599:46: branch_false: ...to here
mdadm-4.3/util.c:1603:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1603:12: branch_false: ...to here
mdadm-4.3/util.c:1605:16: branch_true: following ‘true’ branch...
mdadm-4.3/util.c:1606:21: branch_true: ...to here
mdadm-4.3/util.c:1608:20: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1611:55: branch_false: ...to here
mdadm-4.3/util.c:1612:23: acquire_resource: opened here
mdadm-4.3/util.c:1613:20: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1615:21: branch_false: ...to here
mdadm-4.3/util.c:1616:17: danger: ‘open(&path, 0)’ leaks here; was opened at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
mdadm-4.3/util.c:1629:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&path, 0)’
mdadm-4.3/util.c:1596:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1599:46: branch_false: ...to here
mdadm-4.3/util.c:1603:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1603:12: branch_false: ...to here
mdadm-4.3/util.c:1605:16: branch_true: following ‘true’ branch...
mdadm-4.3/util.c:1606:21: branch_true: ...to here
mdadm-4.3/util.c:1608:20: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1611:55: branch_false: ...to here
mdadm-4.3/util.c:1613:20: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1615:21: branch_false: ...to here
mdadm-4.3/util.c:1617:20: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1619:17: branch_false: ...to here
mdadm-4.3/util.c:1620:20: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1620:21: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1624:17: branch_false: ...to here
mdadm-4.3/util.c:1625:23: acquire_resource: opened here
mdadm-4.3/util.c:1626:20: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1628:21: branch_false: ...to here
mdadm-4.3/util.c:1629:17: danger: ‘open(&path, 0)’ leaks here; was opened at [(17)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/16)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def124]
mdadm-4.3/util.c:1743:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(dev, 130)’
mdadm-4.3/util.c:1735:14: acquire_resource: opened here
mdadm-4.3/util.c:1736:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:1743:18: branch_false: ...to here
mdadm-4.3/util.c:1743:18: throw: if ‘fd2devnm’ throws an exception...
mdadm-4.3/util.c:1743:18: danger: ‘open(dev, 130)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
mdadm-4.3/util.c:2017:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
mdadm-4.3/util.c:2015:19: acquire_resource: opened here
mdadm-4.3/util.c:2016:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:2016:24: branch_false: ...to here
mdadm-4.3/util.c:2016:13: branch_true: following ‘true’ branch...
mdadm-4.3/util.c:2017:22: branch_true: ...to here
mdadm-4.3/util.c:2018:12: branch_true: following ‘true’ branch...
mdadm-4.3/util.c:2019:17: branch_true: ...to here
mdadm-4.3/util.c:2017:17: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def126]
mdadm-4.3/util.c:2019:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
mdadm-4.3/util.c:2015:19: acquire_resource: opened here
mdadm-4.3/util.c:2016:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:2018:12: branch_true: following ‘true’ branch...
mdadm-4.3/util.c:2019:17: branch_true: ...to here
mdadm-4.3/util.c:2019:17: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
mdadm-4.3/util.c:2032:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
mdadm-4.3/util.c:2028:14: acquire_resource: opened here
mdadm-4.3/util.c:2029:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:2031:15: branch_false: ...to here
mdadm-4.3/util.c:2032:9: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def128]
mdadm-4.3/util.c:2211:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
Error: GCC_ANALYZER_WARNING (CWE-910): [#def129]
mdadm-4.3/util.c:2214:9: warning[-Wanalyzer-fd-use-after-close]: ‘dup2’ on closed file descriptor ‘0’
mdadm-4.3/util.c:2210:9: release_resource: closed here
mdadm-4.3/util.c:2214:9: danger: ‘dup2’ on closed file descriptor ‘0’; ‘close’ was at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-910): [#def130]
mdadm-4.3/util.c:2215:9: warning[-Wanalyzer-fd-use-after-close]: ‘dup2’ on closed file descriptor ‘0’
mdadm-4.3/util.c:2210:9: release_resource: closed here
mdadm-4.3/util.c:2215:9: danger: ‘dup2’ on closed file descriptor ‘0’; ‘close’ was at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
mdadm-4.3/util.c:2226:23: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc/self/fd")’
mdadm-4.3/util.c:2221:15: acquire_memory: allocated here
mdadm-4.3/util.c:2222:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:2226:23: branch_false: ...to here
mdadm-4.3/util.c:2226:23: throw: if ‘readdir’ throws an exception...
mdadm-4.3/util.c:2226:23: danger: ‘opendir("/proc/self/fd")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def132]
mdadm-4.3/util.c:2390:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/zero", 0)’
mdadm-4.3/util.c:2384:19: acquire_resource: opened here
mdadm-4.3/util.c:2385:12: branch_false: following ‘false’ branch...
mdadm-4.3/util.c:2390:25: branch_false: ...to here
mdadm-4.3/util.c:2390:12: branch_true: following ‘true’ branch...
mdadm-4.3/util.c:2391:24: branch_true: ...to here
mdadm-4.3/util.c:2390:25: danger: ‘open("/dev/zero", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
Scan Properties
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-225.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | mdadm-4.3-9.fc44 |
| store-results-to | /tmp/tmpckcnfvzc/mdadm-4.3-9.fc44.tar.xz |
| time-created | 2026-01-08 19:33:25 |
| time-finished | 2026-01-08 19:35:15 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpckcnfvzc/mdadm-4.3-9.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpckcnfvzc/mdadm-4.3-9.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |