Newly introduced findings

List of Findings

Error: CPPCHECK_WARNING (CWE-457): [#def1]
systemd-259/src/analyze/analyze-dlopen-metadata.c:53: error[uninitvar]: Uninitialized variable: z
#   51|                   _cleanup_strv_free_ char **sonames = NULL;
#   52|   
#   53|->                 r = sd_json_variant_strv(sd_json_variant_by_key(z, "soname"), &sonames);
#   54|                   if (r < 0)
#   55|                           return log_error_errno(r, "Failed to extract sonames from dlopen metadata: %m");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*__unique_prefix_i14, "re")’
systemd-259/src/resolve/resolved-dns-trust-anchor.c:436:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:437:9: branch_false: ...to here
systemd-259/src/resolve/resolved-dns-trust-anchor.c:437:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:438:9: branch_false: ...to here
systemd-259/src/resolve/resolved-dns-trust-anchor.c:438:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:440:13: branch_false: ...to here
systemd-259/src/resolve/resolved-dns-trust-anchor.c:441:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:444:9: branch_false: ...to here
systemd-259/src/resolve/resolved-dns-trust-anchor.c:444:9: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:448:21: acquire_resource: opened here
systemd-259/src/resolve/resolved-dns-trust-anchor.c:460:29: throw: if ‘read_stripped_line’ throws an exception...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:458:46: call_function: inlined call to ‘freep’ from ‘dns_trust_anchor_load_files’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*__unique_prefix_i21, "re")’
systemd-259/src/shared/mount-setup.c:407:12: enter_function: entry to ‘relabel_extra’
systemd-259/src/shared/mount-setup.c:422:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/mount-setup.c:425:9: branch_false: ...to here
systemd-259/src/shared/mount-setup.c:425:9: branch_true: following ‘true’ branch...
systemd-259/src/shared/mount-setup.c:428:21: acquire_resource: opened here
systemd-259/src/shared/mount-setup.c:437:29: call_function: inlined call to ‘read_line’ from ‘relabel_extra’
systemd-259/src/shared/mount-setup.c:435:46: call_function: inlined call to ‘freep’ from ‘relabel_extra’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(format_proc_fd_path(&<Uabe0>,  fd), "re")’
systemd-259/src/shared/hwdb-util.c:472:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hwdb-util.c:473:9: branch_false: ...to here
systemd-259/src/shared/hwdb-util.c:473:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hwdb-util.c:474:9: branch_false: ...to here
systemd-259/src/shared/hwdb-util.c:474:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hwdb-util.c:476:19: branch_false: ...to here
systemd-259/src/shared/hwdb-util.c:476:13: acquire_resource: opened here
systemd-259/src/shared/hwdb-util.c:477:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hwdb-util.c:477:12: branch_false: ...to here
systemd-259/src/shared/hwdb-util.c:485:21: throw: if ‘read_line_full’ throws an exception...
systemd-259/src/shared/hwdb-util.c:481:38: call_function: inlined call to ‘freep’ from ‘import_file’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(format_proc_fd_path(&<Ub5f0>, *c.fd), "re")’
systemd-259/src/shared/pretty-print.c:422:5: enter_function: entry to ‘conf_files_cat’
systemd-259/src/shared/pretty-print.c:429:13: call_function: calling ‘guess_type’ from ‘conf_files_cat’
systemd-259/src/shared/pretty-print.c:429:13: return_function: returning to ‘conf_files_cat’ from ‘guess_type’
systemd-259/src/shared/pretty-print.c:430:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:432:9: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:432:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:433:9: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:433:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:433:9: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:435:9: branch_true: following ‘true’ branch...
systemd-259/src/shared/pretty-print.c:436:17: branch_true: ...to here
systemd-259/src/shared/pretty-print.c:436:17: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:437:21: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:437:21: branch_true: following ‘true’ branch...
systemd-259/src/shared/pretty-print.c:437:21: branch_true: ...to here
systemd-259/src/shared/pretty-print.c:439:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:435:9: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:435:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:443:13: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:455:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/pretty-print.c:473:20: branch_true: ...to here
systemd-259/src/shared/pretty-print.c:477:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:481:12: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:481:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/pretty-print.c:482:17: branch_true: ...to here
systemd-259/src/shared/pretty-print.c:484:16: call_function: calling ‘cat_files_full’ from ‘conf_files_cat’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(333, 8)’
systemd-259/src/test/test-varlink.c:211:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink.c:213:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink.c:216:9: branch_false: ...to here
systemd-259/src/test/test-varlink.c:216:9: acquire_memory: allocated here
systemd-259/src/test/test-varlink.c:216:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink.c:216:9: branch_false: ...to here
systemd-259/src/test/test-varlink.c:217:21: branch_true: following ‘true’ branch (when ‘k != 333’)...
systemd-259/src/test/test-varlink.c:218:38: branch_true: ...to here
systemd-259/src/test/test-varlink.c:219:17: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink.c:219:17: branch_true: ...to here
systemd-259/src/test/test-varlink.c:219:17: throw: if ‘log_internal’ throws an exception...
systemd-259/src/test/test-varlink.c:218:38: call_function: inlined call to ‘freep’ from ‘flood_test’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*__unique_prefix_i14, "re")’
systemd-259/src/resolve/resolved-dns-trust-anchor.c:436:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:437:9: branch_false: ...to here
systemd-259/src/resolve/resolved-dns-trust-anchor.c:437:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:438:9: branch_false: ...to here
systemd-259/src/resolve/resolved-dns-trust-anchor.c:438:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:440:13: branch_false: ...to here
systemd-259/src/resolve/resolved-dns-trust-anchor.c:441:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:444:9: branch_false: ...to here
systemd-259/src/resolve/resolved-dns-trust-anchor.c:444:9: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:448:21: acquire_memory: allocated here
systemd-259/src/resolve/resolved-dns-trust-anchor.c:460:29: throw: if ‘read_stripped_line’ throws an exception...
systemd-259/src/resolve/resolved-dns-trust-anchor.c:458:46: call_function: inlined call to ‘freep’ from ‘dns_trust_anchor_load_files’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*__unique_prefix_i21, "re")’
systemd-259/src/shared/mount-setup.c:407:12: enter_function: entry to ‘relabel_extra’
systemd-259/src/shared/mount-setup.c:422:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/mount-setup.c:425:9: branch_false: ...to here
systemd-259/src/shared/mount-setup.c:425:9: branch_true: following ‘true’ branch...
systemd-259/src/shared/mount-setup.c:428:21: acquire_memory: allocated here
systemd-259/src/shared/mount-setup.c:437:29: call_function: inlined call to ‘read_line’ from ‘relabel_extra’
systemd-259/src/shared/mount-setup.c:435:46: call_function: inlined call to ‘freep’ from ‘relabel_extra’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(format_proc_fd_path(&<Uabe0>,  fd), "re")’
systemd-259/src/shared/hwdb-util.c:472:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hwdb-util.c:473:9: branch_false: ...to here
systemd-259/src/shared/hwdb-util.c:473:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hwdb-util.c:474:9: branch_false: ...to here
systemd-259/src/shared/hwdb-util.c:474:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hwdb-util.c:476:19: branch_false: ...to here
systemd-259/src/shared/hwdb-util.c:476:13: acquire_memory: allocated here
systemd-259/src/shared/hwdb-util.c:477:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hwdb-util.c:477:12: branch_false: ...to here
systemd-259/src/shared/hwdb-util.c:485:21: throw: if ‘read_line_full’ throws an exception...
systemd-259/src/shared/hwdb-util.c:481:38: call_function: inlined call to ‘freep’ from ‘import_file’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(format_proc_fd_path(&<Ub5f0>, *c.fd), "re")’
systemd-259/src/shared/pretty-print.c:422:5: enter_function: entry to ‘conf_files_cat’
systemd-259/src/shared/pretty-print.c:429:13: call_function: calling ‘guess_type’ from ‘conf_files_cat’
systemd-259/src/shared/pretty-print.c:429:13: return_function: returning to ‘conf_files_cat’ from ‘guess_type’
systemd-259/src/shared/pretty-print.c:430:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:432:9: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:432:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:433:9: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:433:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:433:9: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:435:9: branch_true: following ‘true’ branch...
systemd-259/src/shared/pretty-print.c:436:17: branch_true: ...to here
systemd-259/src/shared/pretty-print.c:436:17: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:437:21: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:437:21: branch_true: following ‘true’ branch...
systemd-259/src/shared/pretty-print.c:437:21: branch_true: ...to here
systemd-259/src/shared/pretty-print.c:439:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:435:9: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:435:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:443:13: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:455:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/pretty-print.c:473:20: branch_true: ...to here
systemd-259/src/shared/pretty-print.c:477:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/pretty-print.c:481:12: branch_false: ...to here
systemd-259/src/shared/pretty-print.c:481:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/pretty-print.c:482:17: branch_true: ...to here
systemd-259/src/shared/pretty-print.c:484:16: call_function: calling ‘cat_files_full’ from ‘conf_files_cat’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def11]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘field’
systemd-259/src/coredump/coredump-submit.c:603:9: branch_true: following ‘true’ branch...
systemd-259/src/coredump/coredump-submit.c:603:9: branch_true: ...to here
systemd-259/src/coredump/coredump-submit.c:603:9: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/coredump/coredump-submit.c:600:30: call_function: inlined call to ‘freep’ from ‘allocate_journal_field’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def12]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fmt’
systemd-259/src/test/test-printf.c:26:1: enter_function: entry to ‘test_parse_printf_format’
systemd-259/src/test/test-printf.c:65:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-printf.c:68:17: branch_true: ...to here
systemd-259/src/test/test-printf.c:68:17: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
systemd-259/src/test/test-printf.c:69:25: branch_true: ...to here
systemd-259/src/test/test-printf.c:69:25: branch_false: following ‘false’ branch...
systemd-259/src/test/test-printf.c:70:62: branch_false: ...to here
systemd-259/src/test/test-printf.c:70:25: call_function: calling ‘test_parse_printf_format_one’ from ‘test_parse_printf_format’
systemd-259/src/test/test-printf.c:66:38: call_function: inlined call to ‘freep’ from ‘test_parse_printf_format’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def13]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘joined_ssv’
systemd-259/src/test/test-secure-bits.c:17:1: enter_function: entry to ‘test_secure_bits_basic’
systemd-259/src/test/test-secure-bits.c:24:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-secure-bits.c:25:38: branch_true: ...to here
systemd-259/src/test/test-secure-bits.c:29:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:30:17: call_function: inlined call to ‘secure_bits_is_valid’ from ‘test_secure_bits_basic’
systemd-259/src/test/test-secure-bits.c:30:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:32:17: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:32:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:33:17: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:34:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:36:17: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:36:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:37:17: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:37:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:38:17: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:38:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:26:44: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:26:44: call_function: calling ‘strv_freep’ from ‘test_secure_bits_basic’
systemd-259/src/test/test-secure-bits.c:26:44: return_function: returning to ‘test_secure_bits_basic’ from ‘strv_freep’
systemd-259/src/test/test-secure-bits.c:29:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:30:17: call_function: inlined call to ‘secure_bits_is_valid’ from ‘test_secure_bits_basic’
systemd-259/src/test/test-secure-bits.c:30:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:32:17: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:32:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:33:17: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:34:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:36:17: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:36:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:37:17: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:37:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:38:17: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:38:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-secure-bits.c:26:44: branch_false: ...to here
systemd-259/src/test/test-secure-bits.c:26:44: call_function: calling ‘strv_freep’ from ‘test_secure_bits_basic’
systemd-259/src/test/test-secure-bits.c:26:44: return_function: returning to ‘test_secure_bits_basic’ from ‘strv_freep’
systemd-259/src/test/test-secure-bits.c:42:18: call_function: inlined call to ‘strv_join’ from ‘test_secure_bits_basic’
systemd-259/src/test/test-secure-bits.c:19:36: call_function: calling ‘strv_freep’ from ‘test_secure_bits_basic’
systemd-259/src/test/test-secure-bits.c:19:36: return_function: returning to ‘test_secure_bits_basic’ from ‘strv_freep’
systemd-259/src/test/test-secure-bits.c:18:59: call_function: inlined call to ‘freep’ from ‘test_secure_bits_basic’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def14]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘keep’
systemd-259/src/test/test-fd-util.c:267:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:267:9: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:267:9: throw: if ‘log_internal’ throws an exception...
systemd-259/src/test/test-fd-util.c:263:42: call_function: inlined call to ‘freep’ from ‘test_close_all_fds_inner’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def15]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘name_link’
systemd-259/src/sysupdate/updatectl.c:1293:12: enter_function: entry to ‘list_features’
systemd-259/src/sysupdate/updatectl.c:1300:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1302:17: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1303:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1307:49: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1315:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1318:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1319:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1322:9: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1322:9: branch_true: following ‘true’ branch...
systemd-259/src/sysupdate/updatectl.c:1326:21: call_function: calling ‘describe_feature’ from ‘list_features’
systemd-259/src/sysupdate/updatectl.c:1324:38: call_function: inlined call to ‘freep’ from ‘list_features’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def16]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘nc’
systemd-259/src/mute-console/mute-console.c:267:12: enter_function: entry to ‘vl_method_mute’
systemd-259/src/mute-console/mute-console.c:275:9: branch_false: following ‘false’ branch...
systemd-259/src/mute-console/mute-console.c:277:38: call_function: inlined call to ‘malloc_multiply’ from ‘vl_method_mute’
systemd-259/src/mute-console/mute-console.c:278:12: branch_false: following ‘false’ branch...
systemd-259/src/mute-console/mute-console.c:281:9: branch_false: ...to here
systemd-259/src/mute-console/mute-console.c:293:13: throw: if ‘sd_varlink_dispatch’ throws an exception...
systemd-259/src/mute-console/mute-console.c:277:33: call_function: inlined call to ‘freep’ from ‘vl_method_mute’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def17]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘original_short’
systemd-259/src/test/test-hostname-setup.c:138:1: enter_function: entry to ‘test_pidref_gethostname_full’
systemd-259/src/test/test-hostname-setup.c:141:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-hostname-setup.c:145:9: branch_false: ...to here
systemd-259/src/test/test-hostname-setup.c:145:9: call_function: calling ‘gethostname_malloc’ from ‘test_pidref_gethostname_full’
systemd-259/src/test/test-hostname-setup.c:144:48: call_function: inlined call to ‘freep’ from ‘test_pidref_gethostname_full’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def18]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘patterns’
systemd-259/src/sysupdate/sysupdate-transfer.c:742:5: enter_function: entry to ‘transfer_vacuum’
systemd-259/src/sysupdate/sysupdate-transfer.c:750:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/sysupdate-transfer.c:752:9: branch_false: ...to here
systemd-259/src/sysupdate/sysupdate-transfer.c:752:9: call_function: calling ‘transfer_remove_temporary’ from ‘transfer_vacuum’
systemd-259/src/sysupdate/sysupdate-transfer.c:752:9: return_function: returning to ‘transfer_vacuum’ from ‘transfer_remove_temporary’
systemd-259/src/sysupdate/sysupdate-transfer.c:757:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/sysupdate-transfer.c:758:12: branch_false: ...to here
systemd-259/src/sysupdate/sysupdate-transfer.c:771:12: branch_true: following ‘true’ branch...
systemd-259/src/sysupdate/sysupdate-transfer.c:775:28: call_function: inlined call to ‘strv_join’ from ‘transfer_vacuum’
systemd-259/src/sysupdate/sysupdate-transfer.c:772:38: call_function: inlined call to ‘freep’ from ‘transfer_vacuum’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def19]
systemd-259/src/basic/alloc-util.h:79:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘target’
systemd-259/src/sysupdate/updatectl.c:1399:23: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1404:18: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1425:12: branch_true: following ‘true’ branch...
systemd-259/src/sysupdate/updatectl.c:1428:12: branch_true: ...to here
systemd-259/src/sysupdate/updatectl.c:1428:12: branch_true: following ‘true’ branch (when the strings are equal)...
systemd-259/src/sysupdate/updatectl.c:1429:59: branch_true: ...to here
systemd-259/src/sysupdate/updatectl.c:1438:21: throw: if ‘sd_bus_call_method’ throws an exception...
systemd-259/src/sysupdate/updatectl.c:1431:38: call_function: inlined call to ‘freep’ from ‘verb_enable’
#   77|   
#   78|   static inline void freep(void *p) {
#   79|->         *(void**)p = mfree(*(void**) p);
#   80|   }
#   81|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
systemd-259/src/basic/alloc-util.h:85:16: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc_multiply(min(__unique_prefix_A13,  console_width) * 4 + 1, 1)’
systemd-259/src/basic/escape.c:365:7: enter_function: entry to ‘xescape_full’
systemd-259/src/basic/escape.c:381:15: call_function: calling ‘malloc_multiply’ from ‘xescape_full’
systemd-259/src/basic/escape.c:381:15: return_function: returning to ‘xescape_full’ from ‘malloc_multiply’
systemd-259/src/basic/escape.c:382:12: branch_false: following ‘false’ branch...
systemd-259/src/basic/escape.c:385:26: branch_false: ...to here
systemd-259/src/basic/escape.c:393:20: branch_false: following ‘false’ branch...
systemd-259/src/basic/escape.c:401:37: branch_false: ...to here
systemd-259/src/basic/escape.c:404:28: branch_false: following ‘false’ branch...
systemd-259/src/basic/escape.c:407:25: branch_false: ...to here
systemd-259/src/basic/escape.c:393:20: branch_false: following ‘false’ branch...
systemd-259/src/basic/escape.c:401:37: branch_false: ...to here
systemd-259/src/basic/escape.c:404:28: branch_false: following ‘false’ branch...
systemd-259/src/basic/escape.c:407:25: branch_false: ...to here
systemd-259/src/basic/escape.c:393:20: branch_false: following ‘false’ branch...
systemd-259/src/basic/escape.c:401:37: branch_false: ...to here
systemd-259/src/basic/escape.c:404:28: branch_false: following ‘false’ branch...
systemd-259/src/basic/escape.c:407:25: branch_false: ...to here
systemd-259/src/basic/escape.c:394:28: branch_true: following ‘true’ branch...
systemd-259/src/basic/escape.c:424:20: branch_true: ...to here
systemd-259/src/basic/alloc-util.h:89:13: call_function: inlined call to ‘size_multiply_overflow’ from ‘malloc_multiply’
#   83|   
#   84|   static inline bool size_multiply_overflow(size_t size, size_t need) {
#   85|->         return _unlikely_(need != 0 && size > (SIZE_MAX / need));
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
systemd-259/src/basic/alloc-util.h:85:16: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc_multiply(min(__unique_prefix_A24, 5000), 4)’
systemd-259/src/test/test-fd-util.c:262:13: enter_function: entry to ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:272:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:274:12: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:288:9: call_function: calling ‘malloc_multiply’ from ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:288:9: return_function: returning to ‘test_close_all_fds_inner’ from ‘malloc_multiply’
systemd-259/src/test/test-fd-util.c:288:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:288:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:289:28: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:290:17: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:290:17: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:290:17: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:290:17: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/basic/alloc-util.h:89:13: call_function: inlined call to ‘size_multiply_overflow’ from ‘malloc_multiply’
#   83|   
#   84|   static inline bool size_multiply_overflow(size_t size, size_t need) {
#   85|->         return _unlikely_(need != 0 && size > (SIZE_MAX / need));
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
systemd-259/src/basic/alloc-util.h:85:16: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc_multiply(n_keep, 4)’
systemd-259/src/test/test-fd-util.c:262:13: enter_function: entry to ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:272:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:274:12: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:288:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:288:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:289:28: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:293:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:293:9: call_function: calling ‘validate_fds’ from ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:293:9: return_function: returning to ‘test_close_all_fds_inner’ from ‘validate_fds’
systemd-259/src/test/test-fd-util.c:293:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:296:19: call_function: inlined call to ‘random_u64’ from ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:299:9: call_function: calling ‘malloc_multiply’ from ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:299:9: return_function: returning to ‘test_close_all_fds_inner’ from ‘malloc_multiply’
systemd-259/src/test/test-fd-util.c:299:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:299:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:300:28: branch_true: following ‘true’ branch (when ‘k < n_keep’)...
systemd-259/src/test/test-fd-util.c:300:28: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:304:29: call_function: inlined call to ‘random_u64’ from ‘test_close_all_fds_inner’
systemd-259/src/basic/alloc-util.h:89:13: call_function: inlined call to ‘size_multiply_overflow’ from ‘malloc_multiply’
#   83|   
#   84|   static inline bool size_multiply_overflow(size_t size, size_t need) {
#   85|->         return _unlikely_(need != 0 && size > (SIZE_MAX / need));
#   86|   }
#   87|   

Error: COMPILER_WARNING (CWE-457): [#def23]
systemd-259/src/basic/capability-util.c: scope_hint: In function ‘cap_last_cap’
systemd-259/src/basic/capability-util.c:73:11: warning[-Wuninitialized]: ‘D.10410’ is used uninitialized
#   73 |         c = saved;
#      |         ~~^~~~~~~
systemd-259/src/basic/capability-util.c:73:9: note: ‘D.10410’ was declared here
#   73 |         c = saved;
#      |         ^
#   71|           int r, c;
#   72|   
#   73|->         c = saved;
#   74|           if (c != INT_MAX)
#   75|                   return c;

Error: CPPCHECK_WARNING (CWE-909): [#def24]
systemd-259/src/basic/capability-util.c:475: error[uninitStructMember]: Uninitialized struct member: c.ambient
#  473|                           if (q->bounding != CAP_MASK_UNSET &&
#  474|                               (!BIT_SET(c.effective, CAP_SETPCAP) || !BIT_SET(c.permitted, CAP_SETPCAP))) {
#  475|->                                 CapabilityQuintet tmp = c;
#  476|   
#  477|                                   SET_BIT(c.effective, CAP_SETPCAP);

Error: CPPCHECK_WARNING (CWE-909): [#def25]
systemd-259/src/basic/capability-util.c:475: error[uninitStructMember]: Uninitialized struct member: c.bounding
#  473|                           if (q->bounding != CAP_MASK_UNSET &&
#  474|                               (!BIT_SET(c.effective, CAP_SETPCAP) || !BIT_SET(c.permitted, CAP_SETPCAP))) {
#  475|->                                 CapabilityQuintet tmp = c;
#  476|   
#  477|                                   SET_BIT(c.effective, CAP_SETPCAP);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
systemd-259/src/basic/compress.c:1060:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(524288)’
systemd-259/src/basic/compress.c:1043:12: branch_false: following ‘false’ branch...
systemd-259/src/basic/compress.c:1046:13: branch_false: ...to here
systemd-259/src/basic/compress.c:1047:12: branch_false: following ‘false’ branch...
systemd-259/src/basic/compress.c:1050:13: branch_false: ...to here
systemd-259/src/basic/compress.c:1050:12: branch_false: following ‘false’ branch...
systemd-259/src/basic/compress.c:1056:15: branch_false: ...to here
systemd-259/src/basic/compress.c:1056:15: acquire_memory: allocated here
systemd-259/src/basic/compress.c:1057:12: branch_false: following ‘false’ branch...
systemd-259/src/basic/compress.c:1060:26: branch_false: ...to here
systemd-259/src/basic/compress.c:1061:12: branch_false: following ‘false’ branch (when ‘src != 18446744073709551615’)...
systemd-259/src/basic/compress.c:1061:12: branch_false: ...to here
systemd-259/src/basic/compress.c:1064:16: branch_false: following ‘false’ branch...
systemd-259/src/basic/compress.c:1088:12: branch_false: ...to here
systemd-259/src/basic/compress.c:1088:12: branch_true: following ‘true’ branch (when ‘total_in == 0’)...
systemd-259/src/basic/compress.c:1089:17: branch_true: ...to here
systemd-259/src/basic/compress.c:1089:17: branch_true: following ‘true’ branch...
systemd-259/src/basic/compress.c:1089:17: branch_true: ...to here
systemd-259/src/basic/compress.c:1089:17: throw: if ‘log_internal’ throws an exception...
systemd-259/src/basic/compress.c:1060:26: danger: ‘malloc(524288)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
# 1058|                   return -ENOMEM;
# 1059|   
# 1060|->         src = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fdf, 0);
# 1061|           if (src == MAP_FAILED)
# 1062|                   return -errno;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
systemd-259/src/basic/conf-files.c:476:29: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(add, (long unsigned int)(endswith_internal(add,  suffix) - add))’
systemd-259/src/basic/conf-files.c:723:5: enter_function: entry to ‘conf_files_list_nulstr_at’
systemd-259/src/basic/conf-files.c:726:9: branch_false: following ‘false’ branch...
systemd-259/src/basic/conf-files.c:728:13: branch_false: ...to here
systemd-259/src/basic/conf-files.c:729:12: branch_false: following ‘false’ branch...
systemd-259/src/basic/conf-files.c:732:16: branch_false: ...to here
systemd-259/src/basic/conf-files.c:732:16: call_function: calling ‘conf_files_list_strv_at’ from ‘conf_files_list_nulstr_at’
#  474|                                   return log_oom_debug();
#  475|   
#  476|->                         r = strv_consume_with_size(&results, &n_results, TAKE_PTR(n));
#  477|                   } else
#  478|                           r = strv_extend_with_size(&results, &n_results, add);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
systemd-259/src/basic/escape.c:556:9: warning[-Wanalyzer-malloc-leak]: leak of ‘shell_maybe_quote(*__unique_prefix_i21,  flags)’
systemd-259/src/basic/escape.c:601:7: enter_function: entry to ‘quote_command_line’
systemd-259/src/basic/escape.c:604:9: branch_false: following ‘false’ branch...
systemd-259/src/basic/escape.c:604:9: branch_false: ...to here
systemd-259/src/basic/escape.c:606:9: branch_true: following ‘true’ branch...
systemd-259/src/basic/escape.c:609:21: branch_true: ...to here
systemd-259/src/basic/escape.c:609:21: call_function: calling ‘shell_maybe_quote’ from ‘quote_command_line’
systemd-259/src/basic/escape.c:609:21: return_function: returning to ‘quote_command_line’ from ‘shell_maybe_quote’
systemd-259/src/basic/escape.c:610:20: branch_false: following ‘false’ branch...
systemd-259/src/basic/escape.c:613:22: branch_false: ...to here
systemd-259/src/basic/escape.c:613:22: throw: if ‘strextend_with_separator_internal’ throws an exception...
systemd-259/src/basic/escape.c:556:9: danger: ‘shell_maybe_quote(*__unique_prefix_i21,  flags)’ leaks here; was allocated at [(15)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/14)
#  554|           char *buf, *t;
#  555|   
#  556|->         assert(s);
#  557|   
#  558|           /* Encloses a string in quotes if necessary to make it OK as a shell string. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc", 2818048)’
systemd-259/src/test/test-fd-util.c:747:1: enter_function: entry to ‘test_fds_are_same_mount’
systemd-259/src/test/test-fd-util.c:752:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:755:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:755:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:758:12: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:748:71: call_function: inlined call to ‘closep’ from ‘test_fds_are_same_mount’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(argv[1], 526592)’
systemd-259/src/test/test-reread-partition-table-manual.c:14:12: branch_false: following ‘false’ branch (when ‘argc == 2’)...
systemd-259/src/test/test-reread-partition-table-manual.c:17:34: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table-manual.c:17:34: acquire_resource: opened here
systemd-259/src/test/test-reread-partition-table-manual.c:18:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table-manual.c:21:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table-manual.c:21:13: throw: if ‘reread_partition_table_fd’ throws an exception...
systemd-259/src/test/test-reread-partition-table-manual.c:17:29: call_function: inlined call to ‘closep’ from ‘run’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(argv[2], 589824)’
systemd-259/src/import/test-tar-extract.c:14:12: branch_false: following ‘false’ branch (when ‘argc == 3’)...
systemd-259/src/import/test-tar-extract.c:18:13: branch_false: ...to here
systemd-259/src/import/test-tar-extract.c:19:12: branch_false: following ‘false’ branch...
systemd-259/src/import/test-tar-extract.c:22:40: branch_false: ...to here
systemd-259/src/import/test-tar-extract.c:23:12: branch_false: following ‘false’ branch...
systemd-259/src/import/test-tar-extract.c:26:41: branch_false: ...to here
systemd-259/src/import/test-tar-extract.c:26:41: acquire_resource: opened here
systemd-259/src/import/test-tar-extract.c:27:12: branch_false: following ‘false’ branch...
systemd-259/src/import/test-tar-extract.c:30:13: branch_false: ...to here
systemd-259/src/import/test-tar-extract.c:30:13: throw: if ‘tar_x’ throws an exception...
systemd-259/src/import/test-tar-extract.c:26:29: call_function: inlined call to ‘closep’ from ‘run’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(pool, 589824)’
systemd-259/src/shared/discover-image.c:1949:5: enter_function: entry to ‘image_get_pool_limit’
systemd-259/src/shared/discover-image.c:1952:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/discover-image.c:1953:9: branch_false: ...to here
systemd-259/src/shared/discover-image.c:1953:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/discover-image.c:1954:9: branch_false: ...to here
systemd-259/src/shared/discover-image.c:1954:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/discover-image.c:1956:30: branch_false: ...to here
systemd-259/src/shared/discover-image.c:1957:13: call_function: calling ‘get_pool_directory’ from ‘image_get_pool_limit’
systemd-259/src/shared/discover-image.c:1957:13: return_function: returning to ‘image_get_pool_limit’ from ‘get_pool_directory’
systemd-259/src/shared/discover-image.c:1958:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/discover-image.c:1961:34: branch_false: ...to here
systemd-259/src/shared/discover-image.c:1961:34: acquire_resource: opened here
systemd-259/src/shared/discover-image.c:1962:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/discover-image.c:1965:24: branch_false: ...to here
systemd-259/src/shared/discover-image.c:1966:13: throw: if ‘btrfs_subvol_get_subtree_quota_fd’ throws an exception...
systemd-259/src/shared/discover-image.c:1961:29: call_function: inlined call to ‘closep’ from ‘image_get_pool_limit’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def33]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘a’
systemd-259/src/test/test-fd-util.c:67:1: enter_function: entry to ‘test_same_fd’
systemd-259/src/test/test-fd-util.c:71:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:72:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:72:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:73:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:73:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:74:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:74:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:75:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:75:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:76:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:76:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:78:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:78:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:79:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:79:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:80:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:80:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:81:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:83:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:83:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:84:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:84:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:85:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:85:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:86:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:86:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:87:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:87:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:88:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:88:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:90:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:90:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:91:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:91:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:92:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:92:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:93:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:93:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:94:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:94:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:95:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:96:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:96:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:97:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:97:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:99:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:99:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:100:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:100:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:102:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:102:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:103:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:103:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:104:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:104:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:105:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:105:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:106:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:106:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:109:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:110:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:111:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:111:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:112:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:113:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:113:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:69:41: call_function: inlined call to ‘closep’ from ‘test_same_fd’
systemd-259/src/test/test-fd-util.c:69:32: call_function: inlined call to ‘closep’ from ‘test_same_fd’
systemd-259/src/test/test-fd-util.c:69:29: call_function: inlined call to ‘closep’ from ‘test_same_fd’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def34]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘b’
systemd-259/src/test/test-fd-util.c:55:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:56:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:56:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:59:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:59:9: throw: if ‘open’ throws an exception...
systemd-259/src/test/test-fd-util.c:58:29: call_function: inlined call to ‘closep’ from ‘test_fd_validate’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def35]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘c’
systemd-259/src/test/test-fd-util.c:67:1: enter_function: entry to ‘test_same_fd’
systemd-259/src/test/test-fd-util.c:71:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:72:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:72:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:73:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:73:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:74:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:74:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:75:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:75:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:76:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:76:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:78:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:78:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:79:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:79:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:80:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:80:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:81:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:83:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:83:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:84:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:84:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:85:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:85:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:86:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:86:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:87:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:87:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:88:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:88:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:90:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:90:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:91:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:91:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:92:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:92:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:93:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:93:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:94:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:94:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:95:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:96:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:96:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:97:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:97:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:99:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:99:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:100:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:100:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:102:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:102:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:103:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:103:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:104:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:104:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:105:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:105:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:106:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:106:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:109:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:110:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:111:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:111:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:112:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:113:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:113:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:69:41: call_function: inlined call to ‘closep’ from ‘test_same_fd’
systemd-259/src/test/test-fd-util.c:69:38: call_function: inlined call to ‘closep’ from ‘test_same_fd’
systemd-259/src/test/test-fd-util.c:69:35: call_function: inlined call to ‘closep’ from ‘test_same_fd’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def36]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data_fd’
systemd-259/src/shared/tar-util.c:1244:12: enter_function: entry to ‘archive_item’
systemd-259/src/shared/tar-util.c:1253:39: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:1256:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:1256:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:1258:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:1261:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:1262:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:1262:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:1264:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:1268:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:1271:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:1274:13: call_function: calling ‘hardlink_lookup’ from ‘archive_item’
systemd-259/src/shared/tar-util.c:1274:13: return_function: returning to ‘archive_item’ from ‘hardlink_lookup’
systemd-259/src/shared/tar-util.c:1275:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:1277:12: branch_false: ...to here
systemd-259/src/shared/tar-util.c:1277:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:1286:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:1286:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:1287:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:1385:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/tar-util.c:1387:27: branch_true: ...to here
systemd-259/src/shared/tar-util.c:1387:27: throw: if ‘fd_reopen’ throws an exception...
systemd-259/src/shared/tar-util.c:1384:29: call_function: inlined call to ‘closep’ from ‘archive_item’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def37]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘d’
systemd-259/src/test/test-fd-util.c:67:1: enter_function: entry to ‘test_same_fd’
systemd-259/src/test/test-fd-util.c:71:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:72:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:72:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:73:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:73:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:74:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:74:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:75:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:75:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:76:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:76:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:78:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:78:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:79:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:79:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:80:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:80:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:81:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:83:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:83:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:84:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:84:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:85:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:85:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:86:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:86:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:87:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:87:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:88:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:88:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:90:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:90:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:91:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:91:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:92:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:92:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:93:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:93:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:94:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:94:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:95:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:96:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:96:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:97:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:97:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:99:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:99:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:100:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:100:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:102:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:102:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:103:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:103:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:104:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:104:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:105:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:105:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:106:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:106:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:109:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:110:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:111:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:111:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:112:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:113:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:113:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:69:41: call_function: inlined call to ‘closep’ from ‘test_same_fd’
systemd-259/src/test/test-fd-util.c:69:38: call_function: inlined call to ‘closep’ from ‘test_same_fd’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def38]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘e’
systemd-259/src/test/test-fd-util.c:71:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:71:9: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:71:9: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/test/test-fd-util.c:69:41: call_function: inlined call to ‘closep’ from ‘test_same_fd’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def39]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd4’
systemd-259/src/test/test-fd-util.c:750:15: throw: if ‘open’ throws an exception...
systemd-259/src/test/test-fd-util.c:748:71: call_function: inlined call to ‘closep’ from ‘test_fds_are_same_mount’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def40]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_opath’
systemd-259/src/test/test-fd-util.c:885:9: throw: if ‘mkostemp_safe’ throws an exception...
systemd-259/src/test/test-fd-util.c:883:77: call_function: inlined call to ‘closep’ from ‘test_fd_vet_accmode’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def41]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_path’
systemd-259/src/test/test-fd-util.c:910:9: throw: if ‘mkostemp_safe’ throws an exception...
systemd-259/src/test/test-fd-util.c:908:77: call_function: inlined call to ‘closep’ from ‘test_fd_is_writable’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def42]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_ro’
systemd-259/src/test/test-fd-util.c:906:1: enter_function: entry to ‘test_fd_is_writable’
systemd-259/src/test/test-fd-util.c:910:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:911:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:911:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:913:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:914:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:914:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:916:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:917:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:917:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:919:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:920:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:920:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:922:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:925:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:908:45: call_function: inlined call to ‘closep’ from ‘test_fd_is_writable’
systemd-259/src/test/test-fd-util.c:908:29: call_function: inlined call to ‘closep’ from ‘test_fd_is_writable’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def43]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_rw’
systemd-259/src/test/test-fd-util.c:906:1: enter_function: entry to ‘test_fd_is_writable’
systemd-259/src/test/test-fd-util.c:910:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:911:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:911:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:913:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:914:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:914:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:916:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:917:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:917:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:919:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:920:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:920:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:922:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:925:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:908:61: call_function: inlined call to ‘closep’ from ‘test_fd_is_writable’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def44]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_wo’
systemd-259/src/test/test-fd-util.c:906:1: enter_function: entry to ‘test_fd_is_writable’
systemd-259/src/test/test-fd-util.c:910:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:911:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:911:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:913:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:914:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:914:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:916:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:917:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:917:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:919:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:920:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:920:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:922:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:925:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:908:61: call_function: inlined call to ‘closep’ from ‘test_fd_is_writable’
systemd-259/src/test/test-fd-util.c:908:45: call_function: inlined call to ‘closep’ from ‘test_fd_is_writable’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def45]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘proc_fdinfo_fd’
systemd-259/src/coredump/coredump-context.c:89:9: branch_true: following ‘true’ branch...
systemd-259/src/coredump/coredump-context.c:89:9: branch_true: ...to here
systemd-259/src/coredump/coredump-context.c:89:9: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/coredump/coredump-context.c:84:29: call_function: inlined call to ‘closep’ from ‘compose_open_fds’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def46]
systemd-259/src/basic/fd-util.h:85:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘verity_data_fd’
systemd-259/src/mountfsd/mountwork.c:288:12: enter_function: entry to ‘vl_method_mount_image’
systemd-259/src/mountfsd/mountwork.c:322:37: branch_true: following ‘true’ branch...
systemd-259/src/mountfsd/mountwork.c:322:37: branch_true: ...to here
systemd-259/src/mountfsd/mountwork.c:322:37: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/mountfsd/mountwork.c:321:52: call_function: calling ‘image_policy_freep’ from ‘vl_method_mount_image’
systemd-259/src/mountfsd/mountwork.c:321:52: return_function: returning to ‘vl_method_mount_image’ from ‘image_policy_freep’
systemd-259/src/mountfsd/mountwork.c:320:68: call_function: inlined call to ‘closep’ from ‘vl_method_mount_image’
#   83|   
#   84|   static inline void closep(int *fd) {
#   85|->         safe_close(*fd);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
systemd-259/src/basic/fd-util.h:89:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘<Uae40>[2]’
systemd-259/src/import/importd.c:425:12: enter_function: entry to ‘transfer_start’
systemd-259/src/import/importd.c:429:9: branch_false: following ‘false’ branch...
systemd-259/src/import/importd.c:430:9: call_function: inlined call to ‘pidref_is_set’ from ‘transfer_start’
systemd-259/src/import/importd.c:432:13: branch_false: ...to here
systemd-259/src/import/importd.c:432:12: branch_false: following ‘false’ branch...
systemd-259/src/import/importd.c:435:13: branch_false: ...to here
systemd-259/src/import/importd.c:437:48: branch_false: following ‘false’ branch...
systemd-259/src/import/importd.c:437:33: branch_false: ...to here
systemd-259/src/import/importd.c:435:13: throw: if ‘pidref_safe_fork_full’ throws an exception...
systemd-259/src/import/importd.c:426:34: call_function: inlined call to ‘close_pairp’ from ‘transfer_start’
#   87|   
#   88|   static inline void close_pairp(int (*p)[2]) {
#   89|->         safe_close_pair(*p);
#   90|   }
#   91|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def48]
systemd-259/src/basic/fd-util.h:93:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fdinfo’
systemd-259/src/coredump/coredump-context.c:81:12: enter_function: entry to ‘compose_open_fds’
systemd-259/src/coredump/coredump-context.c:89:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:90:9: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:90:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:92:16: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:94:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:97:26: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:98:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:101:18: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:102:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:105:9: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:105:9: branch_false: following ‘false’ branch (when ‘de’ is non-NULL)...
systemd-259/src/coredump/coredump-context.c:105:9: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:110:21: throw: if ‘readlinkat_malloc’ throws an exception...
systemd-259/src/coredump/coredump-context.c:108:37: call_function: inlined call to ‘closep’ from ‘compose_open_fds’
systemd-259/src/coredump/coredump-context.c:106:40: call_function: inlined call to ‘fclosep’ from ‘compose_open_fds’
#   91|   
#   92|   static inline void fclosep(FILE **f) {
#   93|->         safe_fclose(*f);
#   94|   }
#   95|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
systemd-259/src/basic/fd-util.h:96:1: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(strextend_with_separator_internal(0, 0, ". ", file, " && /bin/echo -n \"$",  variable, "\"", 0), "re")’
systemd-259/src/test/test-env-file.c:308:13: enter_function: entry to ‘test_one_shell_var’
systemd-259/src/test/test-env-file.c:313:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-env-file.c:314:9: branch_false: ...to here
systemd-259/src/test/test-env-file.c:314:9: acquire_memory: allocated here
systemd-259/src/test/test-env-file.c:314:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-env-file.c:315:9: branch_false: ...to here
systemd-259/src/test/test-env-file.c:315:9: call_function: calling ‘read_full_stream’ from ‘test_one_shell_var’
systemd-259/src/test/test-env-file.c:310:32: call_function: inlined call to ‘pclosep’ from ‘test_one_shell_var’
#   94|   }
#   95|   
#   96|-> DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(FILE*, pclose, NULL);
#   97|   DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(DIR*, closedir, NULL);
#   98|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
systemd-259/src/basic/fd-util.h:97:1: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/run/udev/static_node-tags/uaccess/")’
systemd-259/src/login/logind-seat.c:729:6: enter_function: entry to ‘seat_complete_switch’
systemd-259/src/login/logind-seat.c:732:9: branch_false: following ‘false’ branch...
systemd-259/src/login/logind-seat.c:735:14: branch_false: ...to here
systemd-259/src/login/logind-seat.c:735:12: branch_false: following ‘false’ branch...
systemd-259/src/login/logind-seat.c:738:19: branch_false: ...to here
systemd-259/src/login/logind-seat.c:740:9: call_function: calling ‘seat_set_active’ from ‘seat_complete_switch’
#   95|   
#   96|   DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(FILE*, pclose, NULL);
#   97|-> DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(DIR*, closedir, NULL);
#   98|   
#   99|   #define _cleanup_close_ _cleanup_(closep)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
systemd-259/src/basic/fd-util.h:97:1: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(*m.state_dir)’
systemd-259/src/machine/machined.c:179:12: enter_function: entry to ‘manager_enumerate_machines’
systemd-259/src/machine/machined.c:183:9: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined.c:185:13: branch_false: ...to here
systemd-259/src/machine/machined.c:186:12: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined.c:190:21: branch_false: ...to here
systemd-259/src/machine/machined.c:190:13: acquire_memory: allocated here
systemd-259/src/machine/machined.c:191:12: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined.c:198:9: branch_false: ...to here
systemd-259/src/machine/machined.c:198:9: throw: if ‘readdir_ensure_type’ throws an exception...
systemd-259/src/machine/machined.c:180:33: call_function: inlined call to ‘closedirp’ from ‘manager_enumerate_machines’
#   95|   
#   96|   DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(FILE*, pclose, NULL);
#   97|-> DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(DIR*, closedir, NULL);
#   98|   
#   99|   #define _cleanup_close_ _cleanup_(closep)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def52]
systemd-259/src/basic/fd-util.h:97:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘cd’
systemd-259/src/import/import-common.c:163:9: branch_false: following ‘false’ branch...
systemd-259/src/import/import-common.c:165:13: branch_false: ...to here
systemd-259/src/import/import-common.c:172:13: throw: if ‘fd_get_path’ throws an exception...
systemd-259/src/import/import-common.c:158:44: call_function: inlined call to ‘closedirp’ from ‘import_mangle_os_tree_fd’
#   95|   
#   96|   DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(FILE*, pclose, NULL);
#   97|-> DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(DIR*, closedir, NULL);
#   98|   
#   99|   #define _cleanup_close_ _cleanup_(closep)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def53]
systemd-259/src/basic/fd-util.h:97:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘proc_fd_dir’
systemd-259/src/coredump/coredump-context.c:81:12: enter_function: entry to ‘compose_open_fds’
systemd-259/src/coredump/coredump-context.c:89:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:90:9: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:90:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:92:16: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:94:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:97:26: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:98:12: branch_true: following ‘true’ branch...
systemd-259/src/coredump/coredump-context.c:99:25: branch_true: ...to here
systemd-259/src/coredump/coredump-context.c:84:29: call_function: inlined call to ‘closep’ from ‘compose_open_fds’
systemd-259/src/coredump/coredump-context.c:83:33: call_function: inlined call to ‘closedirp’ from ‘compose_open_fds’
#   95|   
#   96|   DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(FILE*, pclose, NULL);
#   97|-> DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(DIR*, closedir, NULL);
#   98|   
#   99|   #define _cleanup_close_ _cleanup_(closep)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
systemd-259/src/basic/fileio.h:45:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fn, "r+")’
systemd-259/src/test/test-fileio.c:100:1: enter_function: entry to ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:105:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:107:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:107:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:108:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:111:9: acquire_resource: opened here
systemd-259/src/test/test-fileio.c:111:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:112:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
#   43|   int write_string_stream_full(FILE *f, const char *line, WriteStringFileFlags flags, const struct timespec *ts);
#   44|   static inline int write_string_stream(FILE *f, const char *line, WriteStringFileFlags flags) {
#   45|->         return write_string_stream_full(f, line, flags, NULL);
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
systemd-259/src/basic/fileio.h:45:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fn, "w+")’
systemd-259/src/test/test-fileio.c:100:1: enter_function: entry to ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:105:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:107:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:107:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:108:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:111:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:112:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:113:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:116:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:117:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:117:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:118:15: branch_false: ...to here
systemd-259/src/test/test-fileio.c:121:9: acquire_resource: opened here
systemd-259/src/test/test-fileio.c:121:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:122:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
#   43|   int write_string_stream_full(FILE *f, const char *line, WriteStringFileFlags flags, const struct timespec *ts);
#   44|   static inline int write_string_stream(FILE *f, const char *line, WriteStringFileFlags flags) {
#   45|->         return write_string_stream_full(f, line, flags, NULL);
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
systemd-259/src/basic/fileio.h:45:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopen(mkostemp_safe(&fn), "r")’
systemd-259/src/test/test-fileio.c:100:1: enter_function: entry to ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:105:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:107:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:107:9: acquire_memory: allocated here
systemd-259/src/test/test-fileio.c:107:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:108:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
#   43|   int write_string_stream_full(FILE *f, const char *line, WriteStringFileFlags flags, const struct timespec *ts);
#   44|   static inline int write_string_stream(FILE *f, const char *line, WriteStringFileFlags flags) {
#   45|->         return write_string_stream_full(f, line, flags, NULL);
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
systemd-259/src/basic/fileio.h:45:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fn, "r+")’
systemd-259/src/test/test-fileio.c:100:1: enter_function: entry to ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:105:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:107:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:107:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:108:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:111:9: acquire_memory: allocated here
systemd-259/src/test/test-fileio.c:111:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:112:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
#   43|   int write_string_stream_full(FILE *f, const char *line, WriteStringFileFlags flags, const struct timespec *ts);
#   44|   static inline int write_string_stream(FILE *f, const char *line, WriteStringFileFlags flags) {
#   45|->         return write_string_stream_full(f, line, flags, NULL);
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
systemd-259/src/basic/fileio.h:45:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fn, "w+")’
systemd-259/src/test/test-fileio.c:100:1: enter_function: entry to ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:105:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:107:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:107:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:108:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:111:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:112:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
systemd-259/src/test/test-fileio.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:113:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:116:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:117:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:117:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:118:15: branch_false: ...to here
systemd-259/src/test/test-fileio.c:121:9: acquire_memory: allocated here
systemd-259/src/test/test-fileio.c:121:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:122:9: call_function: inlined call to ‘write_string_stream’ from ‘test_write_string_stream’
#   43|   int write_string_stream_full(FILE *f, const char *line, WriteStringFileFlags flags, const struct timespec *ts);
#   44|   static inline int write_string_stream(FILE *f, const char *line, WriteStringFileFlags flags) {
#   45|->         return write_string_stream_full(f, line, flags, NULL);
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
systemd-259/src/basic/fileio.h:64:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopen(mkostemp_safe(&fn), "we")’
systemd-259/src/test/test-fileio.c:66:1: enter_function: entry to ‘test_read_one_line_file’
systemd-259/src/test/test-fileio.c:72:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:74:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:74:9: acquire_memory: allocated here
systemd-259/src/test/test-fileio.c:74:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:76:9: call_function: inlined call to ‘read_one_line_file’ from ‘test_read_one_line_file’
#   62|   int read_one_line_file_at(int dir_fd, const char *filename, char **ret);
#   63|   static inline int read_one_line_file(const char *filename, char **ret) {
#   64|->         return read_one_line_file_at(AT_FDCWD, filename, ret);
#   65|   }
#   66|   int read_full_file_full(int dir_fd, const char *filename, uint64_t offset, size_t size, ReadFullFileFlags flags, const char *bind_name, char **ret_contents, size_t *ret_size);

Error: COMPILER_WARNING: [#def60] [important]
systemd-259/src/basic/fs-util.c:304:32: error[-Wimplicit-function-declaration]: implicit declaration of function ‘fchmodat2’; did you mean ‘fchmodat’?
#  302|           if (fchmodat(fd, "", m, AT_EMPTY_PATH) >= 0)
#  303|                   return 0;
#  304|->         if (errno == EINVAL && fchmodat2(fd, "", m, AT_EMPTY_PATH) >= 0) /* glibc too old? */
#  305|                   return 0;
#  306|           if (!IN_SET(errno, ENOSYS, EPERM)) /* Some container managers block unknown syscalls with EPERM */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
systemd-259/src/basic/iovec-wrapper.h:25:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
systemd-259/src/coredump/coredump-context.c:175:5: enter_function: entry to ‘coredump_context_build_iovw’
systemd-259/src/coredump/coredump-context.c:179:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:180:9: call_function: inlined call to ‘pidref_is_set’ from ‘coredump_context_build_iovw’
systemd-259/src/coredump/coredump-context.c:182:14: call_function: inlined call to ‘iovw_isempty’ from ‘coredump_context_build_iovw’
systemd-259/src/coredump/coredump-context.c:187:13: branch_true: ...to here
systemd-259/src/coredump/coredump-context.c:188:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:191:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:199:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:202:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:203:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:206:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:215:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:218:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:219:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:222:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:228:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:231:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:255:13: call_function: calling ‘compose_open_fds’ from ‘coredump_context_build_iovw’
systemd-259/src/coredump/coredump-context.c:255:13: return_function: returning to ‘coredump_context_build_iovw’ from ‘compose_open_fds’
systemd-259/src/coredump/coredump-context.c:274:12: branch_true: following ‘true’ branch...
systemd-259/src/coredump/coredump-context.c:275:61: branch_true: ...to here
systemd-259/src/coredump/coredump-context.c:276:29: acquire_memory: allocated here
systemd-259/src/coredump/coredump-context.c:277:20: branch_true: following ‘true’ branch (when ‘buf’ is non-NULL)...
systemd-259/src/coredump/coredump-context.c:277:20: branch_true: ...to here
systemd-259/src/coredump/coredump-context.c:279:26: call_function: calling ‘mempcpy_safe’ from ‘coredump_context_build_iovw’
systemd-259/src/coredump/coredump-context.c:279:26: return_function: returning to ‘coredump_context_build_iovw’ from ‘mempcpy_safe’
systemd-259/src/coredump/coredump-context.c:280:32: call_function: calling ‘iovw_consume’ from ‘coredump_context_build_iovw’
#   23|           int r;
#   24|   
#   25|->         r = iovw_put(iovw, data, len);
#   26|           if (r < 0)
#   27|                   free(data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
systemd-259/src/basic/memory-util.h:29:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
systemd-259/src/coredump/coredump-context.c:175:5: enter_function: entry to ‘coredump_context_build_iovw’
systemd-259/src/coredump/coredump-context.c:179:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:180:9: call_function: inlined call to ‘pidref_is_set’ from ‘coredump_context_build_iovw’
systemd-259/src/coredump/coredump-context.c:182:14: call_function: inlined call to ‘iovw_isempty’ from ‘coredump_context_build_iovw’
systemd-259/src/coredump/coredump-context.c:187:13: branch_true: ...to here
systemd-259/src/coredump/coredump-context.c:188:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:191:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:199:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:202:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:203:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:206:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:215:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:218:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:219:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:222:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:228:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-context.c:231:13: branch_false: ...to here
systemd-259/src/coredump/coredump-context.c:255:13: call_function: calling ‘compose_open_fds’ from ‘coredump_context_build_iovw’
systemd-259/src/coredump/coredump-context.c:255:13: return_function: returning to ‘coredump_context_build_iovw’ from ‘compose_open_fds’
systemd-259/src/coredump/coredump-context.c:274:12: branch_true: following ‘true’ branch...
systemd-259/src/coredump/coredump-context.c:275:61: branch_true: ...to here
systemd-259/src/coredump/coredump-context.c:276:29: acquire_memory: allocated here
systemd-259/src/coredump/coredump-context.c:277:20: branch_true: following ‘true’ branch (when ‘buf’ is non-NULL)...
systemd-259/src/coredump/coredump-context.c:277:20: branch_true: ...to here
systemd-259/src/coredump/coredump-context.c:279:26: call_function: calling ‘mempcpy_safe’ from ‘coredump_context_build_iovw’
#   27|           if (n == 0)
#   28|                   return dst;
#   29|->         assert(src);
#   30|           return mempcpy(dst, src, n);
#   31|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
systemd-259/src/basic/parse-util.h:78:16: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(&*dentry.d_name, "i"), (long unsigned int)(endswith_internal(<unknown>, ".userns") - <unknown>))’
systemd-259/src/nsresourced/nsresourced-manager.c:390:12: enter_function: entry to ‘manager_scan_registry’
systemd-259/src/nsresourced/nsresourced-manager.c:394:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:395:9: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:395:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:396:9: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:396:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:398:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:399:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:399:12: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:402:28: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:403:41: branch_true: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:409:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:412:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:413:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:416:32: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:416:21: acquire_memory: allocated here
systemd-259/src/nsresourced/nsresourced-manager.c:417:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:420:21: call_function: inlined call to ‘safe_atou64’ from ‘manager_scan_registry’
#   76|   
#   77|   static inline int safe_atollu(const char *s, unsigned long long *ret_llu) {
#   78|->         return safe_atollu_full(s, 0, ret_llu);
#   79|   }
#   80|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
systemd-259/src/basic/pidref.h:106:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[0]’
systemd-259/src/test/test-namespace.c:438:1: enter_function: entry to ‘test_detach_mount_namespace_harder’
systemd-259/src/test/test-namespace.c:444:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-namespace.c:446:9: call_function: inlined call to ‘pidref_safe_fork’ from ‘test_detach_mount_namespace_harder’
systemd-259/src/test/test-namespace.c:446:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:447:12: branch_false: ...to here
systemd-259/src/test/test-namespace.c:447:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:456:16: branch_false: ...to here
systemd-259/src/test/test-namespace.c:457:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:458:9: branch_false: following ‘false’ branch (when ‘_expr1 == 120’)...
systemd-259/src/test/test-namespace.c:460:9: branch_false: ...to here
systemd-259/src/test/test-namespace.c:460:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:461:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:439:52: call_function: inlined call to ‘pidref_done_sigkill_wait’ from ‘test_detach_mount_namespace_harder’
#  104|                   return;
#  105|   
#  106|->         (void) pidref_kill(pidref, SIGKILL);
#  107|           (void) pidref_wait_for_terminate(pidref, NULL);
#  108|           pidref_done(pidref);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
systemd-259/src/basic/pidref.h:107:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[0]’
systemd-259/src/test/test-namespace.c:438:1: enter_function: entry to ‘test_detach_mount_namespace_harder’
systemd-259/src/test/test-namespace.c:444:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-namespace.c:446:9: call_function: inlined call to ‘pidref_safe_fork’ from ‘test_detach_mount_namespace_harder’
systemd-259/src/test/test-namespace.c:446:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:447:12: branch_false: ...to here
systemd-259/src/test/test-namespace.c:447:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:456:16: branch_false: ...to here
systemd-259/src/test/test-namespace.c:457:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:458:9: branch_false: following ‘false’ branch (when ‘_expr1 == 120’)...
systemd-259/src/test/test-namespace.c:460:9: branch_false: ...to here
systemd-259/src/test/test-namespace.c:460:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:461:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:439:52: call_function: inlined call to ‘pidref_done_sigkill_wait’ from ‘test_detach_mount_namespace_harder’
#  105|   
#  106|           (void) pidref_kill(pidref, SIGKILL);
#  107|->         (void) pidref_wait_for_terminate(pidref, NULL);
#  108|           pidref_done(pidref);
#  109|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def66]
systemd-259/src/basic/pidref.h:108:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[0]’
systemd-259/src/test/test-namespace.c:438:1: enter_function: entry to ‘test_detach_mount_namespace_harder’
systemd-259/src/test/test-namespace.c:444:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-namespace.c:446:9: call_function: inlined call to ‘pidref_safe_fork’ from ‘test_detach_mount_namespace_harder’
systemd-259/src/test/test-namespace.c:446:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:447:12: branch_false: ...to here
systemd-259/src/test/test-namespace.c:447:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:456:16: branch_false: ...to here
systemd-259/src/test/test-namespace.c:457:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:458:9: branch_false: following ‘false’ branch (when ‘_expr1 == 120’)...
systemd-259/src/test/test-namespace.c:460:9: branch_false: ...to here
systemd-259/src/test/test-namespace.c:460:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:461:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:439:52: call_function: inlined call to ‘pidref_done_sigkill_wait’ from ‘test_detach_mount_namespace_harder’
#  106|           (void) pidref_kill(pidref, SIGKILL);
#  107|           (void) pidref_wait_for_terminate(pidref, NULL);
#  108|->         pidref_done(pidref);
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
systemd-259/src/basic/stdio-util.h:18:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fn, "we")’
systemd-259/src/test/test-fileio.c:556:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:557:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:557:9: acquire_resource: opened here
systemd-259/src/test/test-fileio.c:557:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:558:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_true: ...to here
systemd-259/src/test/test-fileio.c:558:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:558:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_true: ...to here
systemd-259/src/test/test-fileio.c:558:9: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/basic/stdio-util.h:18:26: danger: ‘fopen(fn, "we")’ leaks here; was opened at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
#   16|           va_end(ap);
#   17|   
#   18|->         return r >= 0 && (size_t) r < len ? buf : NULL;
#   19|   }
#   20|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
systemd-259/src/basic/stdio-util.h:18:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fn, "we")’
systemd-259/src/test/test-fileio.c:556:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:557:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:557:9: acquire_memory: allocated here
systemd-259/src/test/test-fileio.c:557:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:558:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_true: ...to here
systemd-259/src/test/test-fileio.c:558:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:558:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_true: ...to here
systemd-259/src/test/test-fileio.c:558:9: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/basic/stdio-util.h:18:26: danger: ‘fopen(fn, "we")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
#   16|           va_end(ap);
#   17|   
#   18|->         return r >= 0 && (size_t) r < len ? buf : NULL;
#   19|   }
#   20|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def69]
systemd-259/src/basic/strv.c:928:19: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
systemd-259/src/basic/strv.c:927:9: acquire_resource: ‘va_start’ called here
systemd-259/src/basic/strv.c:928:19: throw: if ‘strextendv_with_separator’ throws an exception...
systemd-259/src/basic/strv.c:928:19: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  926|   
#  927|           va_start(ap, n);
#  928|->         char *x = strextendv_with_separator(/* x= */ NULL, /* separator= */ NULL, ap);
#  929|           va_end(ap);
#  930|           if (!x)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
systemd-259/src/basic/strv.h:20:1: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(*c.parameter, "device-tree-compatible("), (long unsigned int)(end - <unknown>))’
systemd-259/src/shared/condition.c:594:12: enter_function: entry to ‘condition_test_firmware’
systemd-259/src/shared/condition.c:598:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/condition.c:599:9: branch_false: ...to here
systemd-259/src/shared/condition.c:599:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/condition.c:600:9: branch_false: ...to here
systemd-259/src/shared/condition.c:600:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/condition.c:602:13: branch_false: ...to here
systemd-259/src/shared/condition.c:602:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
systemd-259/src/shared/condition.c:609:27: branch_false: ...to here
systemd-259/src/shared/condition.c:609:19: branch_true: following ‘true’ branch...
systemd-259/src/shared/condition.c:613:23: branch_true: ...to here
systemd-259/src/shared/condition.c:614:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/condition.c:619:27: acquire_memory: allocated here
systemd-259/src/shared/condition.c:620:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/condition.c:623:24: branch_false: ...to here
systemd-259/src/shared/condition.c:623:24: call_function: calling ‘condition_test_firmware_devicetree_compatible’ from ‘condition_test_firmware’
systemd-259/src/basic/strv.h:20:1: danger: ‘strndup(startswith_internal(*c.parameter, "device-tree-compatible("), (long unsigned int)(end - <unknown>))’ leaks here; was allocated at [(14)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/13)
#   18|   
#   19|   char** strv_free(char **l);
#   20|-> DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free);
#   21|   #define _cleanup_strv_free_ _cleanup_(strv_freep)
#   22|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
systemd-259/src/basic/user-util.c:1113:21: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, bufsize + 48)’
systemd-259/src/basic/user-util.c:1095:5: enter_function: entry to ‘getpwnam_malloc’
systemd-259/src/basic/user-util.c:1108:23: acquire_memory: allocated here
systemd-259/src/basic/user-util.c:1109:20: branch_false: following ‘false’ branch...
systemd-259/src/basic/user-util.c:1112:32: branch_false: ...to here
systemd-259/src/basic/user-util.c:1113:21: throw: if ‘getpwnam_r’ throws an exception...
systemd-259/src/basic/user-util.c:1113:21: danger: ‘calloc(1, bufsize + 48)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
# 1111|   
# 1112|                   struct passwd *pw = NULL;
# 1113|->                 r = getpwnam_r(name, buf, (char*) buf + ALIGN(sizeof(struct passwd)), bufsize, &pw);
# 1114|                   if (r == 0) {
# 1115|                           if (pw) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
systemd-259/src/basic/user-util.c:1154:21: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, bufsize + 48)’
systemd-259/src/basic/user-util.c:1143:12: branch_true: following ‘true’ branch...
systemd-259/src/basic/user-util.c:1143:12: branch_true: ...to here
systemd-259/src/basic/user-util.c:1149:23: acquire_memory: allocated here
systemd-259/src/basic/user-util.c:1150:20: branch_false: following ‘false’ branch...
systemd-259/src/basic/user-util.c:1153:32: branch_false: ...to here
systemd-259/src/basic/user-util.c:1154:21: throw: if ‘getpwuid_r’ throws an exception...
systemd-259/src/basic/user-util.c:1154:21: danger: ‘calloc(1, bufsize + 48)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
# 1152|   
# 1153|                   struct passwd *pw = NULL;
# 1154|->                 r = getpwuid_r(uid, buf, (char*) buf + ALIGN(sizeof(struct passwd)), bufsize, &pw);
# 1155|                   if (r == 0) {
# 1156|                           if (pw) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
systemd-259/src/basic/user-util.c:1198:21: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, bufsize + 32)’
systemd-259/src/basic/user-util.c:1183:5: enter_function: entry to ‘getgrnam_malloc’
systemd-259/src/basic/user-util.c:1193:23: acquire_memory: allocated here
systemd-259/src/basic/user-util.c:1194:20: branch_false: following ‘false’ branch...
systemd-259/src/basic/user-util.c:1197:31: branch_false: ...to here
systemd-259/src/basic/user-util.c:1198:21: throw: if ‘getgrnam_r’ throws an exception...
systemd-259/src/basic/user-util.c:1198:21: danger: ‘calloc(1, bufsize + 32)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
# 1196|   
# 1197|                   struct group *gr = NULL;
# 1198|->                 r = getgrnam_r(name, buf, (char*) buf + ALIGN(sizeof(struct group)), bufsize, &gr);
# 1199|                   if (r == 0) {
# 1200|                           if (gr) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
systemd-259/src/basic/user-util.c:1237:21: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, bufsize + 32)’
systemd-259/src/basic/user-util.c:1226:12: branch_true: following ‘true’ branch...
systemd-259/src/basic/user-util.c:1226:12: branch_true: ...to here
systemd-259/src/basic/user-util.c:1232:23: acquire_memory: allocated here
systemd-259/src/basic/user-util.c:1233:20: branch_false: following ‘false’ branch...
systemd-259/src/basic/user-util.c:1236:31: branch_false: ...to here
systemd-259/src/basic/user-util.c:1237:21: throw: if ‘getgrgid_r’ throws an exception...
systemd-259/src/basic/user-util.c:1237:21: danger: ‘calloc(1, bufsize + 32)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 1235|   
# 1236|                   struct group *gr = NULL;
# 1237|->                 r = getgrgid_r(gid, buf, (char*) buf + ALIGN(sizeof(struct group)), bufsize, &gr);
# 1238|                   if (r == 0) {
# 1239|                           if (gr) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
systemd-259/src/core/import-creds.c:228:30: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*d.d_name, (long unsigned int)(endswith_internal(<unknown>, ".cred") - &d_90->d_name))’
systemd-259/src/core/import-creds.c:852:5: enter_function: entry to ‘import_credentials’
systemd-259/src/core/import-creds.c:869:12: branch_false: following ‘false’ branch...
systemd-259/src/core/import-creds.c:887:22: branch_false: ...to here
systemd-259/src/core/import-creds.c:897:21: call_function: calling ‘import_credentials_boot’ from ‘import_credentials’
#  226|                                   return log_oom();
#  227|   
#  228|->                         if (!credential_name_valid(n)) {
#  229|                                   log_warning("Credential '%s' has invalid name, ignoring.", d->d_name);
#  230|                                   continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
systemd-259/src/core/import-creds.c:229:33: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*d.d_name, (long unsigned int)(endswith_internal(<unknown>, ".cred") - &d_90->d_name))’
systemd-259/src/core/import-creds.c:852:5: enter_function: entry to ‘import_credentials’
systemd-259/src/core/import-creds.c:869:12: branch_false: following ‘false’ branch...
systemd-259/src/core/import-creds.c:887:22: branch_false: ...to here
systemd-259/src/core/import-creds.c:897:21: call_function: calling ‘import_credentials_boot’ from ‘import_credentials’
#  227|   
#  228|                           if (!credential_name_valid(n)) {
#  229|->                                 log_warning("Credential '%s' has invalid name, ignoring.", d->d_name);
#  230|                                   continue;
#  231|                           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
systemd-259/src/core/import-creds.c:233:31: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*d.d_name, (long unsigned int)(endswith_internal(<unknown>, ".cred") - &d_90->d_name))’
systemd-259/src/core/import-creds.c:852:5: enter_function: entry to ‘import_credentials’
systemd-259/src/core/import-creds.c:869:12: branch_false: following ‘false’ branch...
systemd-259/src/core/import-creds.c:887:22: branch_false: ...to here
systemd-259/src/core/import-creds.c:897:21: call_function: calling ‘import_credentials_boot’ from ‘import_credentials’
#  231|                           }
#  232|   
#  233|->                         cfd = openat(source_dir_fd, d->d_name, O_RDONLY|O_CLOEXEC);
#  234|                           if (cfd < 0) {
#  235|                                   log_warning_errno(errno, "Failed to open %s, ignoring: %m", d->d_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
systemd-259/src/core/import-creds.c:244:29: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*d.d_name, (long unsigned int)(endswith_internal(<unknown>, ".cred") - &d_90->d_name))’
systemd-259/src/core/import-creds.c:852:5: enter_function: entry to ‘import_credentials’
systemd-259/src/core/import-creds.c:869:12: branch_false: following ‘false’ branch...
systemd-259/src/core/import-creds.c:887:22: branch_false: ...to here
systemd-259/src/core/import-creds.c:897:21: call_function: calling ‘import_credentials_boot’ from ‘import_credentials’
#  242|                           }
#  243|   
#  244|->                         r = stat_verify_regular(&st);
#  245|                           if (r < 0) {
#  246|                                   log_warning_errno(r, "Credential file %s is not a regular file, ignoring: %m", d->d_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
systemd-259/src/core/import-creds.c:246:33: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*d.d_name, (long unsigned int)(endswith_internal(<unknown>, ".cred") - &d_90->d_name))’
systemd-259/src/core/import-creds.c:852:5: enter_function: entry to ‘import_credentials’
systemd-259/src/core/import-creds.c:869:12: branch_false: following ‘false’ branch...
systemd-259/src/core/import-creds.c:887:22: branch_false: ...to here
systemd-259/src/core/import-creds.c:897:21: call_function: calling ‘import_credentials_boot’ from ‘import_credentials’
#  244|                           r = stat_verify_regular(&st);
#  245|                           if (r < 0) {
#  246|->                                 log_warning_errno(r, "Credential file %s is not a regular file, ignoring: %m", d->d_name);
#  247|                                   continue;
#  248|                           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
systemd-259/src/core/import-creds.c:250:62: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*d.d_name, (long unsigned int)(endswith_internal(<unknown>, ".cred") - &d_90->d_name))’
systemd-259/src/core/import-creds.c:852:5: enter_function: entry to ‘import_credentials’
systemd-259/src/core/import-creds.c:869:12: branch_false: following ‘false’ branch...
systemd-259/src/core/import-creds.c:887:22: branch_false: ...to here
systemd-259/src/core/import-creds.c:897:21: call_function: calling ‘import_credentials_boot’ from ‘import_credentials’
#  248|                           }
#  249|   
#  250|->                         if (!credential_size_ok(&context, n, st.st_size))
#  251|                                   continue;
#  252|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
systemd-259/src/core/ipe-setup.c:61:32: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(file_name, (long unsigned int)(endswith_internal(<unknown>, ".p7b") - file_name))’
systemd-259/src/core/ipe-setup.c:30:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:35:13: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:41:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:44:9: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:44:9: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:50:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:54:26: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:54:26: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:56:50: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:56:31: acquire_memory: allocated here
systemd-259/src/core/ipe-setup.c:57:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:60:22: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:61:32: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:61:32: branch_true: ...to here
systemd-259/src/core/ipe-setup.c:61:32: throw: if ‘log_internal’ throws an exception...
systemd-259/src/core/ipe-setup.c:61:32: danger: ‘strndup(file_name, (long unsigned int)(endswith_internal(<unknown>, ".p7b") - file_name))’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#   59|   
#   60|                   if (!filename_is_valid(policy_name))
#   61|->                         return log_error_errno(
#   62|                                           SYNTHETIC_ERRNO(EINVAL),
#   63|                                           "Invalid IPE policy name %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
systemd-259/src/core/ipe-setup.c:66:25: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(file_name, (long unsigned int)(endswith_internal(<unknown>, ".p7b") - file_name))’
systemd-259/src/core/ipe-setup.c:30:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:35:13: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:41:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:44:9: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:44:9: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:50:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:54:26: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:54:26: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:56:50: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:56:31: acquire_memory: allocated here
systemd-259/src/core/ipe-setup.c:57:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:60:22: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:60:20: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:66:25: branch_true: ...to here
systemd-259/src/core/ipe-setup.c:66:25: throw: if ‘open’ throws an exception...
systemd-259/src/core/ipe-setup.c:66:25: danger: ‘strndup(file_name, (long unsigned int)(endswith_internal(<unknown>, ".p7b") - file_name))’ leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#   64|                                           policy_name);
#   65|   
#   66|->                 input = open(*policy, O_RDONLY|O_NOFOLLOW|O_CLOEXEC);
#   67|                   if (input < 0)
#   68|                           return log_error_errno(

Error: GCC_ANALYZER_WARNING (CWE-775): [#def83]
systemd-259/src/core/ipe-setup.c:74:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*__unique_prefix_i13, 655360)’
systemd-259/src/core/ipe-setup.c:30:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:35:13: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:41:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:44:9: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:44:9: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:50:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:54:26: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:54:26: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:56:50: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:57:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:60:22: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:60:20: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:66:25: branch_true: ...to here
systemd-259/src/core/ipe-setup.c:66:25: acquire_resource: opened here
systemd-259/src/core/ipe-setup.c:67:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:74:31: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:74:31: throw: if ‘path_extend_internal’ throws an exception...
systemd-259/src/core/ipe-setup.c:74:31: danger: ‘open(*__unique_prefix_i13, 655360)’ leaks here; was opened at [(15)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/14)
#   72|   
#   73|                   /* If policy is already installed, try to update it */
#   74|->                 output_path = path_join(IPE_SECFS_POLICIES, policy_name, "update");
#   75|                   if (!output_path)
#   76|                           return log_oom();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def84]
systemd-259/src/core/ipe-setup.c:76:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*__unique_prefix_i13, 655360)’
systemd-259/src/core/ipe-setup.c:30:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:35:13: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:41:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:44:9: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:44:9: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:50:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:54:26: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:54:26: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:56:50: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:57:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:60:22: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:60:20: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:66:25: branch_true: ...to here
systemd-259/src/core/ipe-setup.c:66:25: acquire_resource: opened here
systemd-259/src/core/ipe-setup.c:67:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:74:31: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:76:32: throw: if ‘log_oom_internal’ throws an exception...
systemd-259/src/core/ipe-setup.c:76:32: danger: ‘open(*__unique_prefix_i13, 655360)’ leaks here; was opened at [(15)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/14)
#   74|                   output_path = path_join(IPE_SECFS_POLICIES, policy_name, "update");
#   75|                   if (!output_path)
#   76|->                         return log_oom();
#   77|   
#   78|                   output = open(output_path, O_WRONLY|O_CLOEXEC);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def85]
systemd-259/src/core/ipe-setup.c:78:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*__unique_prefix_i13, 655360)’
systemd-259/src/core/ipe-setup.c:30:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:35:13: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:41:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:44:9: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:44:9: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:50:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:54:26: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:54:26: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:56:50: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:57:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:60:22: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:60:20: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:66:25: branch_true: ...to here
systemd-259/src/core/ipe-setup.c:66:25: acquire_resource: opened here
systemd-259/src/core/ipe-setup.c:67:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:74:31: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:75:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:78:26: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:78:26: throw: if ‘open’ throws an exception...
systemd-259/src/core/ipe-setup.c:78:26: danger: ‘open(*__unique_prefix_i13, 655360)’ leaks here; was opened at [(15)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/14)
#   76|                           return log_oom();
#   77|   
#   78|->                 output = open(output_path, O_WRONLY|O_CLOEXEC);
#   79|                   if (output < 0 && errno == ENOENT)
#   80|                           /* Policy is not installed, install it and activate it */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
systemd-259/src/core/ipe-setup.c:89:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*__unique_prefix_i13, 655360)’
systemd-259/src/core/ipe-setup.c:21:5: enter_function: entry to ‘ipe_setup’
systemd-259/src/core/ipe-setup.c:30:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:35:13: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:41:12: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:44:9: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:44:9: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:50:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:54:26: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:54:26: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:56:50: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:57:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:60:22: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:60:20: branch_true: following ‘true’ branch...
systemd-259/src/core/ipe-setup.c:66:25: branch_true: ...to here
systemd-259/src/core/ipe-setup.c:66:25: acquire_resource: opened here
systemd-259/src/core/ipe-setup.c:67:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:74:31: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:75:20: branch_false: following ‘false’ branch...
systemd-259/src/core/ipe-setup.c:78:26: branch_false: ...to here
systemd-259/src/core/ipe-setup.c:89:21: call_function: calling ‘copy_bytes’ from ‘ipe_setup’
systemd-259/src/core/ipe-setup.c:89:21: danger: ‘open(*__unique_prefix_i13, 655360)’ leaks here; was opened at [(16)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/15)
#   87|                   /* The policy is inline signed in binary format, so it has to be copied in one go, otherwise the
#   88|                    * kernel will reject partial inputs with -EBADMSG. */
#   89|->                 r = copy_bytes(input, output, UINT64_MAX, /* copy_flags= */ 0);
#   90|                   if (r < 0)
#   91|                           return log_error_errno(

Error: GCC_ANALYZER_WARNING (CWE-775): [#def87]
systemd-259/src/coredump/coredump-send.c:32:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socket(1, 524293, 0)’
systemd-259/src/coredump/coredump-send.c:25:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-send.c:26:9: branch_false: ...to here
systemd-259/src/coredump/coredump-send.c:26:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-send.c:28:14: branch_false: ...to here
systemd-259/src/coredump/coredump-send.c:28:14: acquire_resource: socket created here
systemd-259/src/coredump/coredump-send.c:29:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-send.c:32:13: branch_false: ...to here
systemd-259/src/coredump/coredump-send.c:32:13: throw: if ‘connect_unix_path’ throws an exception...
systemd-259/src/coredump/coredump-send.c:32:13: danger: ‘socket(1, 524293, 0)’ leaks here
#   30|                   return log_error_errno(errno, "Failed to create coredump socket: %m");
#   31|   
#   32|->         r = connect_unix_path(fd, AT_FDCWD, "/run/systemd/coredump");
#   33|           if (r < 0)
#   34|                   return log_error_errno(r, "Failed to connect to coredump service: %m");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
systemd-259/src/coredump/coredump-submit.c:619:27: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(size + 9)’
systemd-259/src/coredump/coredump-submit.c:603:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-submit.c:604:9: branch_false: ...to here
systemd-259/src/coredump/coredump-submit.c:604:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-submit.c:605:9: branch_false: ...to here
systemd-259/src/coredump/coredump-submit.c:605:9: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-submit.c:607:13: branch_false: ...to here
systemd-259/src/coredump/coredump-submit.c:607:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-submit.c:610:17: branch_false: ...to here
systemd-259/src/coredump/coredump-submit.c:610:17: acquire_memory: allocated here
systemd-259/src/coredump/coredump-submit.c:611:12: branch_false: following ‘false’ branch...
systemd-259/src/coredump/coredump-submit.c:615:9: branch_false: ...to here
systemd-259/src/coredump/coredump-submit.c:619:13: throw: if ‘loop_read’ throws an exception...
systemd-259/src/coredump/coredump-submit.c:619:27: danger: ‘malloc(size + 9)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
#  617|           /* NB: simple read() would fail for overly large coredumps, since read() on Linux can only deal with
#  618|            * 0x7ffff000 bytes max. Hence call things in a loop. */
#  619|->         n = loop_read(fd, field + 9, size, /* do_poll= */ false);
#  620|           if (n < 0)
#  621|                   return log_error_errno((int) n, "Failed to read core data: %m");

Error: CPPCHECK_WARNING (CWE-457): [#def89]
systemd-259/src/creds/creds.c:151: error[uninitvar]: Uninitialized variable: &p
#  149|                   /* PID 1 ensures that system credentials are always accessible under the same fixed path. It
#  150|                    * will create symlinks if necessary to guarantee that. */
#  151|->                 r = (encrypted ? get_encrypted_system_credentials_dir : get_system_credentials_dir)(&p);
#  152|           else
#  153|                   /* Otherwise take the dirs from the env vars we got passed */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
systemd-259/src/debug-generator/debug-generator.c:338:33: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(&*de.d_name, "systemd.unit-dropin."), (long unsigned int)(tilde - <unknown>))’
systemd-259/src/debug-generator/debug-generator.c:365:12: enter_function: entry to ‘run’
systemd-259/src/debug-generator/debug-generator.c:369:9: branch_false: following ‘false’ branch...
systemd-259/src/debug-generator/debug-generator.c:371:13: branch_false: ...to here
systemd-259/src/debug-generator/debug-generator.c:382:9: branch_true: following ‘true’ branch (when ‘__unique_prefix__last26 != 31’)...
systemd-259/src/debug-generator/debug-generator.c:382:9: branch_true: ...to here
systemd-259/src/debug-generator/debug-generator.c:386:12: branch_true: following ‘true’ branch...
systemd-259/src/debug-generator/debug-generator.c:387:17: branch_true: ...to here
systemd-259/src/debug-generator/debug-generator.c:387:17: call_function: calling ‘process_unit_credentials’ from ‘run’
#  336|   
#  337|                           if (!unit_name_is_valid(dropin_unit, UNIT_NAME_ANY)) {
#  338|->                                 log_warning("Invalid unit name '%s' in credential '%s', ignoring.",
#  339|                                               dropin_unit, de->d_name);
#  340|                                   continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
systemd-259/src/fundamental/string-util-fundamental.h:52:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopen(mkostemp_safe(&fn), "we")’
systemd-259/src/test/test-fileio.c:66:1: enter_function: entry to ‘test_read_one_line_file’
systemd-259/src/test/test-fileio.c:72:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:74:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:74:9: acquire_memory: allocated here
systemd-259/src/test/test-fileio.c:74:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:76:9: call_function: inlined call to ‘read_one_line_file’ from ‘test_read_one_line_file’
systemd-259/src/test/test-fileio.c:76:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:77:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:78:9: call_function: inlined call to ‘read_one_line_file’ from ‘test_read_one_line_file’
systemd-259/src/fundamental/string-util-fundamental.h:52:13: danger: ‘fdopen(mkostemp_safe(&fn), "we")’ leaks here; was allocated at [(4)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/3)
#   50|   
#   51|   static inline int strcmp_ptr(const sd_char *a, const sd_char *b) {
#   52|->         if (a && b)
#   53|                   return strcmp(a, b);
#   54|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
systemd-259/src/fundamental/string-util-fundamental.h:104:22: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(&*de.d_name, "systemd.unit-dropin."), (long unsigned int)(tilde - <unknown>))’
systemd-259/src/debug-generator/debug-generator.c:365:12: enter_function: entry to ‘run’
systemd-259/src/debug-generator/debug-generator.c:369:9: branch_false: following ‘false’ branch...
systemd-259/src/debug-generator/debug-generator.c:371:13: branch_false: ...to here
systemd-259/src/debug-generator/debug-generator.c:382:9: branch_true: following ‘true’ branch (when ‘__unique_prefix__last26 != 31’)...
systemd-259/src/debug-generator/debug-generator.c:382:9: branch_true: ...to here
systemd-259/src/debug-generator/debug-generator.c:386:12: branch_true: following ‘true’ branch...
systemd-259/src/debug-generator/debug-generator.c:387:17: branch_true: ...to here
systemd-259/src/debug-generator/debug-generator.c:387:17: call_function: calling ‘process_unit_credentials’ from ‘run’
#  102|   
#  103|   static inline bool isempty(const sd_char *a) {
#  104|->         return !a || a[0] == '\0';
#  105|   }
#  106|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def93]
systemd-259/src/fuzz/fuzz-bootspec.c:57:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘data_to_file(data, (long unsigned int)cunescape_length_with_prefix(sd_json_variant_string(sd_json_variant_by_index(sd_json_variant_by_index(variant,  __unique_prefix_state16.idx), 1)), 18446744073709551615, 0, 3, &data))’
systemd-259/src/fuzz/fuzz-bootspec.c:30:12: enter_function: entry to ‘json_dispatch_entries’
systemd-259/src/fuzz/fuzz-bootspec.c:31:30: branch_false: following ‘false’ branch...
systemd-259/src/fuzz/fuzz-bootspec.c:31:30: branch_false: ...to here
systemd-259/src/fuzz/fuzz-bootspec.c:34:9: branch_true: following ‘true’ branch...
systemd-259/src/fuzz/fuzz-bootspec.c:35:20: branch_false: following ‘false’ branch...
systemd-259/src/fuzz/fuzz-bootspec.c:36:21: branch_false: ...to here
systemd-259/src/fuzz/fuzz-bootspec.c:35:21: branch_false: following ‘false’ branch...
systemd-259/src/fuzz/fuzz-bootspec.c:41:38: branch_false: ...to here
systemd-259/src/fuzz/fuzz-bootspec.c:57:25: call_function: calling ‘data_to_file’ from ‘json_dispatch_entries’
systemd-259/src/fuzz/fuzz-bootspec.c:57:25: return_function: returning to ‘json_dispatch_entries’ from ‘data_to_file’
systemd-259/src/fuzz/fuzz-bootspec.c:57:25: branch_false: following ‘false’ branch...
systemd-259/src/fuzz/fuzz-bootspec.c:59:25: branch_false: ...to here
systemd-259/src/fuzz/fuzz-bootspec.c:59:25: throw: if ‘boot_config_load_type1’ throws an exception...
systemd-259/src/fuzz/fuzz-bootspec.c:57:25: danger: ‘data_to_file(data, (long unsigned int)cunescape_length_with_prefix(sd_json_variant_string(sd_json_variant_by_index(sd_json_variant_by_index(variant,  __unique_prefix_state16.idx), 1)), 18446744073709551615, 0, 3, &data))’ leaks here; was opened at [(12)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/11)
#   55|                   if (len >= 0) {
#   56|                           _cleanup_fclose_ FILE *f = NULL;
#   57|->                         assert_se(f = data_to_file((const uint8_t*) data, len));
#   58|   
#   59|                           assert_se(boot_config_load_type1(config, f, "/", BOOT_ENTRY_ESP, "/entries", id) != -ENOMEM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
systemd-259/src/fuzz/fuzz-bootspec.c:57:25: warning[-Wanalyzer-malloc-leak]: leak of ‘data_to_file(data, (long unsigned int)cunescape_length_with_prefix(sd_json_variant_string(sd_json_variant_by_index(sd_json_variant_by_index(variant,  __unique_prefix_state16.idx), 1)), 18446744073709551615, 0, 3, &data))’
systemd-259/src/fuzz/fuzz-bootspec.c:30:12: enter_function: entry to ‘json_dispatch_entries’
systemd-259/src/fuzz/fuzz-bootspec.c:31:30: branch_false: following ‘false’ branch...
systemd-259/src/fuzz/fuzz-bootspec.c:31:30: branch_false: ...to here
systemd-259/src/fuzz/fuzz-bootspec.c:34:9: branch_true: following ‘true’ branch...
systemd-259/src/fuzz/fuzz-bootspec.c:35:20: branch_false: following ‘false’ branch...
systemd-259/src/fuzz/fuzz-bootspec.c:36:21: branch_false: ...to here
systemd-259/src/fuzz/fuzz-bootspec.c:35:21: branch_false: following ‘false’ branch...
systemd-259/src/fuzz/fuzz-bootspec.c:41:38: branch_false: ...to here
systemd-259/src/fuzz/fuzz-bootspec.c:57:25: call_function: calling ‘data_to_file’ from ‘json_dispatch_entries’
systemd-259/src/fuzz/fuzz-bootspec.c:57:25: return_function: returning to ‘json_dispatch_entries’ from ‘data_to_file’
systemd-259/src/fuzz/fuzz-bootspec.c:57:25: branch_false: following ‘false’ branch...
systemd-259/src/fuzz/fuzz-bootspec.c:59:25: branch_false: ...to here
systemd-259/src/fuzz/fuzz-bootspec.c:59:25: throw: if ‘boot_config_load_type1’ throws an exception...
systemd-259/src/fuzz/fuzz-bootspec.c:57:25: danger: ‘data_to_file(data, (long unsigned int)cunescape_length_with_prefix(sd_json_variant_string(sd_json_variant_by_index(sd_json_variant_by_index(variant,  __unique_prefix_state16.idx), 1)), 18446744073709551615, 0, 3, &data))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/11)
#   55|                   if (len >= 0) {
#   56|                           _cleanup_fclose_ FILE *f = NULL;
#   57|->                         assert_se(f = data_to_file((const uint8_t*) data, len));
#   58|   
#   59|                           assert_se(boot_config_load_type1(config, f, "/", BOOT_ENTRY_ESP, "/entries", id) != -ENOMEM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
systemd-259/src/import/export-tar.c:68:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(464)’
systemd-259/src/import/export-tar.c:88:5: enter_function: entry to ‘tar_export_new’
systemd-259/src/import/export-tar.c:97:9: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:99:13: call_function: inlined call to ‘malloc_multiply’ from ‘tar_export_new’
systemd-259/src/import/export-tar.c:100:12: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:103:9: branch_false: ...to here
systemd-259/src/import/export-tar.c:116:12: branch_true: following ‘true’ branch (when ‘event’ is non-NULL)...
systemd-259/src/import/export-tar.c:117:28: branch_true: ...to here
systemd-259/src/import/export-tar.c:117:28: throw: if ‘sd_event_ref’ throws an exception...
systemd-259/src/import/export-tar.c:94:49: call_function: inlined call to ‘tar_export_unrefp’ from ‘tar_export_new’
#   66|                   return NULL;
#   67|   
#   68|->         sd_event_source_unref(e->output_event_source);
#   69|   
#   70|           pidref_done_sigkill_wait(&e->tar_pid);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
systemd-259/src/import/export-tar.c:119:21: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(464)’
systemd-259/src/import/export-tar.c:88:5: enter_function: entry to ‘tar_export_new’
systemd-259/src/import/export-tar.c:97:9: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:99:13: call_function: inlined call to ‘malloc_multiply’ from ‘tar_export_new’
systemd-259/src/import/export-tar.c:100:12: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:103:9: branch_false: ...to here
systemd-259/src/import/export-tar.c:116:12: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
systemd-259/src/import/export-tar.c:119:21: branch_false: ...to here
systemd-259/src/import/export-tar.c:119:21: throw: if ‘sd_event_default’ throws an exception...
systemd-259/src/import/export-tar.c:94:49: call_function: inlined call to ‘tar_export_unrefp’ from ‘tar_export_new’
#  117|                   e->event = sd_event_ref(event);
#  118|           else {
#  119|->                 r = sd_event_default(&e->event);
#  120|                   if (r < 0)
#  121|                           return r;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def97]
systemd-259/src/import/export-tar.c:366:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(p, 2686976)’
systemd-259/src/import/export-tar.c:281:5: enter_function: entry to ‘tar_export_start’
systemd-259/src/import/export-tar.c:291:9: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:292:9: branch_false: ...to here
systemd-259/src/import/export-tar.c:292:9: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:293:9: branch_false: ...to here
systemd-259/src/import/export-tar.c:293:9: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:294:9: branch_false: ...to here
systemd-259/src/import/export-tar.c:294:9: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:295:9: branch_false: ...to here
systemd-259/src/import/export-tar.c:295:9: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:297:13: branch_false: ...to here
systemd-259/src/import/export-tar.c:297:12: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:300:15: branch_false: ...to here
systemd-259/src/import/export-tar.c:301:12: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:304:13: branch_false: ...to here
systemd-259/src/import/export-tar.c:304:12: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:307:13: branch_false: ...to here
systemd-259/src/import/export-tar.c:308:12: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:311:13: branch_false: ...to here
systemd-259/src/import/export-tar.c:312:12: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:315:9: branch_false: ...to here
systemd-259/src/import/export-tar.c:340:12: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:343:13: branch_false: ...to here
systemd-259/src/import/export-tar.c:351:12: branch_false: following ‘false’ branch (when ‘r >= 0’)...
systemd-259/src/import/export-tar.c:354:25: branch_false: ...to here
systemd-259/src/import/export-tar.c:356:12: branch_true: following ‘true’ branch...
systemd-259/src/import/export-tar.c:357:21: branch_true: ...to here
systemd-259/src/import/export-tar.c:358:20: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:361:52: branch_false: ...to here
systemd-259/src/import/export-tar.c:361:52: acquire_resource: opened here
systemd-259/src/import/export-tar.c:362:20: branch_false: following ‘false’ branch...
systemd-259/src/import/export-tar.c:365:37: branch_false: ...to here
systemd-259/src/import/export-tar.c:366:21: throw: if ‘mountfsd_mount_directory_fd’ throws an exception...
systemd-259/src/import/export-tar.c:365:37: call_function: inlined call to ‘closep’ from ‘tar_export_start’
systemd-259/src/import/export-tar.c:366:21: danger: ‘open(p, 2686976)’ leaks here; was opened at [(30)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/29)
#  364|   
#  365|                   _cleanup_close_ int mapped_fd = -EBADF;
#  366|->                 r = mountfsd_mount_directory_fd(directory_fd, e->userns_fd, DISSECT_IMAGE_FOREIGN_UID, &mapped_fd);
#  367|                   if (r < 0)
#  368|                           return r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
systemd-259/src/import/import-common.c:207:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&*<unknown>.d_name)’
systemd-259/src/import/import-common.c:163:9: branch_false: following ‘false’ branch...
systemd-259/src/import/import-common.c:165:13: branch_false: ...to here
systemd-259/src/import/import-common.c:173:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-common.c:176:13: branch_false: ...to here
systemd-259/src/import/import-common.c:177:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-common.c:179:12: branch_false: ...to here
systemd-259/src/import/import-common.c:179:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-common.c:184:9: branch_false: ...to here
systemd-259/src/import/import-common.c:187:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-common.c:190:9: branch_false: ...to here
systemd-259/src/import/import-common.c:192:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-common.c:200:24: branch_false: ...to here
systemd-259/src/import/import-common.c:200:17: acquire_memory: allocated here
systemd-259/src/import/import-common.c:201:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-common.c:204:9: branch_false: ...to here
systemd-259/src/import/import-common.c:206:12: branch_true: following ‘true’ branch...
systemd-259/src/import/import-common.c:207:17: branch_true: ...to here
systemd-259/src/import/import-common.c:207:17: branch_true: following ‘true’ branch...
systemd-259/src/import/import-common.c:207:17: branch_true: ...to here
systemd-259/src/import/import-common.c:207:17: throw: if ‘log_internal’ throws an exception...
systemd-259/src/import/import-common.c:207:17: danger: ‘strdup(&*<unknown>.d_name)’ leaks here; was allocated at [(13)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/12)
#  205|           dent = readdir_no_dot(d);
#  206|           if (dent) {
#  207|->                 log_debug("Directory '%s' does not look like an OS tree, and has multiple children, leaving as it is.", path);
#  208|                   return 0;
#  209|           } else if (errno != 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
systemd-259/src/import/import-raw.c:121:28: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131656)’
systemd-259/src/import/import-raw.c:86:5: enter_function: entry to ‘raw_import_new’
systemd-259/src/import/import-raw.c:97:9: branch_false: following ‘false’ branch...
systemd-259/src/import/import-raw.c:98:9: branch_false: ...to here
systemd-259/src/import/import-raw.c:98:9: branch_false: following ‘false’ branch...
systemd-259/src/import/import-raw.c:100:16: branch_false: ...to here
systemd-259/src/import/import-raw.c:101:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-raw.c:104:13: call_function: inlined call to ‘malloc_multiply’ from ‘raw_import_new’
systemd-259/src/import/import-raw.c:105:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-raw.c:108:9: branch_false: ...to here
systemd-259/src/import/import-raw.c:120:12: branch_true: following ‘true’ branch (when ‘event’ is non-NULL)...
systemd-259/src/import/import-raw.c:121:28: branch_true: ...to here
systemd-259/src/import/import-raw.c:121:28: throw: if ‘sd_event_ref’ throws an exception...
systemd-259/src/import/import-raw.c:121:28: danger: ‘malloc(131656)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8)
#  119|   
#  120|           if (event)
#  121|->                 i->event = sd_event_ref(event);
#  122|           else {
#  123|                   r = sd_event_default(&i->event);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
systemd-259/src/import/import-raw.c:123:21: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131656)’
systemd-259/src/import/import-raw.c:86:5: enter_function: entry to ‘raw_import_new’
systemd-259/src/import/import-raw.c:97:9: branch_false: following ‘false’ branch...
systemd-259/src/import/import-raw.c:98:9: branch_false: ...to here
systemd-259/src/import/import-raw.c:98:9: branch_false: following ‘false’ branch...
systemd-259/src/import/import-raw.c:100:16: branch_false: ...to here
systemd-259/src/import/import-raw.c:101:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-raw.c:104:13: call_function: inlined call to ‘malloc_multiply’ from ‘raw_import_new’
systemd-259/src/import/import-raw.c:105:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-raw.c:108:9: branch_false: ...to here
systemd-259/src/import/import-raw.c:120:12: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
systemd-259/src/import/import-raw.c:123:21: branch_false: ...to here
systemd-259/src/import/import-raw.c:123:21: throw: if ‘sd_event_default’ throws an exception...
systemd-259/src/import/import-raw.c:123:21: danger: ‘malloc(131656)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8)
#  121|                   i->event = sd_event_ref(event);
#  122|           else {
#  123|->                 r = sd_event_default(&i->event);
#  124|                   if (r < 0)
#  125|                           return r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
systemd-259/src/import/import-tar.c:133:28: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131520)’
systemd-259/src/import/import-tar.c:97:5: enter_function: entry to ‘tar_import_new’
systemd-259/src/import/import-tar.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/import/import-tar.c:109:9: branch_false: ...to here
systemd-259/src/import/import-tar.c:109:9: branch_false: following ‘false’ branch...
systemd-259/src/import/import-tar.c:111:16: branch_false: ...to here
systemd-259/src/import/import-tar.c:112:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-tar.c:115:13: call_function: inlined call to ‘malloc_multiply’ from ‘tar_import_new’
systemd-259/src/import/import-tar.c:116:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-tar.c:119:9: branch_false: ...to here
systemd-259/src/import/import-tar.c:132:12: branch_true: following ‘true’ branch (when ‘event’ is non-NULL)...
systemd-259/src/import/import-tar.c:133:28: branch_true: ...to here
systemd-259/src/import/import-tar.c:133:28: throw: if ‘sd_event_ref’ throws an exception...
systemd-259/src/import/import-tar.c:133:28: danger: ‘malloc(131520)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  131|   
#  132|           if (event)
#  133|->                 i->event = sd_event_ref(event);
#  134|           else {
#  135|                   r = sd_event_default(&i->event);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
systemd-259/src/import/import-tar.c:135:21: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(131520)’
systemd-259/src/import/import-tar.c:97:5: enter_function: entry to ‘tar_import_new’
systemd-259/src/import/import-tar.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/import/import-tar.c:109:9: branch_false: ...to here
systemd-259/src/import/import-tar.c:109:9: branch_false: following ‘false’ branch...
systemd-259/src/import/import-tar.c:111:16: branch_false: ...to here
systemd-259/src/import/import-tar.c:112:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-tar.c:115:13: call_function: inlined call to ‘malloc_multiply’ from ‘tar_import_new’
systemd-259/src/import/import-tar.c:116:12: branch_false: following ‘false’ branch...
systemd-259/src/import/import-tar.c:119:9: branch_false: ...to here
systemd-259/src/import/import-tar.c:132:12: branch_false: following ‘false’ branch (when ‘event’ is NULL)...
systemd-259/src/import/import-tar.c:135:21: branch_false: ...to here
systemd-259/src/import/import-tar.c:135:21: throw: if ‘sd_event_default’ throws an exception...
systemd-259/src/import/import-tar.c:135:21: danger: ‘malloc(131520)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  133|                   i->event = sd_event_ref(event);
#  134|           else {
#  135|->                 r = sd_event_default(&i->event);
#  136|                   if (r < 0)
#  137|                           return r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
systemd-259/src/import/importd.c:705:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(72)’
systemd-259/src/import/importd.c:689:12: enter_function: entry to ‘manager_new’
systemd-259/src/import/importd.c:693:9: branch_false: following ‘false’ branch...
systemd-259/src/import/importd.c:695:13: call_function: inlined call to ‘malloc_multiply’ from ‘manager_new’
systemd-259/src/import/importd.c:696:12: branch_false: following ‘false’ branch...
systemd-259/src/import/importd.c:699:9: branch_false: ...to here
systemd-259/src/import/importd.c:705:13: throw: if ‘sd_event_default’ throws an exception...
systemd-259/src/import/importd.c:690:44: call_function: inlined call to ‘manager_unrefp’ from ‘manager_new’
#  703|           };
#  704|   
#  705|->         r = sd_event_default(&m->event);
#  706|           if (r < 0)
#  707|                   return r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
systemd-259/src/import/pull-job.c:713:31: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(568)’
systemd-259/src/import/pull-job.c:685:5: enter_function: entry to ‘pull_job_new’
systemd-259/src/import/pull-job.c:694:9: branch_false: following ‘false’ branch...
systemd-259/src/import/pull-job.c:695:9: branch_false: ...to here
systemd-259/src/import/pull-job.c:695:9: branch_false: following ‘false’ branch...
systemd-259/src/import/pull-job.c:696:9: branch_false: ...to here
systemd-259/src/import/pull-job.c:696:9: branch_false: following ‘false’ branch...
systemd-259/src/import/pull-job.c:698:13: branch_false: ...to here
systemd-259/src/import/pull-job.c:699:12: branch_false: following ‘false’ branch...
systemd-259/src/import/pull-job.c:702:13: call_function: inlined call to ‘malloc_multiply’ from ‘pull_job_new’
systemd-259/src/import/pull-job.c:703:12: branch_false: following ‘false’ branch...
systemd-259/src/import/pull-job.c:713:31: branch_false: ...to here
systemd-259/src/import/pull-job.c:713:31: throw: if ‘now’ throws an exception...
systemd-259/src/import/pull-job.c:713:31: danger: ‘malloc(568)’ leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  711|                   .glue = glue,
#  712|                   .content_length = UINT64_MAX,
#  713|->                 .start_usec = now(CLOCK_MONOTONIC),
#  714|                   .compressed_max = 64LLU * 1024LLU * 1024LLU * 1024LLU, /* 64GB safety limit */
#  715|                   .uncompressed_max = 64LLU * 1024LLU * 1024LLU * 1024LLU, /* 64GB safety limit */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def105]
systemd-259/src/import/test-tar-extract.c:26:41: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(argv[1], 524288)’
systemd-259/src/import/test-tar-extract.c:14:12: branch_false: following ‘false’ branch (when ‘argc == 3’)...
systemd-259/src/import/test-tar-extract.c:18:13: branch_false: ...to here
systemd-259/src/import/test-tar-extract.c:19:12: branch_false: following ‘false’ branch...
systemd-259/src/import/test-tar-extract.c:22:40: branch_false: ...to here
systemd-259/src/import/test-tar-extract.c:22:40: acquire_resource: opened here
systemd-259/src/import/test-tar-extract.c:23:12: branch_false: following ‘false’ branch...
systemd-259/src/import/test-tar-extract.c:26:41: branch_false: ...to here
systemd-259/src/import/test-tar-extract.c:27:12: branch_true: following ‘true’ branch...
systemd-259/src/import/test-tar-extract.c:28:24: branch_true: ...to here
systemd-259/src/import/test-tar-extract.c:28:24: branch_true: following ‘true’ branch...
systemd-259/src/import/test-tar-extract.c:28:24: branch_true: ...to here
systemd-259/src/import/test-tar-extract.c:26:41: danger: ‘open(argv[1], 524288)’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   24|                   return log_error_errno(input_fd, "Cannot open %s: %m", argv[1]);
#   25|   
#   26|->         _cleanup_close_ int output_fd = open(argv[2], O_DIRECTORY | O_CLOEXEC);
#   27|           if (output_fd < 0)
#   28|                   return log_error_errno(output_fd, "Cannot open %s: %m", argv[2]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def106]
systemd-259/src/journal-remote/journal-remote-main.c:134:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘<Uebe0>[1]’
systemd-259/src/journal-remote/journal-remote-main.c:646:12: enter_function: entry to ‘create_remoteserver’
systemd-259/src/journal-remote/journal-remote-main.c:660:12: branch_false: following ‘false’ branch...
systemd-259/src/journal-remote/journal-remote-main.c:663:13: branch_false: ...to here
systemd-259/src/journal-remote/journal-remote-main.c:664:12: branch_false: following ‘false’ branch...
systemd-259/src/journal-remote/journal-remote-main.c:667:13: branch_false: ...to here
systemd-259/src/journal-remote/journal-remote-main.c:668:12: branch_false: following ‘false’ branch...
systemd-259/src/journal-remote/journal-remote-main.c:671:17: branch_false: ...to here
systemd-259/src/journal-remote/journal-remote-main.c:673:12: branch_false: following ‘false’ branch...
systemd-259/src/journal-remote/journal-remote-main.c:673:12: branch_false: ...to here
systemd-259/src/journal-remote/journal-remote-main.c:716:12: branch_true: following ‘true’ branch...
systemd-259/src/journal-remote/journal-remote-main.c:719:22: branch_true: ...to here
systemd-259/src/journal-remote/journal-remote-main.c:719:20: branch_false: following ‘false’ branch...
systemd-259/src/journal-remote/journal-remote-main.c:725:31: branch_false: ...to here
systemd-259/src/journal-remote/journal-remote-main.c:725:31: branch_false: following ‘false’ branch...
systemd-259/src/journal-remote/journal-remote-main.c:725:31: branch_false: ...to here
systemd-259/src/journal-remote/journal-remote-main.c:725:31: call_function: calling ‘memcpy_safe’ from ‘create_remoteserver’
systemd-259/src/journal-remote/journal-remote-main.c:725:31: return_function: returning to ‘create_remoteserver’ from ‘memcpy_safe’
systemd-259/src/journal-remote/journal-remote-main.c:727:17: branch_false: following ‘false’ branch...
systemd-259/src/journal-remote/journal-remote-main.c:728:22: branch_false: ...to here
systemd-259/src/journal-remote/journal-remote-main.c:728:22: call_function: calling ‘spawn_curl’ from ‘create_remoteserver’
#  132|                   return log_error_errno(errno, "Failed to create pager pipe: %m");
#  133|   
#  134|->         r = safe_fork_full("(remote)",
#  135|                              (int[]) {STDIN_FILENO, fd[1], STDERR_FILENO },
#  136|                              NULL, 0,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
systemd-259/src/journal/journalctl-misc.c:325:29: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*de.d_name, (long unsigned int)(e - &de_38->d_name))’
systemd-259/src/journal/journalctl-misc.c:288:9: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:290:13: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:291:12: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:294:17: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:295:12: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:298:16: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:300:9: branch_true: following ‘true’ branch (when ‘dir’ is non-NULL)...
systemd-259/src/journal/journalctl-misc.c:304:24: branch_true: ...to here
systemd-259/src/journal/journalctl-misc.c:305:20: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:308:24: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:314:17: branch_false: following ‘false’ branch (when ‘de’ is non-NULL)...
systemd-259/src/journal/journalctl-misc.c:314:17: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:317:28: branch_false: following ‘false’ branch (when ‘e’ is non-NULL)...
systemd-259/src/journal/journalctl-misc.c:320:72: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:320:52: acquire_memory: allocated here
systemd-259/src/journal/journalctl-misc.c:321:28: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:324:36: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:325:29: throw: if ‘sd_id128_from_string’ throws an exception...
systemd-259/src/journal/journalctl-misc.c:325:29: danger: ‘strndup(&*de.d_name, (long unsigned int)(e - &de_38->d_name))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/15)
#  323|   
#  324|                           sd_id128_t id;
#  325|->                         r = sd_id128_from_string(ids, &id);
#  326|                           if (r < 0)
#  327|                                   continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
systemd-259/src/journal/journalctl-misc.c:334:30: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*de.d_name, (long unsigned int)(e - &de_38->d_name))’
systemd-259/src/journal/journalctl-misc.c:288:9: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:290:13: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:291:12: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:294:17: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:295:12: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:298:16: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:300:9: branch_true: following ‘true’ branch (when ‘dir’ is non-NULL)...
systemd-259/src/journal/journalctl-misc.c:304:24: branch_true: ...to here
systemd-259/src/journal/journalctl-misc.c:305:20: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:308:24: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:314:17: branch_false: following ‘false’ branch (when ‘de’ is non-NULL)...
systemd-259/src/journal/journalctl-misc.c:314:17: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:320:52: acquire_memory: allocated here
systemd-259/src/journal/journalctl-misc.c:321:28: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:324:36: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:334:30: throw: if ‘log_namespace_name_valid’ throws an exception...
systemd-259/src/journal/journalctl-misc.c:334:30: danger: ‘strndup(&*de.d_name, (long unsigned int)(e - &de_38->d_name))’ leaks here; was allocated at [(14)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/13)
#  332|                           e++;
#  333|   
#  334|->                         if (!log_namespace_name_valid(e))
#  335|                                   continue;
#  336|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
systemd-259/src/journal/journalctl-misc.c:337:29: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*de.d_name, (long unsigned int)(e - &de_38->d_name))’
systemd-259/src/journal/journalctl-misc.c:283:5: enter_function: entry to ‘action_list_namespaces’
systemd-259/src/journal/journalctl-misc.c:288:9: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:290:13: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:291:12: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:294:17: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:295:12: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:298:16: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:300:9: branch_true: following ‘true’ branch (when ‘dir’ is non-NULL)...
systemd-259/src/journal/journalctl-misc.c:304:24: branch_true: ...to here
systemd-259/src/journal/journalctl-misc.c:305:20: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:308:24: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:314:17: branch_false: following ‘false’ branch (when ‘de’ is non-NULL)...
systemd-259/src/journal/journalctl-misc.c:314:17: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:320:52: acquire_memory: allocated here
systemd-259/src/journal/journalctl-misc.c:321:28: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:324:36: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:337:29: call_function: calling ‘table_add_cell’ from ‘action_list_namespaces’
systemd-259/src/journal/journalctl-misc.c:337:29: danger: ‘strndup(&*de.d_name, (long unsigned int)(e - &de_38->d_name))’ leaks here; was allocated at [(15)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/14)
#  335|                                   continue;
#  336|   
#  337|->                         r = table_add_cell(table, NULL, TABLE_STRING, e);
#  338|                           if (r < 0)
#  339|                                   return table_log_add_error(r);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
systemd-259/src/journal/journalctl-misc.c:339:40: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*de.d_name, (long unsigned int)(e - &de_38->d_name))’
systemd-259/src/journal/journalctl-misc.c:288:9: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:290:13: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:291:12: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:294:17: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:295:12: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:298:16: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:300:9: branch_true: following ‘true’ branch (when ‘dir’ is non-NULL)...
systemd-259/src/journal/journalctl-misc.c:304:24: branch_true: ...to here
systemd-259/src/journal/journalctl-misc.c:305:20: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:308:24: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:320:52: acquire_memory: allocated here
systemd-259/src/journal/journalctl-misc.c:321:28: branch_false: following ‘false’ branch...
systemd-259/src/journal/journalctl-misc.c:324:36: branch_false: ...to here
systemd-259/src/journal/journalctl-misc.c:339:40: branch_true: following ‘true’ branch...
systemd-259/src/journal/journalctl-misc.c:339:40: branch_true: ...to here
systemd-259/src/journal/journalctl-misc.c:339:40: throw: if ‘log_internal’ throws an exception...
systemd-259/src/journal/journalctl-misc.c:339:40: danger: ‘strndup(&*de.d_name, (long unsigned int)(e - &de_38->d_name))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/11)
#  337|                           r = table_add_cell(table, NULL, TABLE_STRING, e);
#  338|                           if (r < 0)
#  339|->                                 return table_log_add_error(r);
#  340|                   }
#  341|           }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def111]
systemd-259/src/libsystemd/sd-bus/test-bus-peersockaddr.c:149:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socket(1, 524289, 0)’
systemd-259/src/libsystemd/sd-bus/test-bus-peersockaddr.c:147:9: acquire_resource: socket created here
systemd-259/src/libsystemd/sd-bus/test-bus-peersockaddr.c:147:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-peersockaddr.c:148:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-peersockaddr.c:148:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-peersockaddr.c:149:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-peersockaddr.c:149:9: branch_true: following ‘true’ branch (when ‘_result < 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-peersockaddr.c:149:9: branch_true: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-peersockaddr.c:149:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/libsystemd/sd-bus/test-bus-peersockaddr.c:149:9: danger: ‘socket(1, 524289, 0)’ leaks here
#  147|           ASSERT_OK_ERRNO(fd = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0));
#  148|           ASSERT_OK_ERRNO(bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path))); /* force auto-bind */
#  149|->         ASSERT_OK_ERRNO(listen(fd, 1));
#  150|   
#  151|           salen = sizeof(sa);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def112]
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:86:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socket(1, 524289, 0)’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:47:14: enter_function: entry to ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:59:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:60:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:62:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:63:9: call_function: inlined call to ‘random_u64’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:63:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:64:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:64:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:65:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:67:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:68:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:68:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:69:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:71:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:72:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:72:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:73:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:77:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:78:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:80:14: acquire_resource: socket created here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:83:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:83:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:84:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:86:9: branch_true: following ‘true’ branch (when ‘_result < 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:86:9: branch_true: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:86:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:86:9: danger: ‘socket(1, 524289, 0)’ leaks here
#   84|           usleep_safe(100 * USEC_PER_MSEC);
#   85|   
#   86|->         ASSERT_OK_ERRNO(listen(fd, SOMAXCONN_DELUXE));
#   87|           usleep_safe(100 * USEC_PER_MSEC);
#   88|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def113]
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:89:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socket(1, 524289, 0)’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:47:14: enter_function: entry to ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:59:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:60:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:62:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:63:9: call_function: inlined call to ‘random_u64’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:63:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:64:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:64:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:65:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:67:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:68:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:68:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:69:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:71:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:72:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:72:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:73:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:77:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:78:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:80:14: acquire_resource: socket created here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:83:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:83:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:84:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:86:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:87:9: call_function: inlined call to ‘usleep_safe’ from ‘thread_server’
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:89:9: throw: if ‘touch’ throws an exception...
systemd-259/src/libsystemd/sd-bus/test-bus-watch-bind.c:89:9: danger: ‘socket(1, 524289, 0)’ leaks here
#   87|           usleep_safe(100 * USEC_PER_MSEC);
#   88|   
#   89|->         ASSERT_OK(touch(path));
#   90|           usleep_safe(100 * USEC_PER_MSEC);
#   91|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def114]
systemd-259/src/libsystemd/sd-journal/catalog.c:213:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(format_proc_fd_path(&<U1688>,  fd), "re")’
systemd-259/src/libsystemd/sd-journal/catalog.c:443:5: enter_function: entry to ‘catalog_update’
systemd-259/src/libsystemd/sd-journal/catalog.c:446:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/catalog.c:448:12: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/catalog.c:457:12: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/catalog.c:460:56: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/catalog.c:461:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/catalog.c:461:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/catalog.c:461:9: branch_true: following ‘true’ branch...
systemd-259/src/libsystemd/sd-journal/catalog.c:462:27: branch_true: ...to here
systemd-259/src/libsystemd/sd-journal/catalog.c:464:17: branch_true: following ‘true’ branch...
systemd-259/src/libsystemd/sd-journal/catalog.c:464:17: branch_true: ...to here
systemd-259/src/libsystemd/sd-journal/catalog.c:465:21: call_function: calling ‘catalog_import_file’ from ‘catalog_update’
#  211|   
#  212|   int catalog_file_lang(const char *filename, char **ret) {
#  213|->         assert(filename);
#  214|           assert(ret);
#  215|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
systemd-259/src/libsystemd/sd-journal/catalog.c:213:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(format_proc_fd_path(&<U1688>,  fd), "re")’
systemd-259/src/libsystemd/sd-journal/catalog.c:443:5: enter_function: entry to ‘catalog_update’
systemd-259/src/libsystemd/sd-journal/catalog.c:446:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/catalog.c:448:12: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/catalog.c:457:12: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/catalog.c:460:56: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/catalog.c:461:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/catalog.c:461:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/catalog.c:461:9: branch_true: following ‘true’ branch...
systemd-259/src/libsystemd/sd-journal/catalog.c:462:27: branch_true: ...to here
systemd-259/src/libsystemd/sd-journal/catalog.c:464:17: branch_true: following ‘true’ branch...
systemd-259/src/libsystemd/sd-journal/catalog.c:464:17: branch_true: ...to here
systemd-259/src/libsystemd/sd-journal/catalog.c:465:21: call_function: calling ‘catalog_import_file’ from ‘catalog_update’
#  211|   
#  212|   int catalog_file_lang(const char *filename, char **ret) {
#  213|->         assert(filename);
#  214|           assert(ret);
#  215|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
systemd-259/src/libsystemd/sd-journal/journal-file.c:4355:16: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(p, "user-"), (long unsigned int)(endswith_internal(<unknown>, ".journal") - <unknown>))’
systemd-259/src/libsystemd/sd-journal/journal-file.c:4331:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/journal-file.c:4332:9: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/journal-file.c:4332:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/journal-file.c:4334:13: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/journal-file.c:4335:12: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/journal-file.c:4337:12: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/journal-file.c:4337:12: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/journal-file.c:4340:13: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/journal-file.c:4341:12: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/journal-file.c:4343:13: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/journal-file.c:4344:12: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/journal-file.c:4347:14: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/journal-file.c:4348:12: branch_false: following ‘false’ branch (when ‘at’ is NULL)...
systemd-259/src/libsystemd/sd-journal/journal-file.c:4351:26: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/journal-file.c:4351:15: acquire_memory: allocated here
systemd-259/src/libsystemd/sd-journal/journal-file.c:4352:12: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-journal/journal-file.c:4355:16: branch_false: ...to here
systemd-259/src/libsystemd/sd-journal/journal-file.c:4355:16: throw: if ‘parse_uid’ throws an exception...
systemd-259/src/libsystemd/sd-journal/journal-file.c:4355:16: danger: ‘strndup(startswith_internal(p, "user-"), (long unsigned int)(endswith_internal(<unknown>, ".journal") - <unknown>))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/15)
# 4353|                   return -ENOMEM;
# 4354|   
# 4355|->         return parse_uid(buf, ret_uid);
# 4356|   }
# 4357|   

Error: CPPCHECK_WARNING (CWE-457): [#def117]
systemd-259/src/libsystemd/sd-json/json-util.c:261: error[uninitvar]: Uninitialized variable: i
#  259|           JSON_VARIANT_ARRAY_FOREACH(i, variant) {
#  260|                   const char *a;
#  261|->                 r = json_dispatch_const_path(name, i, flags, &a);
#  262|                   if (r < 0)
#  263|                           return r;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def118]
systemd-259/src/libsystemd/sd-json/json-util.c:341:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘version’
systemd-259/src/libsystemd/sd-json/json-util.c:330:5: enter_function: entry to ‘json_dispatch_version’
systemd-259/src/libsystemd/sd-json/json-util.c:331:20: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-json/json-util.c:332:21: branch_false: ...to here
systemd-259/src/libsystemd/sd-json/json-util.c:335:9: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-json/json-util.c:337:13: branch_false: ...to here
systemd-259/src/libsystemd/sd-json/json-util.c:337:13: call_function: calling ‘json_dispatch_const_version’ from ‘json_dispatch_version’
systemd-259/src/libsystemd/sd-json/json-util.c:337:13: return_function: returning to ‘json_dispatch_version’ from ‘json_dispatch_const_version’
systemd-259/src/libsystemd/sd-json/json-util.c:338:12: branch_false: following ‘false’ branch...
systemd-259/src/libsystemd/sd-json/json-util.c:341:13: branch_false: ...to here
systemd-259/src/libsystemd/sd-json/json-util.c:341:13: danger: use of uninitialized value ‘version’ here
#  339|                   return r;
#  340|   
#  341|->         if (free_and_strdup(n, version) < 0)
#  342|                   return json_log_oom(variant, flags);
#  343|   

Error: CPPCHECK_WARNING (CWE-457): [#def119]
systemd-259/src/libsystemd/sd-json/json-util.c:611: error[uninitvar]: Uninitialized variable: i
#  609|                   const char *e;
#  610|   
#  611|->                 if (!sd_json_variant_is_string(i))
#  612|                           return json_log(variant, flags, SYNTHETIC_ERRNO(EINVAL), "JSON field '%s' is not an array of strings.", strna(name));
#  613|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def120]
systemd-259/src/locale/localectl.c:324:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path_extend_internal(0, xkb_directory(), "rules/base.lst", 18446744073709551615), "re")’
systemd-259/src/locale/localectl.c:315:12: branch_false: following ‘false’ branch...
systemd-259/src/locale/localectl.c:318:13: branch_false: ...to here
systemd-259/src/locale/localectl.c:318:13: acquire_resource: opened here
systemd-259/src/locale/localectl.c:319:12: branch_false: following ‘false’ branch...
systemd-259/src/locale/localectl.c:324:13: branch_false: ...to here
systemd-259/src/locale/localectl.c:324:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
systemd-259/src/locale/localectl.c:326:18: branch_false: ...to here
systemd-259/src/locale/localectl.c:326:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
systemd-259/src/locale/localectl.c:328:18: branch_false: ...to here
systemd-259/src/locale/localectl.c:328:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
systemd-259/src/locale/localectl.c:330:18: branch_false: ...to here
systemd-259/src/locale/localectl.c:330:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
systemd-259/src/locale/localectl.c:333:17: branch_false: ...to here
systemd-259/src/locale/localectl.c:333:17: throw: if ‘log_assert_failed_unreachable’ throws an exception...
systemd-259/src/locale/localectl.c:324:13: danger: ‘fopen(path_extend_internal(0, xkb_directory(), "rules/base.lst", 18446744073709551615), "re")’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  322|                                          xkb_base);
#  323|   
#  324|->         if (streq(argv[0], "list-x11-keymap-models"))
#  325|                   look_for = MODELS;
#  326|           else if (streq(argv[0], "list-x11-keymap-layouts"))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
systemd-259/src/locale/localectl.c:324:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path_extend_internal(0, xkb_directory(), "rules/base.lst", 18446744073709551615), "re")’
systemd-259/src/locale/localectl.c:315:12: branch_false: following ‘false’ branch...
systemd-259/src/locale/localectl.c:318:13: branch_false: ...to here
systemd-259/src/locale/localectl.c:318:13: acquire_memory: allocated here
systemd-259/src/locale/localectl.c:319:12: branch_false: following ‘false’ branch...
systemd-259/src/locale/localectl.c:324:13: branch_false: ...to here
systemd-259/src/locale/localectl.c:324:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
systemd-259/src/locale/localectl.c:326:18: branch_false: ...to here
systemd-259/src/locale/localectl.c:326:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
systemd-259/src/locale/localectl.c:328:18: branch_false: ...to here
systemd-259/src/locale/localectl.c:328:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
systemd-259/src/locale/localectl.c:330:18: branch_false: ...to here
systemd-259/src/locale/localectl.c:330:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
systemd-259/src/locale/localectl.c:333:17: branch_false: ...to here
systemd-259/src/locale/localectl.c:333:17: throw: if ‘log_assert_failed_unreachable’ throws an exception...
systemd-259/src/locale/localectl.c:324:13: danger: ‘fopen(path_extend_internal(0, xkb_directory(), "rules/base.lst", 18446744073709551615), "re")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  322|                                          xkb_base);
#  323|   
#  324|->         if (streq(argv[0], "list-x11-keymap-models"))
#  325|                   look_for = MODELS;
#  326|           else if (streq(argv[0], "list-x11-keymap-layouts"))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
systemd-259/src/machine/machined-varlink.c:144:19: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(name, "vu-"), (long unsigned int)(d - <unknown>))’
systemd-259/src/machine/machined-varlink.c:115:12: enter_function: entry to ‘user_lookup_name’
systemd-259/src/machine/machined-varlink.c:122:9: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:123:9: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:123:9: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:124:9: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:124:9: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:126:14: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:126:12: branch_true: following ‘true’ branch...
systemd-259/src/machine/machined-varlink.c:129:13: branch_true: ...to here
systemd-259/src/machine/machined-varlink.c:130:12: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:133:13: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:134:12: branch_false: following ‘false’ branch (when ‘d’ is non-NULL)...
systemd-259/src/machine/machined-varlink.c:137:13: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:137:12: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:140:25: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:140:14: acquire_memory: allocated here
systemd-259/src/machine/machined-varlink.c:141:12: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:144:19: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:144:19: call_function: inlined call to ‘hashmap_get’ from ‘user_lookup_name’
systemd-259/src/machine/machined-varlink.c:144:19: danger: ‘strndup(startswith_internal(name, "vu-"), (long unsigned int)(d - <unknown>))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/15)
#  142|                   return -ENOMEM;
#  143|   
#  144|->         machine = hashmap_get(m->machines, mn);
#  145|           if (!machine)
#  146|                   return -ESRCH;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
systemd-259/src/machine/machined-varlink.c:310:19: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(name, "vg-"), (long unsigned int)(d - <unknown>))’
systemd-259/src/machine/machined-varlink.c:281:12: enter_function: entry to ‘group_lookup_name’
systemd-259/src/machine/machined-varlink.c:288:9: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:289:9: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:289:9: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:290:9: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:290:9: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:292:14: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:292:12: branch_true: following ‘true’ branch...
systemd-259/src/machine/machined-varlink.c:295:13: branch_true: ...to here
systemd-259/src/machine/machined-varlink.c:296:12: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:299:13: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:300:12: branch_false: following ‘false’ branch (when ‘d’ is non-NULL)...
systemd-259/src/machine/machined-varlink.c:303:13: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:303:12: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:306:25: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:306:14: acquire_memory: allocated here
systemd-259/src/machine/machined-varlink.c:307:12: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined-varlink.c:310:19: branch_false: ...to here
systemd-259/src/machine/machined-varlink.c:310:19: call_function: inlined call to ‘hashmap_get’ from ‘group_lookup_name’
systemd-259/src/machine/machined-varlink.c:310:19: danger: ‘strndup(startswith_internal(name, "vg-"), (long unsigned int)(d - <unknown>))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/15)
#  308|                   return -ENOMEM;
#  309|   
#  310|->         machine = hashmap_get(m->machines, mn);
#  311|           if (!machine)
#  312|                   return -ESRCH;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
systemd-259/src/machine/machined.c:57:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(160)’
systemd-259/src/machine/machined.c:43:12: enter_function: entry to ‘manager_new’
systemd-259/src/machine/machined.c:47:9: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined.c:49:13: call_function: inlined call to ‘malloc_multiply’ from ‘manager_new’
systemd-259/src/machine/machined.c:50:12: branch_false: following ‘false’ branch...
systemd-259/src/machine/machined.c:53:9: branch_false: ...to here
systemd-259/src/machine/machined.c:57:13: throw: if ‘runtime_directory_generic’ throws an exception...
systemd-259/src/machine/machined.c:44:44: call_function: inlined call to ‘manager_unrefp’ from ‘manager_new’
#   55|           };
#   56|   
#   57|->         r = runtime_directory_generic(scope, "systemd/machines", &m->state_dir);
#   58|           if (r < 0)
#   59|                   return r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
systemd-259/src/measure/measure-tool.c:657:21: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(EVP_MD_get0_name(EVP_get_digestbyname(*__unique_prefix_i24)))’
systemd-259/src/measure/measure-tool.c:995:12: enter_function: entry to ‘verb_policy_digest’
systemd-259/src/measure/measure-tool.c:996:16: call_function: calling ‘build_policy_digest’ from ‘verb_policy_digest’
#  655|   
#  656|                   sz = EVP_MD_size(implementation);
#  657|->                 if (sz <= 0 || sz >= INT_MAX)
#  658|                           return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Unexpected digest size: %i", sz);
#  659|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
systemd-259/src/measure/measure-tool.c:664:27: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, (size_t)EVP_MD_get_size(EVP_get_digestbyname(*__unique_prefix_i24)))’
systemd-259/src/measure/measure-tool.c:995:12: enter_function: entry to ‘verb_policy_digest’
systemd-259/src/measure/measure-tool.c:996:16: call_function: calling ‘build_policy_digest’ from ‘verb_policy_digest’
#  662|                           return log_oom();
#  663|   
#  664|->                 pcr_states[n++] = (struct PcrState) {
#  665|                           .bank = ascii_strlower(TAKE_PTR(b)),
#  666|                           .md = implementation,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
systemd-259/src/measure/measure-tool.c:1048:21: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*__unique_prefix_i29)’
systemd-259/src/measure/measure-tool.c:1026:12: branch_false: following ‘false’ branch...
systemd-259/src/measure/measure-tool.c:1029:13: branch_false: ...to here
systemd-259/src/measure/measure-tool.c:1030:12: branch_false: following ‘false’ branch...
systemd-259/src/measure/measure-tool.c:1033:14: branch_false: ...to here
systemd-259/src/measure/measure-tool.c:1038:12: branch_false: following ‘false’ branch...
systemd-259/src/measure/measure-tool.c:1041:9: branch_false: ...to here
systemd-259/src/measure/measure-tool.c:1041:9: branch_true: following ‘true’ branch...
systemd-259/src/measure/measure-tool.c:1044:21: acquire_memory: allocated here
systemd-259/src/measure/measure-tool.c:1045:20: branch_false: following ‘false’ branch...
systemd-259/src/measure/measure-tool.c:1048:21: branch_false: ...to here
systemd-259/src/measure/measure-tool.c:1048:21: throw: if ‘ascii_strlower’ throws an exception...
systemd-259/src/measure/measure-tool.c:1048:21: danger: ‘strdup(*__unique_prefix_i29)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/8)
# 1046|                           return log_oom();
# 1047|   
# 1048|->                 if (asprintf(&p, "/sys/class/tpm/tpm0/pcr-%s/", ascii_strlower(b)) < 0)
# 1049|                           return log_oom();
# 1050|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def128]
systemd-259/src/modules-load/modules-load.c:141:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(format_proc_fd_path(&<Uc8e8>, *c.fd), "re")’
systemd-259/src/modules-load/modules-load.c:471:1: enter_function: entry to ‘main’
systemd-259/src/modules-load/modules-load.c:471:1: call_function: calling ‘run’ from ‘main’
#  139|           }
#  140|   
#  141|->         return apply_file(f, c->original_path, module_set);
#  142|   }
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
systemd-259/src/modules-load/modules-load.c:141:30: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(format_proc_fd_path(&<Uc8e8>, *c.fd), "re")’
systemd-259/src/modules-load/modules-load.c:471:1: enter_function: entry to ‘main’
systemd-259/src/modules-load/modules-load.c:471:1: call_function: calling ‘run’ from ‘main’
#  139|           }
#  140|   
#  141|->         return apply_file(f, c->original_path, module_set);
#  142|   }
#  143|   

Error: CPPCHECK_WARNING (CWE-401): [#def130]
systemd-259/src/mountfsd/mountwork.c:417: error[memleak]: Memory leak: verity.data_path
#  415|                           polkit_registry);
#  416|           if (r <= 0)
#  417|->                 return r;
#  418|   
#  419|           /* Generate the common dissection directory here. We are not going to use it, but the clients might,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
systemd-259/src/mute-console/mute-console.c:293:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(16)’
systemd-259/src/mute-console/mute-console.c:267:12: enter_function: entry to ‘vl_method_mute’
systemd-259/src/mute-console/mute-console.c:275:9: branch_false: following ‘false’ branch...
systemd-259/src/mute-console/mute-console.c:277:38: call_function: inlined call to ‘malloc_multiply’ from ‘vl_method_mute’
systemd-259/src/mute-console/mute-console.c:278:12: branch_false: following ‘false’ branch...
systemd-259/src/mute-console/mute-console.c:281:9: branch_false: ...to here
systemd-259/src/mute-console/mute-console.c:293:13: throw: if ‘sd_varlink_dispatch’ throws an exception...
systemd-259/src/mute-console/mute-console.c:293:13: danger: ‘malloc(16)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  291|           };
#  292|   
#  293|->         r = sd_varlink_dispatch(link, parameters, dispatch_table, nc);
#  294|           if (r != 0)
#  295|                   return r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
systemd-259/src/network/generator/network-generator.c:243:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(96)’
systemd-259/src/network/generator/network-generator.c:1253:5: enter_function: entry to ‘parse_cmdline_item’
systemd-259/src/network/generator/network-generator.c:1254:28: branch_false: following ‘false’ branch...
systemd-259/src/network/generator/network-generator.c:1256:9: branch_false: ...to here
systemd-259/src/network/generator/network-generator.c:1256:9: branch_false: following ‘false’ branch...
systemd-259/src/network/generator/network-generator.c:1258:13: branch_false: ...to here
systemd-259/src/network/generator/network-generator.c:1258:12: branch_false: following ‘false’ branch...
systemd-259/src/network/generator/network-generator.c:1260:13: branch_false: ...to here
systemd-259/src/network/generator/network-generator.c:1260:12: branch_false: following ‘false’ branch...
systemd-259/src/network/generator/network-generator.c:1262:13: branch_false: ...to here
systemd-259/src/network/generator/network-generator.c:1262:12: branch_false: following ‘false’ branch...
systemd-259/src/network/generator/network-generator.c:1264:13: branch_false: ...to here
systemd-259/src/network/generator/network-generator.c:1264:12: branch_true: following ‘true’ branch...
systemd-259/src/network/generator/network-generator.c:1265:24: branch_true: ...to here
systemd-259/src/network/generator/network-generator.c:1265:24: call_function: calling ‘parse_cmdline_rd_peerdns’ from ‘parse_cmdline_item’
#  241|           };
#  242|   
#  243|->         r = hashmap_ensure_put(&context->networks_by_name, &network_hash_ops, network->ifname, network);
#  244|           if (r < 0)
#  245|                   return r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
systemd-259/src/network/networkd-manager.c:642:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(960)’
systemd-259/src/network/networkd-manager.c:660:5: enter_function: entry to ‘manager_new’
systemd-259/src/network/networkd-manager.c:663:13: call_function: inlined call to ‘malloc_multiply’ from ‘manager_new’
systemd-259/src/network/networkd-manager.c:664:12: branch_false: following ‘false’ branch...
systemd-259/src/network/networkd-manager.c:677:42: branch_false: ...to here
systemd-259/src/network/networkd-manager.c:677:42: call_function: calling ‘persistent_storage_open’ from ‘manager_new’
systemd-259/src/network/networkd-manager.c:677:42: call_function: calling ‘manager_free’ from ‘manager_new’
#  640|   
#  641|           r = getenv_bool("SYSTEMD_NETWORK_PERSISTENT_STORAGE_READY");
#  642|->         if (r < 0 && r != -ENXIO)
#  643|                   return log_debug_errno(r, "Failed to parse $SYSTEMD_NETWORK_PERSISTENT_STORAGE_READY environment variable, ignoring: %m");
#  644|           if (r <= 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def134]
systemd-259/src/nspawn/nspawn-setuid.c:30:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘<U8428>[1]’
systemd-259/src/nspawn/nspawn-setuid.c:23:9: branch_false: following ‘false’ branch...
systemd-259/src/nspawn/nspawn-setuid.c:24:9: branch_false: ...to here
systemd-259/src/nspawn/nspawn-setuid.c:24:9: branch_false: following ‘false’ branch...
systemd-259/src/nspawn/nspawn-setuid.c:25:9: branch_false: ...to here
systemd-259/src/nspawn/nspawn-setuid.c:25:9: branch_false: following ‘false’ branch...
systemd-259/src/nspawn/nspawn-setuid.c:27:13: branch_false: ...to here
systemd-259/src/nspawn/nspawn-setuid.c:27:12: branch_false: following ‘false’ branch...
systemd-259/src/nspawn/nspawn-setuid.c:31:36: branch_false: ...to here
systemd-259/src/nspawn/nspawn-setuid.c:30:13: throw: if ‘safe_fork_full’ throws an exception...
systemd-259/src/nspawn/nspawn-setuid.c:30:13: danger: ‘<U8428>[1]’ leaks here
#   28|                   return log_error_errno(errno, "Failed to allocate pipe: %m");
#   29|   
#   30|->         r = safe_fork_full("(getent)",
#   31|                              (int[]) { -EBADF, pipe_fds[1], -EBADF }, NULL, 0,
#   32|                              FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_DEATHSIG_SIGTERM|FORK_REARRANGE_STDIO|FORK_LOG|FORK_RLIMIT_NOFILE_SAFE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
systemd-259/src/nsresourced/nsresourced-manager.c:422:25: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(&*dentry.d_name, "i"), (long unsigned int)(endswith_internal(<unknown>, ".userns") - <unknown>))’
systemd-259/src/nsresourced/nsresourced-manager.c:390:12: enter_function: entry to ‘manager_scan_registry’
systemd-259/src/nsresourced/nsresourced-manager.c:394:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:395:9: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:395:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:396:9: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:396:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:398:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:399:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:399:12: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:402:28: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:403:41: branch_true: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:409:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:412:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:413:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:416:32: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:416:21: acquire_memory: allocated here
systemd-259/src/nsresourced/nsresourced-manager.c:417:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:420:21: call_function: inlined call to ‘safe_atou64’ from ‘manager_scan_registry’
systemd-259/src/nsresourced/nsresourced-manager.c:421:20: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:422:25: branch_true: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:422:25: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:422:25: branch_true: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:422:25: throw: if ‘log_internal’ throws an exception...
systemd-259/src/nsresourced/nsresourced-manager.c:422:25: danger: ‘strndup(startswith_internal(&*dentry.d_name, "i"), (long unsigned int)(endswith_internal(<unknown>, ".userns") - <unknown>))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/15)
#  420|                   r = safe_atou64(u, &inode);
#  421|                   if (r < 0) {
#  422|->                         log_warning_errno(r, "Failed to parse userns inode number from '%s', skipping: %m", dentry->d_name);
#  423|                           continue;
#  424|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
systemd-259/src/nsresourced/nsresourced-manager.c:426:21: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(&*dentry.d_name, "i"), (long unsigned int)(endswith_internal(<unknown>, ".userns") - <unknown>))’
systemd-259/src/nsresourced/nsresourced-manager.c:390:12: enter_function: entry to ‘manager_scan_registry’
systemd-259/src/nsresourced/nsresourced-manager.c:394:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:395:9: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:395:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:396:9: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:396:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:398:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:399:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:399:12: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:402:28: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:403:41: branch_true: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:416:21: acquire_memory: allocated here
systemd-259/src/nsresourced/nsresourced-manager.c:417:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:420:21: call_function: inlined call to ‘safe_atou64’ from ‘manager_scan_registry’
systemd-259/src/nsresourced/nsresourced-manager.c:421:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:426:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:426:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourced-manager.c:431:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourced-manager.c:431:21: throw: if ‘set_ensure_put’ throws an exception...
systemd-259/src/nsresourced/nsresourced-manager.c:426:21: danger: ‘strndup(startswith_internal(&*dentry.d_name, "i"), (long unsigned int)(endswith_internal(<unknown>, ".userns") - <unknown>))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/11)
#  424|                   }
#  425|   
#  426|->                 if (inode > UINT32_MAX) { /* namespace inode numbers are 23bit only right now */
#  427|                           log_warning("userns inode number outside of 32bit range, skipping.");
#  428|                           continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
systemd-259/src/nsresourced/nsresourcework.c:157:21: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(p.user_name, "ns-"), (long unsigned int)(f - <unknown>))’
systemd-259/src/nsresourced/nsresourcework.c:129:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:131:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:132:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:135:24: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:135:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:138:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:138:12: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourcework.c:142:21: branch_true: ...to here
systemd-259/src/nsresourced/nsresourcework.c:143:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:146:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:147:20: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
systemd-259/src/nsresourced/nsresourcework.c:150:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:150:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:153:32: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:153:21: acquire_memory: allocated here
systemd-259/src/nsresourced/nsresourcework.c:154:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:157:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:157:21: throw: if ‘userns_registry_load_by_name’ throws an exception...
systemd-259/src/nsresourced/nsresourcework.c:157:21: danger: ‘strndup(startswith_internal(p.user_name, "ns-"), (long unsigned int)(f - <unknown>))’ leaks here; was allocated at [(15)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/14)
#  155|                           return log_oom();
#  156|   
#  157|->                 r = userns_registry_load_by_name(
#  158|                                   /* dir_fd= */ -EBADF,
#  159|                                   n,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
systemd-259/src/nsresourced/nsresourcework.c:166:42: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(p.user_name, "ns-"), (long unsigned int)(f - <unknown>))’
systemd-259/src/nsresourced/nsresourcework.c:129:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:131:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:132:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:135:24: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:135:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:138:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:138:12: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourcework.c:142:21: branch_true: ...to here
systemd-259/src/nsresourced/nsresourcework.c:143:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:146:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:147:20: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
systemd-259/src/nsresourced/nsresourcework.c:150:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:150:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:153:32: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:153:21: acquire_memory: allocated here
systemd-259/src/nsresourced/nsresourcework.c:154:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:157:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:161:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:163:20: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:163:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:166:42: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:166:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:169:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:169:20: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourcework.c:170:32: throw: if ‘sd_varlink_error’ throws an exception...
systemd-259/src/nsresourced/nsresourcework.c:166:42: danger: ‘strndup(startswith_internal(p.user_name, "ns-"), (long unsigned int)(f - <unknown>))’ leaks here; was allocated at [(15)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/14)
#  164|                           return r;
#  165|   
#  166|->                 if (offset >= userns_info->size) /* Outside of range? */
#  167|                           goto not_found;
#  168|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
systemd-259/src/nsresourced/nsresourcework.c:284:21: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(p.group_name, "ns-"), (long unsigned int)(f - <unknown>))’
systemd-259/src/nsresourced/nsresourcework.c:256:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:258:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:259:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:262:24: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:262:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:265:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:265:12: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourcework.c:269:21: branch_true: ...to here
systemd-259/src/nsresourced/nsresourcework.c:270:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:273:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:274:20: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
systemd-259/src/nsresourced/nsresourcework.c:277:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:277:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:280:32: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:280:21: acquire_memory: allocated here
systemd-259/src/nsresourced/nsresourcework.c:281:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:284:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:284:21: throw: if ‘userns_registry_load_by_name’ throws an exception...
systemd-259/src/nsresourced/nsresourcework.c:284:21: danger: ‘strndup(startswith_internal(p.group_name, "ns-"), (long unsigned int)(f - <unknown>))’ leaks here; was allocated at [(15)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/14)
#  282|                           return log_oom();
#  283|   
#  284|->                 r = userns_registry_load_by_name(
#  285|                                   /* dir_fd= */ -EBADF,
#  286|                                   n,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
systemd-259/src/nsresourced/nsresourcework.c:293:42: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(p.group_name, "ns-"), (long unsigned int)(f - <unknown>))’
systemd-259/src/nsresourced/nsresourcework.c:256:9: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:258:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:259:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:262:24: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:262:12: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:265:13: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:265:12: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourcework.c:269:21: branch_true: ...to here
systemd-259/src/nsresourced/nsresourcework.c:270:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:273:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:274:20: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
systemd-259/src/nsresourced/nsresourcework.c:277:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:277:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:280:32: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:280:21: acquire_memory: allocated here
systemd-259/src/nsresourced/nsresourcework.c:281:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:284:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:288:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:290:20: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:290:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:293:42: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:293:20: branch_false: following ‘false’ branch...
systemd-259/src/nsresourced/nsresourcework.c:296:21: branch_false: ...to here
systemd-259/src/nsresourced/nsresourcework.c:296:20: branch_true: following ‘true’ branch...
systemd-259/src/nsresourced/nsresourcework.c:297:32: throw: if ‘sd_varlink_error’ throws an exception...
systemd-259/src/nsresourced/nsresourcework.c:293:42: danger: ‘strndup(startswith_internal(p.group_name, "ns-"), (long unsigned int)(f - <unknown>))’ leaks here; was allocated at [(15)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/14)
#  291|                           return r;
#  292|   
#  293|->                 if (offset >= userns_info->size) /* Outside of range? */
#  294|                           goto not_found;
#  295|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
systemd-259/src/oom/oomd-util.c:431:13: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 128)’
systemd-259/src/oom/oomd-util.c:421:9: branch_false: following ‘false’ branch...
systemd-259/src/oom/oomd-util.c:422:9: branch_false: ...to here
systemd-259/src/oom/oomd-util.c:422:9: branch_false: following ‘false’ branch...
systemd-259/src/oom/oomd-util.c:424:15: branch_false: ...to here
systemd-259/src/oom/oomd-util.c:424:15: acquire_memory: allocated here
systemd-259/src/oom/oomd-util.c:425:12: branch_false: following ‘false’ branch...
systemd-259/src/oom/oomd-util.c:428:19: branch_false: ...to here
systemd-259/src/oom/oomd-util.c:431:13: throw: if ‘cg_get_path’ throws an exception...
systemd-259/src/oom/oomd-util.c:431:13: danger: ‘calloc(1, 128)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  429|           ctx->preference = MANAGED_OOM_PREFERENCE_NONE;
#  430|   
#  431|->         r = cg_get_path(path, "memory.pressure", &p);
#  432|           if (r < 0)
#  433|                   return log_debug_errno(r, "Error getting cgroup memory pressure path from %s: %m", path);

Error: CPPCHECK_WARNING (CWE-457): [#def142]
systemd-259/src/resolve/resolvectl.c:1829: error[uninitvar]: Uninitialized variable: w
# 1827|                   /* Always include identifier fields like ifname or delegate, and include the requested
# 1828|                    * field even if it is empty in the configuration. */
# 1829|->                 r = sd_json_variant_append_arraybo(
# 1830|                                   &v,
# 1831|                                   JSON_BUILD_PAIR_VARIANT_NON_NULL("ifname", sd_json_variant_by_key(w, "ifname")),

Error: CPPCHECK_WARNING (CWE-457): [#def143]
systemd-259/src/resolve/resolvectl.c:1863: error[uninitvar]: Uninitialized variable: w
# 1861|   
# 1862|           JSON_VARIANT_ARRAY_FOREACH(w, *configuration) {
# 1863|->                 int ifindex = sd_json_variant_unsigned(sd_json_variant_by_key(w, "ifindex"));
# 1864|   
# 1865|                   if (links_by_index) {

Error: CPPCHECK_WARNING (CWE-457): [#def144]
systemd-259/src/resolve/resolved-hook.c:93: error[uninitvar]: Uninitialized variable: i
#   91|           sd_json_variant *i;
#   92|           JSON_VARIANT_ARRAY_FOREACH(i, variant) {
#   93|->                 if (!sd_json_variant_is_string(i))
#   94|                           return json_log(variant, flags, SYNTHETIC_ERRNO(EINVAL),
#   95|                                           "Element of JSON field '%s' is not a string.", strna(name));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
systemd-259/src/resolve/resolved-hook.c:354:24: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(p)’
systemd-259/src/resolve/resolved-hook.c:380:12: enter_function: entry to ‘manager_hook_discover’
systemd-259/src/resolve/resolved-hook.c:390:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:392:28: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:395:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:404:40: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:404:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:407:13: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:408:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:408:12: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:420:20: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:428:22: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:432:20: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:437:24: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:437:24: call_function: calling ‘manager_hook_add’ from ‘manager_hook_discover’
#  352|           _cleanup_(hook_unrefp) Hook *h = new(Hook, 1);
#  353|           if (!h)
#  354|->                 return log_oom();
#  355|   
#  356|           *h = (Hook) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
systemd-259/src/resolve/resolved-hook.c:419:37: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&dp)’
systemd-259/src/resolve/resolved-hook.c:390:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:392:28: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:395:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:404:40: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:404:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:407:13: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:407:13: acquire_memory: allocated here
systemd-259/src/resolve/resolved-hook.c:408:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:408:12: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:419:37: throw: if ‘readdir_no_dot’ throws an exception...
systemd-259/src/resolve/resolved-hook.c:419:37: danger: ‘opendir(&dp)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  417|           for (;;) {
#  418|                   errno = 0;
#  419|->                 struct dirent *de = readdir_no_dot(d);
#  420|                   if (!de) {
#  421|                           if (errno == 0) /* EOD */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def147]
systemd-259/src/resolve/resolved-hook.c:482:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*c.link’
systemd-259/src/resolve/resolved-hook.c:725:12: enter_function: entry to ‘hook_query_add_candidate’
systemd-259/src/resolve/resolved-hook.c:728:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:729:9: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:729:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:731:50: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:746:20: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:748:20: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:756:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:759:13: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:760:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:763:60: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:764:13: call_function: calling ‘dns_questions_to_json’ from ‘hook_query_add_candidate’
systemd-259/src/resolve/resolved-hook.c:764:13: return_function: returning to ‘hook_query_add_candidate’ from ‘dns_questions_to_json’
systemd-259/src/resolve/resolved-hook.c:765:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:768:13: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:772:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:775:72: call_function: inlined call to ‘malloc_multiply’ from ‘hook_query_add_candidate’
systemd-259/src/resolve/resolved-hook.c:776:12: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:779:9: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:780:20: call_function: calling ‘hook_ref’ from ‘hook_query_add_candidate’
systemd-259/src/resolve/resolved-hook.c:775:67: call_function: inlined call to ‘hook_query_candidate_freep’ from ‘hook_query_add_candidate’
#  480|                   return NULL;
#  481|   
#  482|->         c->link = sd_varlink_unref(c->link);
#  483|   
#  484|           if (c->query)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
systemd-259/src/resolve/resolved-hook.c:501:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hq’
systemd-259/src/resolve/resolved-hook.c:809:5: enter_function: entry to ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:819:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:822:14: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:822:12: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:828:16: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:828:16: call_function: calling ‘manager_hook_discover’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:828:16: return_function: returning to ‘manager_hook_query’ from ‘manager_hook_discover’
systemd-259/src/resolve/resolved-hook.c:833:9: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:834:21: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:834:21: call_function: calling ‘hook_test_filter’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:834:21: return_function: returning to ‘manager_hook_query’ from ‘hook_test_filter’
systemd-259/src/resolve/resolved-hook.c:855:20: branch_true: following ‘true’ branch (when ‘hq’ is NULL)...
systemd-259/src/resolve/resolved-hook.c:856:30: call_function: inlined call to ‘malloc_multiply’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:857:28: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:861:50: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:869:21: call_function: calling ‘hook_query_add_candidate’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:869:21: return_function: returning to ‘manager_hook_query’ from ‘hook_query_add_candidate’
systemd-259/src/resolve/resolved-hook.c:870:20: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:881:1: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:830:48: call_function: inlined call to ‘hook_query_freep’ from ‘manager_hook_query’
#  499|                   hook_query_candidate_free(hq->candidates);
#  500|   
#  501|->         dns_question_unref(hq->question_utf8);
#  502|           dns_question_unref(hq->question_idna);
#  503|           dns_answer_unref(hq->answer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
systemd-259/src/resolve/resolved-hook.c:502:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hq’
systemd-259/src/resolve/resolved-hook.c:809:5: enter_function: entry to ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:819:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:822:14: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:822:12: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:828:16: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:828:16: call_function: calling ‘manager_hook_discover’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:828:16: return_function: returning to ‘manager_hook_query’ from ‘manager_hook_discover’
systemd-259/src/resolve/resolved-hook.c:833:9: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:834:21: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:834:21: call_function: calling ‘hook_test_filter’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:834:21: return_function: returning to ‘manager_hook_query’ from ‘hook_test_filter’
systemd-259/src/resolve/resolved-hook.c:855:20: branch_true: following ‘true’ branch (when ‘hq’ is NULL)...
systemd-259/src/resolve/resolved-hook.c:856:30: call_function: inlined call to ‘malloc_multiply’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:857:28: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:861:50: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:869:21: call_function: calling ‘hook_query_add_candidate’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:869:21: return_function: returning to ‘manager_hook_query’ from ‘hook_query_add_candidate’
systemd-259/src/resolve/resolved-hook.c:870:20: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:881:1: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:830:48: call_function: inlined call to ‘hook_query_freep’ from ‘manager_hook_query’
#  500|   
#  501|           dns_question_unref(hq->question_utf8);
#  502|->         dns_question_unref(hq->question_idna);
#  503|           dns_answer_unref(hq->answer);
#  504|           hook_unref(hq->answer_hook);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
systemd-259/src/resolve/resolved-hook.c:503:9: warning[-Wanalyzer-malloc-leak]: leak of ‘hq’
systemd-259/src/resolve/resolved-hook.c:809:5: enter_function: entry to ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:819:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:822:14: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:822:12: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:828:16: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:828:16: call_function: calling ‘manager_hook_discover’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:828:16: return_function: returning to ‘manager_hook_query’ from ‘manager_hook_discover’
systemd-259/src/resolve/resolved-hook.c:833:9: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:834:21: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:834:21: call_function: calling ‘hook_test_filter’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:834:21: return_function: returning to ‘manager_hook_query’ from ‘hook_test_filter’
systemd-259/src/resolve/resolved-hook.c:855:20: branch_true: following ‘true’ branch (when ‘hq’ is NULL)...
systemd-259/src/resolve/resolved-hook.c:856:30: call_function: inlined call to ‘malloc_multiply’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:857:28: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:861:50: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:869:21: call_function: calling ‘hook_query_add_candidate’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:869:21: return_function: returning to ‘manager_hook_query’ from ‘hook_query_add_candidate’
systemd-259/src/resolve/resolved-hook.c:870:20: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:881:1: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:830:48: call_function: inlined call to ‘hook_query_freep’ from ‘manager_hook_query’
#  501|           dns_question_unref(hq->question_utf8);
#  502|           dns_question_unref(hq->question_idna);
#  503|->         dns_answer_unref(hq->answer);
#  504|           hook_unref(hq->answer_hook);
#  505|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def151]
systemd-259/src/resolve/resolved-hook.c:509:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘hq’
systemd-259/src/resolve/resolved-hook.c:809:5: enter_function: entry to ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:819:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:822:14: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:822:12: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:828:16: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:828:16: call_function: calling ‘manager_hook_discover’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:828:16: return_function: returning to ‘manager_hook_query’ from ‘manager_hook_discover’
systemd-259/src/resolve/resolved-hook.c:833:9: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:834:21: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:834:21: call_function: calling ‘hook_test_filter’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:830:48: call_function: inlined call to ‘hook_query_freep’ from ‘manager_hook_query’
#  507|   }
#  508|   
#  509|-> DEFINE_TRIVIAL_CLEANUP_FUNC(HookQuery*, hook_query_free);
#  510|   
#  511|   static void hook_query_ready(HookQuery *hq) {

Error: CPPCHECK_WARNING (CWE-457): [#def152]
systemd-259/src/resolve/resolved-hook.c:565: error[uninitvar]: Uninitialized variable: e
#  563|           sd_json_variant *e;
#  564|           JSON_VARIANT_ARRAY_FOREACH(e, variant) {
#  565|->                 if (!sd_json_variant_is_object(e))
#  566|                           return json_log(e, flags, SYNTHETIC_ERRNO(EINVAL), "JSON array element is not an object");
#  567|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
systemd-259/src/resolve/resolved-hook.c:861:50: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
systemd-259/src/resolve/resolved-hook.c:809:5: enter_function: entry to ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:819:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:822:14: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:822:12: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:828:16: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:828:16: call_function: calling ‘manager_hook_discover’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:828:16: return_function: returning to ‘manager_hook_query’ from ‘manager_hook_discover’
systemd-259/src/resolve/resolved-hook.c:833:9: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:834:21: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:834:21: call_function: calling ‘hook_test_filter’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:834:21: return_function: returning to ‘manager_hook_query’ from ‘hook_test_filter’
systemd-259/src/resolve/resolved-hook.c:855:20: branch_true: following ‘true’ branch (when ‘hq’ is NULL)...
systemd-259/src/resolve/resolved-hook.c:856:30: call_function: inlined call to ‘malloc_multiply’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:857:28: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:861:50: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:861:50: throw: if ‘dns_question_ref’ throws an exception...
systemd-259/src/resolve/resolved-hook.c:861:50: danger: ‘malloc(64)’ leaks here; was allocated at [(29)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/28)
#  859|   
#  860|                           *hq = (HookQuery) {
#  861|->                                 .question_idna = dns_question_ref(question_idna),
#  862|                                   .question_utf8 = dns_question_ref(question_utf8),
#  863|                                   .answer_rcode = -1,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
systemd-259/src/resolve/resolved-hook.c:862:50: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
systemd-259/src/resolve/resolved-hook.c:809:5: enter_function: entry to ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:819:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:820:9: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:822:14: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:822:12: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:828:16: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:828:16: call_function: calling ‘manager_hook_discover’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:828:16: return_function: returning to ‘manager_hook_query’ from ‘manager_hook_discover’
systemd-259/src/resolve/resolved-hook.c:833:9: branch_true: following ‘true’ branch...
systemd-259/src/resolve/resolved-hook.c:834:21: branch_true: ...to here
systemd-259/src/resolve/resolved-hook.c:834:21: call_function: calling ‘hook_test_filter’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:834:21: return_function: returning to ‘manager_hook_query’ from ‘hook_test_filter’
systemd-259/src/resolve/resolved-hook.c:855:20: branch_true: following ‘true’ branch (when ‘hq’ is NULL)...
systemd-259/src/resolve/resolved-hook.c:856:30: call_function: inlined call to ‘malloc_multiply’ from ‘manager_hook_query’
systemd-259/src/resolve/resolved-hook.c:857:28: branch_false: following ‘false’ branch...
systemd-259/src/resolve/resolved-hook.c:861:50: branch_false: ...to here
systemd-259/src/resolve/resolved-hook.c:862:50: throw: if ‘dns_question_ref’ throws an exception...
systemd-259/src/resolve/resolved-hook.c:862:50: danger: ‘malloc(64)’ leaks here; was allocated at [(29)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/28)
#  860|                           *hq = (HookQuery) {
#  861|                                   .question_idna = dns_question_ref(question_idna),
#  862|->                                 .question_utf8 = dns_question_ref(question_utf8),
#  863|                                   .answer_rcode = -1,
#  864|                                   .complete = complete_cb,

Error: GCC_ANALYZER_WARNING (CWE-457): [#def155]
systemd-259/src/shared/blockdev-util.c:358:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘whole_devt’
systemd-259/src/shared/blockdev-util.c:343:5: enter_function: entry to ‘lock_whole_block_device’
systemd-259/src/shared/blockdev-util.c:354:13: call_function: calling ‘block_get_whole_disk’ from ‘lock_whole_block_device’
systemd-259/src/shared/blockdev-util.c:354:13: return_function: returning to ‘lock_whole_block_device’ from ‘block_get_whole_disk’
systemd-259/src/shared/blockdev-util.c:355:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/blockdev-util.c:358:19: branch_false: ...to here
systemd-259/src/shared/blockdev-util.c:358:19: danger: use of uninitialized value ‘whole_devt’ here
#  356|                   return r;
#  357|   
#  358|->         lock_fd = device_open_from_devnum(S_IFBLK, whole_devt, open_flags|O_CLOEXEC|O_NONBLOCK|O_NOCTTY, NULL);
#  359|           if (lock_fd < 0)
#  360|                   return lock_fd;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
systemd-259/src/shared/condition.c:526:13: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(startswith_internal(*c.parameter, "device-tree-compatible("), (long unsigned int)(end - <unknown>))’
systemd-259/src/shared/condition.c:594:12: enter_function: entry to ‘condition_test_firmware’
systemd-259/src/shared/condition.c:598:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/condition.c:599:9: branch_false: ...to here
systemd-259/src/shared/condition.c:599:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/condition.c:600:9: branch_false: ...to here
systemd-259/src/shared/condition.c:600:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/condition.c:602:13: branch_false: ...to here
systemd-259/src/shared/condition.c:602:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
systemd-259/src/shared/condition.c:609:27: branch_false: ...to here
systemd-259/src/shared/condition.c:609:19: branch_true: following ‘true’ branch...
systemd-259/src/shared/condition.c:613:23: branch_true: ...to here
systemd-259/src/shared/condition.c:614:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/condition.c:619:27: acquire_memory: allocated here
systemd-259/src/shared/condition.c:620:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/condition.c:623:24: branch_false: ...to here
systemd-259/src/shared/condition.c:623:24: call_function: calling ‘condition_test_firmware_devicetree_compatible’ from ‘condition_test_firmware’
systemd-259/src/shared/condition.c:526:13: danger: ‘strndup(startswith_internal(*c.parameter, "device-tree-compatible("), (long unsigned int)(end - <unknown>))’ leaks here; was allocated at [(14)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/13)
#  524|   
#  525|           /* Not sure this can happen, but play safe. */
#  526|->         if (size == 0) {
#  527|                   log_debug("%s has zero length, assuming machine is incompatible", DTCOMPAT_FILE);
#  528|                   return false;

Error: CPPCHECK_WARNING (CWE-768): [#def157]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   

Error: CPPCHECK_WARNING (CWE-768): [#def158]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}})' depends on order of evaluation of side effects
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   

Error: CPPCHECK_WARNING (CWE-768): [#def159]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}})' depends on order of ev [...]
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   
systemd-259/src/shared/creds-util.c:843: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def160]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_ [...]
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   
systemd-259/src/shared/creds-util.c:843: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def161]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_ [...]
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   
systemd-259/src/shared/creds-util.c:843: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def162]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_ [...]
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   
systemd-259/src/shared/creds-util.c:843: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def163]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_ [...]
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   
systemd-259/src/shared/creds-util.c:843: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def164]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_ [...]
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   
systemd-259/src/shared/creds-util.c:843: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def165]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}})' depends on order of evaluation of side effects
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   

Error: CPPCHECK_WARNING (CWE-768): [#def166]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}})' depends on order of evaluation of side effects
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   

Error: CPPCHECK_WARNING (CWE-768): [#def167]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x02,0xdc,0x8e,0xde,0x3a,0x02,0x43,0xab,0xa9,0xec,0x54,0x9c,0x05,0xe6,0xa0,0x71}})' depends on order of ev [...]
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   
systemd-259/src/shared/creds-util.c:843: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def168]
systemd-259/src/shared/creds-util.c:843: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x02,0xdc,0x8e,0xde,0x3a,0x02,0x43,0xab,0xa9,0xec,0x54,0x9c,0x05,0xe6,0xa0,0x71}}),((const union sd_id128_ [...]
#  841|           assert(!FLAGS_SET(flags, CREDENTIAL_ALLOW_NULL) || !FLAGS_SET(flags, CREDENTIAL_REFUSE_NULL));
#  842|   
#  843|->         if (!CRED_KEY_IS_VALID(with_key) && !CRED_KEY_IS_AUTO(with_key))
#  844|                   return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid key type: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(with_key));
#  845|   
systemd-259/src/shared/creds-util.c:843: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def169]
systemd-259/src/shared/creds-util.c:863: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
#  861|           }
#  862|   
#  863|->         if (CRED_KEY_IS_SCOPED(with_key)) {
#  864|                   if (!uid_is_valid(uid))
#  865|                           return log_error_errno(SYNTHETIC_ERRNO(EINVAL),

Error: CPPCHECK_WARNING (CWE-768): [#def170]
systemd-259/src/shared/creds-util.c:863: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}})' depends on order of evaluation of side effects
#  861|           }
#  862|   
#  863|->         if (CRED_KEY_IS_SCOPED(with_key)) {
#  864|                   if (!uid_is_valid(uid))
#  865|                           return log_error_errno(SYNTHETIC_ERRNO(EINVAL),

Error: CPPCHECK_WARNING (CWE-768): [#def171]
systemd-259/src/shared/creds-util.c:863: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of ev [...]
#  861|           }
#  862|   
#  863|->         if (CRED_KEY_IS_SCOPED(with_key)) {
#  864|                   if (!uid_is_valid(uid))
#  865|                           return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
systemd-259/src/shared/creds-util.c:863: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def172]
systemd-259/src/shared/creds-util.c:870: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}})' depends on order of evaluation of side effects
#  868|                   uid = UID_INVALID;
#  869|   
#  870|->         if (CRED_KEY_WANTS_HOST(with_key) || CRED_KEY_REQUIRES_HOST(with_key)) {
#  871|   
#  872|                   r = get_credential_host_secret(

Error: CPPCHECK_WARNING (CWE-768): [#def173]
systemd-259/src/shared/creds-util.c:870: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}})' depends on order of evaluation of side effects
#  868|                   uid = UID_INVALID;
#  869|   
#  870|->         if (CRED_KEY_WANTS_HOST(with_key) || CRED_KEY_REQUIRES_HOST(with_key)) {
#  871|   
#  872|                   r = get_credential_host_secret(

Error: CPPCHECK_WARNING (CWE-768): [#def174]
systemd-259/src/shared/creds-util.c:870: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
#  868|                   uid = UID_INVALID;
#  869|   
#  870|->         if (CRED_KEY_WANTS_HOST(with_key) || CRED_KEY_REQUIRES_HOST(with_key)) {
#  871|   
#  872|                   r = get_credential_host_secret(

Error: CPPCHECK_WARNING (CWE-768): [#def175]
systemd-259/src/shared/creds-util.c:870: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x93,0xa8,0x94,0x09,0x48,0x74,0x44,0x90,0x90,0xca,0xf2,0xfc,0x93,0xca,0xb5,0x53}})' depends on order of ev [...]
#  868|                   uid = UID_INVALID;
#  869|   
#  870|->         if (CRED_KEY_WANTS_HOST(with_key) || CRED_KEY_REQUIRES_HOST(with_key)) {
#  871|   
#  872|                   r = get_credential_host_secret(
systemd-259/src/shared/creds-util.c:870: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def176]
systemd-259/src/shared/creds-util.c:870: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x93,0xa8,0x94,0x09,0x48,0x74,0x44,0x90,0x90,0xca,0xf2,0xfc,0x93,0xca,0xb5,0x53}}),((const union sd_id128_ [...]
#  868|                   uid = UID_INVALID;
#  869|   
#  870|->         if (CRED_KEY_WANTS_HOST(with_key) || CRED_KEY_REQUIRES_HOST(with_key)) {
#  871|   
#  872|                   r = get_credential_host_secret(
systemd-259/src/shared/creds-util.c:870: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def177]
systemd-259/src/shared/creds-util.c:870: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x93,0xa8,0x94,0x09,0x48,0x74,0x44,0x90,0x90,0xca,0xf2,0xfc,0x93,0xca,0xb5,0x53}}),((const union sd_id128_ [...]
#  868|                   uid = UID_INVALID;
#  869|   
#  870|->         if (CRED_KEY_WANTS_HOST(with_key) || CRED_KEY_REQUIRES_HOST(with_key)) {
#  871|   
#  872|                   r = get_credential_host_secret(
systemd-259/src/shared/creds-util.c:870: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def178]
systemd-259/src/shared/creds-util.c:870: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x93,0xa8,0x94,0x09,0x48,0x74,0x44,0x90,0x90,0xca,0xf2,0xfc,0x93,0xca,0xb5,0x53}}),((const union sd_id128_ [...]
#  868|                   uid = UID_INVALID;
#  869|   
#  870|->         if (CRED_KEY_WANTS_HOST(with_key) || CRED_KEY_REQUIRES_HOST(with_key)) {
#  871|   
#  872|                   r = get_credential_host_secret(
systemd-259/src/shared/creds-util.c:870: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def179]
systemd-259/src/shared/creds-util.c:875: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}})' depends on order of evaluation of side effects
#  873|                                   CREDENTIAL_SECRET_GENERATE|
#  874|                                   CREDENTIAL_SECRET_WARN_NOT_ENCRYPTED|
#  875|->                                 (CRED_KEY_WANTS_HOST(with_key) ? CREDENTIAL_SECRET_FAIL_ON_TEMPORARY_FS : 0),
#  876|                                   &host_key);
#  877|                   if (r == -ENOMEDIUM && CRED_KEY_WANTS_HOST(with_key))

Error: CPPCHECK_WARNING (CWE-768): [#def180]
systemd-259/src/shared/creds-util.c:877: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}})' depends on order of evaluation of side effects
#  875|                                   (CRED_KEY_WANTS_HOST(with_key) ? CREDENTIAL_SECRET_FAIL_ON_TEMPORARY_FS : 0),
#  876|                                   &host_key);
#  877|->                 if (r == -ENOMEDIUM && CRED_KEY_WANTS_HOST(with_key))
#  878|                           log_debug_errno(r, "Credential host secret location on temporary file system, not using.");
#  879|                   else if (r < 0)

Error: CPPCHECK_WARNING (CWE-768): [#def181]
systemd-259/src/shared/creds-util.c:890: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x02,0xdc,0x8e,0xde,0x3a,0x02,0x43,0xab,0xa9,0xec,0x54,0x9c,0x05,0xe6,0xa0,0x71}})' depends on order of evaluation of side effects
#  888|   #if HAVE_TPM2
#  889|           bool try_tpm2;
#  890|->         if (CRED_KEY_WANTS_TPM2(with_key)) {
#  891|                   /* If automatic mode is selected lets see if a TPM2 it is present. If we are running in a
#  892|                    * container tpm2_support will detect this, and will return a different flag combination of

Error: CPPCHECK_WARNING (CWE-768): [#def182]
systemd-259/src/shared/creds-util.c:890: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x02,0xdc,0x8e,0xde,0x3a,0x02,0x43,0xab,0xa9,0xec,0x54,0x9c,0x05,0xe6,0xa0,0x71}}),((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}})' depends on order of evaluation of side effects
#  888|   #if HAVE_TPM2
#  889|           bool try_tpm2;
#  890|->         if (CRED_KEY_WANTS_TPM2(with_key)) {
#  891|                   /* If automatic mode is selected lets see if a TPM2 it is present. If we are running in a
#  892|                    * container tpm2_support will detect this, and will return a different flag combination of

Error: CPPCHECK_WARNING (CWE-768): [#def183]
systemd-259/src/shared/creds-util.c:899: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}})' depends on order of evaluation of side effects
#  897|                           log_debug("System lacks TPM2 support or running in a container, not attempting to use TPM2.");
#  898|           } else
#  899|->                 try_tpm2 = CRED_KEY_REQUIRES_TPM2(with_key);
#  900|   
#  901|           if (try_tpm2) {

Error: CPPCHECK_WARNING (CWE-768): [#def184]
systemd-259/src/shared/creds-util.c:899: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}})' depends on order of evaluation of side effects
#  897|                           log_debug("System lacks TPM2 support or running in a container, not attempting to use TPM2.");
#  898|           } else
#  899|->                 try_tpm2 = CRED_KEY_REQUIRES_TPM2(with_key);
#  900|   
#  901|           if (try_tpm2) {

Error: CPPCHECK_WARNING (CWE-768): [#def185]
systemd-259/src/shared/creds-util.c:899: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}})' depends on order of ev [...]
#  897|                           log_debug("System lacks TPM2 support or running in a container, not attempting to use TPM2.");
#  898|           } else
#  899|->                 try_tpm2 = CRED_KEY_REQUIRES_TPM2(with_key);
#  900|   
#  901|           if (try_tpm2) {
systemd-259/src/shared/creds-util.c:899: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def186]
systemd-259/src/shared/creds-util.c:899: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_ [...]
#  897|                           log_debug("System lacks TPM2 support or running in a container, not attempting to use TPM2.");
#  898|           } else
#  899|->                 try_tpm2 = CRED_KEY_REQUIRES_TPM2(with_key);
#  900|   
#  901|           if (try_tpm2) {
systemd-259/src/shared/creds-util.c:899: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def187]
systemd-259/src/shared/creds-util.c:899: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_ [...]
#  897|                           log_debug("System lacks TPM2 support or running in a container, not attempting to use TPM2.");
#  898|           } else
#  899|->                 try_tpm2 = CRED_KEY_REQUIRES_TPM2(with_key);
#  900|   
#  901|           if (try_tpm2) {
systemd-259/src/shared/creds-util.c:899: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def188]
systemd-259/src/shared/creds-util.c:899: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_ [...]
#  897|                           log_debug("System lacks TPM2 support or running in a container, not attempting to use TPM2.");
#  898|           } else
#  899|->                 try_tpm2 = CRED_KEY_REQUIRES_TPM2(with_key);
#  900|   
#  901|           if (try_tpm2) {
systemd-259/src/shared/creds-util.c:899: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def189]
systemd-259/src/shared/creds-util.c:899: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_ [...]
#  897|                           log_debug("System lacks TPM2 support or running in a container, not attempting to use TPM2.");
#  898|           } else
#  899|->                 try_tpm2 = CRED_KEY_REQUIRES_TPM2(with_key);
#  900|   
#  901|           if (try_tpm2) {
systemd-259/src/shared/creds-util.c:899: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def190]
systemd-259/src/shared/creds-util.c:902: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}})' depends on order of evaluation of side effects
#  900|   
#  901|           if (try_tpm2) {
#  902|->                 if (CRED_KEY_WANTS_TPM2_PK(with_key) || CRED_KEY_REQUIRES_TPM2_PK(with_key)) {
#  903|   
#  904|                           /* Load public key for PCR policies, if one is specified, or explicitly requested */

Error: CPPCHECK_WARNING (CWE-768): [#def191]
systemd-259/src/shared/creds-util.c:902: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}})' depends on order of evaluation of side effects
#  900|   
#  901|           if (try_tpm2) {
#  902|->                 if (CRED_KEY_WANTS_TPM2_PK(with_key) || CRED_KEY_REQUIRES_TPM2_PK(with_key)) {
#  903|   
#  904|                           /* Load public key for PCR policies, if one is specified, or explicitly requested */

Error: CPPCHECK_WARNING (CWE-768): [#def192]
systemd-259/src/shared/creds-util.c:902: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x02,0xdc,0x8e,0xde,0x3a,0x02,0x43,0xab,0xa9,0xec,0x54,0x9c,0x05,0xe6,0xa0,0x71}})' depends on order of ev [...]
#  900|   
#  901|           if (try_tpm2) {
#  902|->                 if (CRED_KEY_WANTS_TPM2_PK(with_key) || CRED_KEY_REQUIRES_TPM2_PK(with_key)) {
#  903|   
#  904|                           /* Load public key for PCR policies, if one is specified, or explicitly requested */
systemd-259/src/shared/creds-util.c:902: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def193]
systemd-259/src/shared/creds-util.c:902: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x02,0xdc,0x8e,0xde,0x3a,0x02,0x43,0xab,0xa9,0xec,0x54,0x9c,0x05,0xe6,0xa0,0x71}}),((const union sd_id128_ [...]
#  900|   
#  901|           if (try_tpm2) {
#  902|->                 if (CRED_KEY_WANTS_TPM2_PK(with_key) || CRED_KEY_REQUIRES_TPM2_PK(with_key)) {
#  903|   
#  904|                           /* Load public key for PCR policies, if one is specified, or explicitly requested */
systemd-259/src/shared/creds-util.c:902: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def194]
systemd-259/src/shared/creds-util.c:902: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}})' depends on order of evaluation of side effects
#  900|   
#  901|           if (try_tpm2) {
#  902|->                 if (CRED_KEY_WANTS_TPM2_PK(with_key) || CRED_KEY_REQUIRES_TPM2_PK(with_key)) {
#  903|   
#  904|                           /* Load public key for PCR policies, if one is specified, or explicitly requested */

Error: CPPCHECK_WARNING (CWE-768): [#def195]
systemd-259/src/shared/creds-util.c:902: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evaluation of side effects
#  900|   
#  901|           if (try_tpm2) {
#  902|->                 if (CRED_KEY_WANTS_TPM2_PK(with_key) || CRED_KEY_REQUIRES_TPM2_PK(with_key)) {
#  903|   
#  904|                           /* Load public key for PCR policies, if one is specified, or explicitly requested */

Error: CPPCHECK_WARNING (CWE-768): [#def196]
systemd-259/src/shared/creds-util.c:908: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}})' depends on order of evaluation of side effects
#  906|                           r = tpm2_load_pcr_public_key(tpm2_pubkey_path, &pubkey.iov_base, &pubkey.iov_len);
#  907|                           if (r < 0) {
#  908|->                                 if (r != -ENOENT || tpm2_pubkey_path || CRED_KEY_REQUIRES_TPM2_PK(with_key))
#  909|                                           return log_error_errno(r, "Failed to read TPM PCR public key: %m");
#  910|   

Error: CPPCHECK_WARNING (CWE-768): [#def197]
systemd-259/src/shared/creds-util.c:908: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evaluation of side effects
#  906|                           r = tpm2_load_pcr_public_key(tpm2_pubkey_path, &pubkey.iov_base, &pubkey.iov_len);
#  907|                           if (r < 0) {
#  908|->                                 if (r != -ENOENT || tpm2_pubkey_path || CRED_KEY_REQUIRES_TPM2_PK(with_key))
#  909|                                           return log_error_errno(r, "Failed to read TPM PCR public key: %m");
#  910|   

Error: CPPCHECK_WARNING (CWE-768): [#def198]
systemd-259/src/shared/creds-util.c:988: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}})' depends on order of evaluation of side effects
#  986|   #endif
#  987|   
#  988|->         if (CRED_KEY_IS_AUTO(with_key)) {
#  989|                   /* Let's settle the key type in auto mode now. */
#  990|   

Error: CPPCHECK_WARNING (CWE-768): [#def199]
systemd-259/src/shared/creds-util.c:988: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}})' depends on order of evaluation of side effects
#  986|   #endif
#  987|   
#  988|->         if (CRED_KEY_IS_AUTO(with_key)) {
#  989|                   /* Let's settle the key type in auto mode now. */
#  990|   

Error: CPPCHECK_WARNING (CWE-768): [#def200]
systemd-259/src/shared/creds-util.c:988: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x02,0xdc,0x8e,0xde,0x3a,0x02,0x43,0xab,0xa9,0xec,0x54,0x9c,0x05,0xe6,0xa0,0x71}})' depends on order of ev [...]
#  986|   #endif
#  987|   
#  988|->         if (CRED_KEY_IS_AUTO(with_key)) {
#  989|                   /* Let's settle the key type in auto mode now. */
#  990|   
systemd-259/src/shared/creds-util.c:988: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def201]
systemd-259/src/shared/creds-util.c:988: error[unknownEvaluationOrder]: Expression 'with_key,((const union sd_id128_t){.bytes={0xa2,0x19,0xcb,0x07,0x85,0xb2,0x4c,0x04,0xb1,0x6d,0x18,0xca,0xb9,0xd2,0xee,0x01}}),((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x02,0xdc,0x8e,0xde,0x3a,0x02,0x43,0xab,0xa9,0xec,0x54,0x9c,0x05,0xe6,0xa0,0x71}}),((const union sd_id128_ [...]
#  986|   #endif
#  987|   
#  988|->         if (CRED_KEY_IS_AUTO(with_key)) {
#  989|                   /* Let's settle the key type in auto mode now. */
#  990|   
systemd-259/src/shared/creds-util.c:988: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def202]
systemd-259/src/shared/creds-util.c:1226: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
# 1224|                   return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Encrypted file too short.");
# 1225|   
# 1226|->         if (!CRED_KEY_IS_VALID(h->id))
# 1227|                   return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Unknown encryption format, or corrupted data.");
# 1228|   

Error: CPPCHECK_WARNING (CWE-768): [#def203]
systemd-259/src/shared/creds-util.c:1226: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}})' depends on order of evaluation of side effects
# 1224|                   return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Encrypted file too short.");
# 1225|   
# 1226|->         if (!CRED_KEY_IS_VALID(h->id))
# 1227|                   return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Unknown encryption format, or corrupted data.");
# 1228|   

Error: CPPCHECK_WARNING (CWE-768): [#def204]
systemd-259/src/shared/creds-util.c:1226: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}})' depends on order of evalu [...]
# 1224|                   return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Encrypted file too short.");
# 1225|   
# 1226|->         if (!CRED_KEY_IS_VALID(h->id))
# 1227|                   return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Unknown encryption format, or corrupted data.");
# 1228|   
systemd-259/src/shared/creds-util.c:1226: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def205]
systemd-259/src/shared/creds-util.c:1226: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1224|                   return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Encrypted file too short.");
# 1225|   
# 1226|->         if (!CRED_KEY_IS_VALID(h->id))
# 1227|                   return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Unknown encryption format, or corrupted data.");
# 1228|   
systemd-259/src/shared/creds-util.c:1226: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def206]
systemd-259/src/shared/creds-util.c:1226: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1224|                   return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Encrypted file too short.");
# 1225|   
# 1226|->         if (!CRED_KEY_IS_VALID(h->id))
# 1227|                   return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Unknown encryption format, or corrupted data.");
# 1228|   
systemd-259/src/shared/creds-util.c:1226: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def207]
systemd-259/src/shared/creds-util.c:1226: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1224|                   return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Encrypted file too short.");
# 1225|   
# 1226|->         if (!CRED_KEY_IS_VALID(h->id))
# 1227|                   return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Unknown encryption format, or corrupted data.");
# 1228|   
systemd-259/src/shared/creds-util.c:1226: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def208]
systemd-259/src/shared/creds-util.c:1226: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1224|                   return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Encrypted file too short.");
# 1225|   
# 1226|->         if (!CRED_KEY_IS_VALID(h->id))
# 1227|                   return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Unknown encryption format, or corrupted data.");
# 1228|   
systemd-259/src/shared/creds-util.c:1226: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def209]
systemd-259/src/shared/creds-util.c:1226: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1224|                   return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Encrypted file too short.");
# 1225|   
# 1226|->         if (!CRED_KEY_IS_VALID(h->id))
# 1227|                   return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Unknown encryption format, or corrupted data.");
# 1228|   
systemd-259/src/shared/creds-util.c:1226: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def210]
systemd-259/src/shared/creds-util.c:1229: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}})' depends on order of evaluation of side effects
# 1227|                   return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Unknown encryption format, or corrupted data.");
# 1228|   
# 1229|->         if (CRED_KEY_REQUIRES_TPM2_PK(h->id)) {
# 1230|                   r = tpm2_load_pcr_signature(tpm2_signature_path, &signature_json);
# 1231|                   if (r == -ENOENT)

Error: CPPCHECK_WARNING (CWE-768): [#def211]
systemd-259/src/shared/creds-util.c:1229: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evaluation of side effects
# 1227|                   return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Unknown encryption format, or corrupted data.");
# 1228|   
# 1229|->         if (CRED_KEY_REQUIRES_TPM2_PK(h->id)) {
# 1230|                   r = tpm2_load_pcr_signature(tpm2_signature_path, &signature_json);
# 1231|                   if (r == -ENOENT)

Error: CPPCHECK_WARNING (CWE-768): [#def212]
systemd-259/src/shared/creds-util.c:1263: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
# 1261|           }
# 1262|   
# 1263|->         if (CRED_KEY_IS_SCOPED(h->id)) {
# 1264|                   if (!uid_is_valid(uid))
# 1265|                           return log_error_errno(SYNTHETIC_ERRNO(EMEDIUMTYPE), "Encrypted file is scoped to a user, but no user selected.");

Error: CPPCHECK_WARNING (CWE-768): [#def213]
systemd-259/src/shared/creds-util.c:1263: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}})' depends on order of evaluation of side effects
# 1261|           }
# 1262|   
# 1263|->         if (CRED_KEY_IS_SCOPED(h->id)) {
# 1264|                   if (!uid_is_valid(uid))
# 1265|                           return log_error_errno(SYNTHETIC_ERRNO(EMEDIUMTYPE), "Encrypted file is scoped to a user, but no user selected.");

Error: CPPCHECK_WARNING (CWE-768): [#def214]
systemd-259/src/shared/creds-util.c:1263: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evalu [...]
# 1261|           }
# 1262|   
# 1263|->         if (CRED_KEY_IS_SCOPED(h->id)) {
# 1264|                   if (!uid_is_valid(uid))
# 1265|                           return log_error_errno(SYNTHETIC_ERRNO(EMEDIUMTYPE), "Encrypted file is scoped to a user, but no user selected.");
systemd-259/src/shared/creds-util.c:1263: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def215]
systemd-259/src/shared/creds-util.c:1292: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}})' depends on order of evaluation of side effects
# 1290|           if (input->iov_len <
# 1291|               ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) +
# 1292|->             ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|               ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|               ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +

Error: CPPCHECK_WARNING (CWE-768): [#def216]
systemd-259/src/shared/creds-util.c:1292: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}})' depends on order of evaluation of side effects
# 1290|           if (input->iov_len <
# 1291|               ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) +
# 1292|->             ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|               ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|               ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +

Error: CPPCHECK_WARNING (CWE-768): [#def217]
systemd-259/src/shared/creds-util.c:1292: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}})' depends on order of evalu [...]
# 1290|           if (input->iov_len <
# 1291|               ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) +
# 1292|->             ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|               ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|               ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
systemd-259/src/shared/creds-util.c:1292: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def218]
systemd-259/src/shared/creds-util.c:1292: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1290|           if (input->iov_len <
# 1291|               ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) +
# 1292|->             ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|               ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|               ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
systemd-259/src/shared/creds-util.c:1292: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def219]
systemd-259/src/shared/creds-util.c:1292: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1290|           if (input->iov_len <
# 1291|               ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) +
# 1292|->             ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|               ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|               ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
systemd-259/src/shared/creds-util.c:1292: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def220]
systemd-259/src/shared/creds-util.c:1292: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1290|           if (input->iov_len <
# 1291|               ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) +
# 1292|->             ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|               ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|               ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
systemd-259/src/shared/creds-util.c:1292: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def221]
systemd-259/src/shared/creds-util.c:1292: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1290|           if (input->iov_len <
# 1291|               ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) +
# 1292|->             ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|               ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|               ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
systemd-259/src/shared/creds-util.c:1292: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def222]
systemd-259/src/shared/creds-util.c:1293: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}})' depends on order of evaluation of side effects
# 1291|               ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) +
# 1292|               ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|->             ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|               ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1295|               ALIGN8(offsetof(struct metadata_credential_header, name)) +

Error: CPPCHECK_WARNING (CWE-768): [#def223]
systemd-259/src/shared/creds-util.c:1293: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evaluation of side effects
# 1291|               ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size)) +
# 1292|               ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|->             ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|               ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1295|               ALIGN8(offsetof(struct metadata_credential_header, name)) +

Error: CPPCHECK_WARNING (CWE-768): [#def224]
systemd-259/src/shared/creds-util.c:1294: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
# 1292|               ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|               ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|->             ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1295|               ALIGN8(offsetof(struct metadata_credential_header, name)) +
# 1296|               le32toh(h->tag_size))

Error: CPPCHECK_WARNING (CWE-768): [#def225]
systemd-259/src/shared/creds-util.c:1294: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}})' depends on order of evaluation of side effects
# 1292|               ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|               ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|->             ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1295|               ALIGN8(offsetof(struct metadata_credential_header, name)) +
# 1296|               le32toh(h->tag_size))

Error: CPPCHECK_WARNING (CWE-768): [#def226]
systemd-259/src/shared/creds-util.c:1294: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evalu [...]
# 1292|               ALIGN8(CRED_KEY_REQUIRES_TPM2(h->id) ? offsetof(struct tpm2_credential_header, policy_hash_and_blob) : 0) +
# 1293|               ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1294|->             ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1295|               ALIGN8(offsetof(struct metadata_credential_header, name)) +
# 1296|               le32toh(h->tag_size))
systemd-259/src/shared/creds-util.c:1294: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def227]
systemd-259/src/shared/creds-util.c:1301: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}})' depends on order of evaluation of side effects
# 1299|           p = ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size));
# 1300|   
# 1301|->         if (CRED_KEY_REQUIRES_TPM2(h->id)) {
# 1302|   #if HAVE_TPM2
# 1303|                   struct tpm2_credential_header* t = (struct tpm2_credential_header*) ((uint8_t*) input->iov_base + p);

Error: CPPCHECK_WARNING (CWE-768): [#def228]
systemd-259/src/shared/creds-util.c:1301: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}})' depends on order of evaluation of side effects
# 1299|           p = ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size));
# 1300|   
# 1301|->         if (CRED_KEY_REQUIRES_TPM2(h->id)) {
# 1302|   #if HAVE_TPM2
# 1303|                   struct tpm2_credential_header* t = (struct tpm2_credential_header*) ((uint8_t*) input->iov_base + p);

Error: CPPCHECK_WARNING (CWE-768): [#def229]
systemd-259/src/shared/creds-util.c:1301: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}})' depends on order of evalu [...]
# 1299|           p = ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size));
# 1300|   
# 1301|->         if (CRED_KEY_REQUIRES_TPM2(h->id)) {
# 1302|   #if HAVE_TPM2
# 1303|                   struct tpm2_credential_header* t = (struct tpm2_credential_header*) ((uint8_t*) input->iov_base + p);
systemd-259/src/shared/creds-util.c:1301: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def230]
systemd-259/src/shared/creds-util.c:1301: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1299|           p = ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size));
# 1300|   
# 1301|->         if (CRED_KEY_REQUIRES_TPM2(h->id)) {
# 1302|   #if HAVE_TPM2
# 1303|                   struct tpm2_credential_header* t = (struct tpm2_credential_header*) ((uint8_t*) input->iov_base + p);
systemd-259/src/shared/creds-util.c:1301: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def231]
systemd-259/src/shared/creds-util.c:1301: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1299|           p = ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size));
# 1300|   
# 1301|->         if (CRED_KEY_REQUIRES_TPM2(h->id)) {
# 1302|   #if HAVE_TPM2
# 1303|                   struct tpm2_credential_header* t = (struct tpm2_credential_header*) ((uint8_t*) input->iov_base + p);
systemd-259/src/shared/creds-util.c:1301: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def232]
systemd-259/src/shared/creds-util.c:1301: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1299|           p = ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size));
# 1300|   
# 1301|->         if (CRED_KEY_REQUIRES_TPM2(h->id)) {
# 1302|   #if HAVE_TPM2
# 1303|                   struct tpm2_credential_header* t = (struct tpm2_credential_header*) ((uint8_t*) input->iov_base + p);
systemd-259/src/shared/creds-util.c:1301: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def233]
systemd-259/src/shared/creds-util.c:1301: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x45,0xf3,0xa6,0x7e,0x0c,0x12,0x42,0x56,0xa4,0xee,0x75,0xeb,0x44,0xc6,0x5a,0x6f}}),((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x0c,0x7c,0xc0,0x7b,0x11,0x76,0x45,0x91,0x9c,0x4b,0x0b,0xea,0x08,0xbc,0x20,0xfe}}),((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){ [...]
# 1299|           p = ALIGN8(offsetof(struct encrypted_credential_header, iv) + le32toh(h->iv_size));
# 1300|   
# 1301|->         if (CRED_KEY_REQUIRES_TPM2(h->id)) {
# 1302|   #if HAVE_TPM2
# 1303|                   struct tpm2_credential_header* t = (struct tpm2_credential_header*) ((uint8_t*) input->iov_base + p);
systemd-259/src/shared/creds-util.c:1301: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def234]
systemd-259/src/shared/creds-util.c:1322: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}})' depends on order of evaluation of side effects
# 1320|                       p +
# 1321|                       ALIGN8(offsetof(struct tpm2_credential_header, policy_hash_and_blob) + le32toh(t->blob_size) + le32toh(t->policy_hash_size)) +
# 1322|->                     ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1323|                       ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1324|                       ALIGN8(offsetof(struct metadata_credential_header, name)) +

Error: CPPCHECK_WARNING (CWE-768): [#def235]
systemd-259/src/shared/creds-util.c:1322: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evaluation of side effects
# 1320|                       p +
# 1321|                       ALIGN8(offsetof(struct tpm2_credential_header, policy_hash_and_blob) + le32toh(t->blob_size) + le32toh(t->policy_hash_size)) +
# 1322|->                     ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1323|                       ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1324|                       ALIGN8(offsetof(struct metadata_credential_header, name)) +

Error: CPPCHECK_WARNING (CWE-768): [#def236]
systemd-259/src/shared/creds-util.c:1323: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
# 1321|                       ALIGN8(offsetof(struct tpm2_credential_header, policy_hash_and_blob) + le32toh(t->blob_size) + le32toh(t->policy_hash_size)) +
# 1322|                       ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1323|->                     ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1324|                       ALIGN8(offsetof(struct metadata_credential_header, name)) +
# 1325|                       le32toh(h->tag_size))

Error: CPPCHECK_WARNING (CWE-768): [#def237]
systemd-259/src/shared/creds-util.c:1323: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}})' depends on order of evaluation of side effects
# 1321|                       ALIGN8(offsetof(struct tpm2_credential_header, policy_hash_and_blob) + le32toh(t->blob_size) + le32toh(t->policy_hash_size)) +
# 1322|                       ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1323|->                     ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1324|                       ALIGN8(offsetof(struct metadata_credential_header, name)) +
# 1325|                       le32toh(h->tag_size))

Error: CPPCHECK_WARNING (CWE-768): [#def238]
systemd-259/src/shared/creds-util.c:1323: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evalu [...]
# 1321|                       ALIGN8(offsetof(struct tpm2_credential_header, policy_hash_and_blob) + le32toh(t->blob_size) + le32toh(t->policy_hash_size)) +
# 1322|                       ALIGN8(CRED_KEY_REQUIRES_TPM2_PK(h->id) ? offsetof(struct tpm2_public_key_credential_header, data) : 0) +
# 1323|->                     ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1324|                       ALIGN8(offsetof(struct metadata_credential_header, name)) +
# 1325|                       le32toh(h->tag_size))
systemd-259/src/shared/creds-util.c:1323: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def239]
systemd-259/src/shared/creds-util.c:1332: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}})' depends on order of evaluation of side effects
# 1330|                               le32toh(t->policy_hash_size));
# 1331|   
# 1332|->                 if (CRED_KEY_REQUIRES_TPM2_PK(h->id)) {
# 1333|                           z = (struct tpm2_public_key_credential_header*) ((uint8_t*) input->iov_base + p);
# 1334|   

Error: CPPCHECK_WARNING (CWE-768): [#def240]
systemd-259/src/shared/creds-util.c:1332: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xfa,0xf7,0xeb,0x93,0x41,0xe3,0x41,0x2c,0xa1,0xa4,0x36,0xf9,0x5a,0x29,0x36,0x2f}}),((const union sd_id128_t){.bytes={0xaf,0x49,0x50,0xa8,0x49,0x13,0x4e,0xb1,0xa7,0x38,0x46,0x30,0x4f,0xf3,0x0c,0x05}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evaluation of side effects
# 1330|                               le32toh(t->policy_hash_size));
# 1331|   
# 1332|->                 if (CRED_KEY_REQUIRES_TPM2_PK(h->id)) {
# 1333|                           z = (struct tpm2_public_key_credential_header*) ((uint8_t*) input->iov_base + p);
# 1334|   

Error: CPPCHECK_WARNING (CWE-768): [#def241]
systemd-259/src/shared/creds-util.c:1343: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
# 1341|                               p +
# 1342|                               ALIGN8(offsetof(struct tpm2_public_key_credential_header, data) + le32toh(z->size)) +
# 1343|->                             ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1344|                               ALIGN8(offsetof(struct metadata_credential_header, name)) +
# 1345|                               le32toh(h->tag_size))

Error: CPPCHECK_WARNING (CWE-768): [#def242]
systemd-259/src/shared/creds-util.c:1343: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}})' depends on order of evaluation of side effects
# 1341|                               p +
# 1342|                               ALIGN8(offsetof(struct tpm2_public_key_credential_header, data) + le32toh(z->size)) +
# 1343|->                             ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1344|                               ALIGN8(offsetof(struct metadata_credential_header, name)) +
# 1345|                               le32toh(h->tag_size))

Error: CPPCHECK_WARNING (CWE-768): [#def243]
systemd-259/src/shared/creds-util.c:1343: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evalu [...]
# 1341|                               p +
# 1342|                               ALIGN8(offsetof(struct tpm2_public_key_credential_header, data) + le32toh(z->size)) +
# 1343|->                             ALIGN8(CRED_KEY_IS_SCOPED(h->id) ? sizeof(struct scoped_credential_header) : 0) +
# 1344|                               ALIGN8(offsetof(struct metadata_credential_header, name)) +
# 1345|                               le32toh(h->tag_size))
systemd-259/src/shared/creds-util.c:1343: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def244]
systemd-259/src/shared/creds-util.c:1385: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
# 1383|           }
# 1384|   
# 1385|->         if (CRED_KEY_IS_SCOPED(h->id)) {
# 1386|                   struct scoped_credential_header* sh = (struct scoped_credential_header*) ((uint8_t*) input->iov_base + p);
# 1387|   

Error: CPPCHECK_WARNING (CWE-768): [#def245]
systemd-259/src/shared/creds-util.c:1385: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}})' depends on order of evaluation of side effects
# 1383|           }
# 1384|   
# 1385|->         if (CRED_KEY_IS_SCOPED(h->id)) {
# 1386|                   struct scoped_credential_header* sh = (struct scoped_credential_header*) ((uint8_t*) input->iov_base + p);
# 1387|   

Error: CPPCHECK_WARNING (CWE-768): [#def246]
systemd-259/src/shared/creds-util.c:1385: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evalu [...]
# 1383|           }
# 1384|   
# 1385|->         if (CRED_KEY_IS_SCOPED(h->id)) {
# 1386|                   struct scoped_credential_header* sh = (struct scoped_credential_header*) ((uint8_t*) input->iov_base + p);
# 1387|   
systemd-259/src/shared/creds-util.c:1385: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def247]
systemd-259/src/shared/creds-util.c:1401: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}})' depends on order of evaluation of side effects
# 1399|           }
# 1400|   
# 1401|->         if (CRED_KEY_REQUIRES_HOST(h->id)) {
# 1402|                   r = get_credential_host_secret(/* flags= */ 0, &host_key);
# 1403|                   if (r < 0)

Error: CPPCHECK_WARNING (CWE-768): [#def248]
systemd-259/src/shared/creds-util.c:1401: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
# 1399|           }
# 1400|   
# 1401|->         if (CRED_KEY_REQUIRES_HOST(h->id)) {
# 1402|                   r = get_credential_host_secret(/* flags= */ 0, &host_key);
# 1403|                   if (r < 0)

Error: CPPCHECK_WARNING (CWE-768): [#def249]
systemd-259/src/shared/creds-util.c:1401: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x93,0xa8,0x94,0x09,0x48,0x74,0x44,0x90,0x90,0xca,0xf2,0xfc,0x93,0xca,0xb5,0x53}})' depends on order of evalu [...]
# 1399|           }
# 1400|   
# 1401|->         if (CRED_KEY_REQUIRES_HOST(h->id)) {
# 1402|                   r = get_credential_host_secret(/* flags= */ 0, &host_key);
# 1403|                   if (r < 0)
systemd-259/src/shared/creds-util.c:1401: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def250]
systemd-259/src/shared/creds-util.c:1401: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x93,0xa8,0x94,0x09,0x48,0x74,0x44,0x90,0x90,0xca,0xf2,0xfc,0x93,0xca,0xb5,0x53}}),((const union sd_id128_t){ [...]
# 1399|           }
# 1400|   
# 1401|->         if (CRED_KEY_REQUIRES_HOST(h->id)) {
# 1402|                   r = get_credential_host_secret(/* flags= */ 0, &host_key);
# 1403|                   if (r < 0)
systemd-259/src/shared/creds-util.c:1401: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def251]
systemd-259/src/shared/creds-util.c:1401: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x93,0xa8,0x94,0x09,0x48,0x74,0x44,0x90,0x90,0xca,0xf2,0xfc,0x93,0xca,0xb5,0x53}}),((const union sd_id128_t){ [...]
# 1399|           }
# 1400|   
# 1401|->         if (CRED_KEY_REQUIRES_HOST(h->id)) {
# 1402|                   r = get_credential_host_secret(/* flags= */ 0, &host_key);
# 1403|                   if (r < 0)
systemd-259/src/shared/creds-util.c:1401: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def252]
systemd-259/src/shared/creds-util.c:1401: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0xda,0xf6,0x7a,0x60,0xd3,0xeb,0x47,0xb3,0xa9,0xbe,0x2f,0xd5,0xfe,0xc2,0x15,0x22}}),((const union sd_id128_t){.bytes={0x5a,0x1c,0x6a,0x86,0xdf,0x9d,0x40,0x96,0xb1,0xd5,0xa6,0x5e,0x08,0x62,0xf1,0x9a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0x93,0xa8,0x94,0x09,0x48,0x74,0x44,0x90,0x90,0xca,0xf2,0xfc,0x93,0xca,0xb5,0x53}}),((const union sd_id128_t){ [...]
# 1399|           }
# 1400|   
# 1401|->         if (CRED_KEY_REQUIRES_HOST(h->id)) {
# 1402|                   r = get_credential_host_secret(/* flags= */ 0, &host_key);
# 1403|                   if (r < 0)
systemd-259/src/shared/creds-util.c:1401: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-768): [#def253]
systemd-259/src/shared/creds-util.c:1412: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}})' depends on order of evaluation of side effects
# 1410|           sha256_hash_host_and_tpm2_key(&host_key, &tpm2_key, md);
# 1411|   
# 1412|->         if (CRED_KEY_IS_SCOPED(h->id)) {
# 1413|                   r = mangle_uid_into_key(uid, md);
# 1414|                   if (r < 0)

Error: CPPCHECK_WARNING (CWE-768): [#def254]
systemd-259/src/shared/creds-util.c:1412: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}})' depends on order of evaluation of side effects
# 1410|           sha256_hash_host_and_tpm2_key(&host_key, &tpm2_key, md);
# 1411|   
# 1412|->         if (CRED_KEY_IS_SCOPED(h->id)) {
# 1413|                   r = mangle_uid_into_key(uid, md);
# 1414|                   if (r < 0)

Error: CPPCHECK_WARNING (CWE-768): [#def255]
systemd-259/src/shared/creds-util.c:1412: error[unknownEvaluationOrder]: Expression 'h->id,((const union sd_id128_t){.bytes={0x23,0x88,0x96,0x85,0x6f,0x74,0x48,0x8a,0x9c,0x78,0x6f,0x6a,0xb0,0xe7,0x3b,0x6a}}),((const union sd_id128_t){.bytes={0x55,0xb9,0xed,0x1d,0x38,0x59,0x4d,0x43,0xa8,0x31,0x9d,0x2e,0xbb,0x33,0x2a,0xc6}}),((const union sd_id128_t){.bytes={0xef,0x4a,0xc1,0x36,0x79,0xa9,0x48,0x0e,0xa7,0xdb,0x68,0x89,0x7f,0x9f,0x16,0x5d}}),((const union sd_id128_t){.bytes={0xad,0xbc,0x4c,0xa3,0xef,0xb6,0x42,0x01,0xba,0x88,0x1b,0x6f,0x2e,0x40,0x95,0xea}})' depends on order of evalu [...]
# 1410|           sha256_hash_host_and_tpm2_key(&host_key, &tpm2_key, md);
# 1411|   
# 1412|->         if (CRED_KEY_IS_SCOPED(h->id)) {
# 1413|                   r = mangle_uid_into_key(uid, md);
# 1414|                   if (r < 0)
systemd-259/src/shared/creds-util.c:1412: note: trimmed 1 message(s) with length over 512

Error: GCC_ANALYZER_WARNING (CWE-457): [#def256]
systemd-259/src/shared/dns-answer.c:26:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*p.n_ref’
systemd-259/src/shared/dns-answer.c:109:12: enter_function: entry to ‘dns_answer_add_raw’
systemd-259/src/shared/dns-answer.c:120:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-answer.c:122:12: branch_false: ...to here
systemd-259/src/shared/dns-answer.c:122:12: branch_false: following ‘false’ branch (when ‘a’ is non-NULL)...
systemd-259/src/shared/dns-answer.c:125:13: call_function: inlined call to ‘dns_answer_size’ from ‘dns_answer_add_raw’
systemd-259/src/shared/dns-answer.c:125:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-answer.c:128:16: call_function: inlined call to ‘malloc_multiply’ from ‘dns_answer_add_raw’
systemd-259/src/shared/dns-answer.c:129:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-answer.c:134:23: branch_false: ...to here
systemd-259/src/shared/dns-answer.c:134:23: throw: if ‘dns_resource_record_ref’ throws an exception...
systemd-259/src/shared/dns-answer.c:117:58: call_function: inlined call to ‘dns_answer_item_unrefp’ from ‘dns_answer_add_raw’
#   24|   }
#   25|   
#   26|-> DEFINE_PRIVATE_TRIVIAL_REF_UNREF_FUNC(DnsAnswerItem, dns_answer_item, dns_answer_item_free);
#   27|   DEFINE_TRIVIAL_CLEANUP_FUNC(DnsAnswerItem*, dns_answer_item_unref);
#   28|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
systemd-259/src/shared/dns-answer.c:75:48: warning[-Wanalyzer-malloc-leak]: leak of ‘a’
systemd-259/src/shared/dns-answer.c:682:5: enter_function: entry to ‘dns_answer_reserve’
systemd-259/src/shared/dns-answer.c:683:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-answer.c:685:12: branch_false: ...to here
systemd-259/src/shared/dns-answer.c:685:12: branch_false: following ‘false’ branch (when ‘n_free != 0’)...
systemd-259/src/shared/dns-answer.c:688:14: branch_false: ...to here
systemd-259/src/shared/dns-answer.c:688:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/dns-answer.c:691:21: branch_true: ...to here
systemd-259/src/shared/dns-answer.c:691:21: call_function: calling ‘dns_answer_new’ from ‘dns_answer_reserve’
#   73|   
#   74|   DnsAnswer *dns_answer_new(size_t n) {
#   75|->         _cleanup_ordered_set_free_ OrderedSet *s = NULL;
#   76|           _cleanup_(dns_answer_unrefp) DnsAnswer *a = NULL;
#   77|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
systemd-259/src/shared/dns-answer.c:141:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(40)’
systemd-259/src/shared/dns-answer.c:109:12: enter_function: entry to ‘dns_answer_add_raw’
systemd-259/src/shared/dns-answer.c:120:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-answer.c:122:12: branch_false: ...to here
systemd-259/src/shared/dns-answer.c:122:12: branch_false: following ‘false’ branch (when ‘a’ is non-NULL)...
systemd-259/src/shared/dns-answer.c:125:13: call_function: inlined call to ‘dns_answer_size’ from ‘dns_answer_add_raw’
systemd-259/src/shared/dns-answer.c:125:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-answer.c:128:16: call_function: inlined call to ‘malloc_multiply’ from ‘dns_answer_add_raw’
systemd-259/src/shared/dns-answer.c:129:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-answer.c:134:23: branch_false: ...to here
systemd-259/src/shared/dns-answer.c:141:13: call_function: inlined call to ‘ordered_set_put’ from ‘dns_answer_add_raw’
systemd-259/src/shared/dns-answer.c:117:58: call_function: inlined call to ‘dns_answer_item_unrefp’ from ‘dns_answer_add_raw’
#  139|           };
#  140|   
#  141|->         r = ordered_set_put(a->items, item);
#  142|           if (r < 0)
#  143|                   return r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
systemd-259/src/shared/dns-question.c:36:17: warning[-Wanalyzer-malloc-leak]: leak of ‘k’
systemd-259/src/shared/dns-question.c:572:5: enter_function: entry to ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:576:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:578:12: branch_false: ...to here
systemd-259/src/shared/dns-question.c:578:12: branch_false: following ‘false’ branch (when ‘a != b’)...
systemd-259/src/shared/dns-question.c:578:23: call_function: inlined call to ‘dns_question_size’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:578:13: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:583:13: call_function: inlined call to ‘dns_question_size’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:583:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:588:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:588:13: call_function: calling ‘dns_question_new’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:588:13: return_function: returning to ‘dns_question_merge’ from ‘dns_question_new’
systemd-259/src/shared/dns-question.c:589:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:592:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:592:13: call_function: calling ‘dns_question_add_raw_all’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:573:53: call_function: calling ‘dns_question_unrefp’ from ‘dns_question_merge’
#   34|   
#   35|           DNS_QUESTION_FOREACH(key, q)
#   36|->                 dns_resource_key_unref(key);
#   37|   
#   38|           return mfree(q);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def260]
systemd-259/src/shared/dns-question.c:36:17: warning[-Wanalyzer-malloc-leak]: leak of ‘nq’
systemd-259/src/shared/dns-question.c:604:5: enter_function: entry to ‘dns_json_dispatch_question’
systemd-259/src/shared/dns-question.c:605:27: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:608:14: branch_false: ...to here
systemd-259/src/shared/dns-question.c:608:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:611:53: branch_false: ...to here
systemd-259/src/shared/dns-question.c:612:14: call_function: calling ‘dns_question_new’ from ‘dns_json_dispatch_question’
systemd-259/src/shared/dns-question.c:612:14: return_function: returning to ‘dns_json_dispatch_question’ from ‘dns_question_new’
systemd-259/src/shared/dns-question.c:613:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:613:12: branch_false: ...to here
systemd-259/src/shared/dns-question.c:617:9: branch_true: following ‘true’ branch...
systemd-259/src/shared/dns-question.c:611:53: call_function: calling ‘dns_question_unrefp’ from ‘dns_json_dispatch_question’
#   34|   
#   35|           DNS_QUESTION_FOREACH(key, q)
#   36|->                 dns_resource_key_unref(key);
#   37|   
#   38|           return mfree(q);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
systemd-259/src/shared/dns-question.c:36:17: warning[-Wanalyzer-malloc-leak]: leak of ‘n’
systemd-259/src/shared/dns-question.c:246:5: enter_function: entry to ‘dns_question_cname_redirect’
systemd-259/src/shared/dns-question.c:252:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:253:9: branch_false: ...to here
systemd-259/src/shared/dns-question.c:253:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:254:9: branch_false: ...to here
systemd-259/src/shared/dns-question.c:256:13: call_function: inlined call to ‘dns_question_size’ from ‘dns_question_cname_redirect’
systemd-259/src/shared/dns-question.c:256:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:261:9: branch_false: ...to here
systemd-259/src/shared/dns-question.c:261:9: branch_true: following ‘true’ branch...
systemd-259/src/shared/dns-question.c:262:38: branch_true: ...to here
systemd-259/src/shared/dns-question.c:278:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:281:20: branch_false: ...to here
systemd-259/src/shared/dns-question.c:293:13: call_function: calling ‘dns_question_new’ from ‘dns_question_cname_redirect’
systemd-259/src/shared/dns-question.c:293:13: return_function: returning to ‘dns_question_cname_redirect’ from ‘dns_question_new’
systemd-259/src/shared/dns-question.c:294:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:298:9: branch_false: ...to here
systemd-259/src/shared/dns-question.c:298:9: branch_true: following ‘true’ branch...
systemd-259/src/shared/dns-question.c:247:53: call_function: calling ‘dns_question_unrefp’ from ‘dns_question_cname_redirect’
#   34|   
#   35|           DNS_QUESTION_FOREACH(key, q)
#   36|->                 dns_resource_key_unref(key);
#   37|   
#   38|           return mfree(q);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
systemd-259/src/shared/dns-question.c:36:17: warning[-Wanalyzer-malloc-leak]: leak of ‘q’
systemd-259/src/shared/dns-question.c:326:5: enter_function: entry to ‘dns_question_new_address’
systemd-259/src/shared/dns-question.c:331:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:332:9: branch_false: ...to here
systemd-259/src/shared/dns-question.c:332:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:334:14: branch_false: ...to here
systemd-259/src/shared/dns-question.c:342:12: branch_false: following ‘false’ branch (when ‘convert_idna == 0’)...
systemd-259/src/shared/dns-question.c:356:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:356:13: call_function: calling ‘dns_question_new’ from ‘dns_question_new_address’
systemd-259/src/shared/dns-question.c:356:13: return_function: returning to ‘dns_question_new_address’ from ‘dns_question_new’
systemd-259/src/shared/dns-question.c:357:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:360:12: branch_false: ...to here
systemd-259/src/shared/dns-question.c:364:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:367:21: branch_false: ...to here
systemd-259/src/shared/dns-question.c:367:21: call_function: calling ‘dns_question_add’ from ‘dns_question_new_address’
systemd-259/src/shared/dns-question.c:361:68: call_function: calling ‘dns_resource_key_unrefp’ from ‘dns_question_new_address’
systemd-259/src/shared/dns-question.c:327:53: call_function: calling ‘dns_question_unrefp’ from ‘dns_question_new_address’
#   34|   
#   35|           DNS_QUESTION_FOREACH(key, q)
#   36|->                 dns_resource_key_unref(key);
#   37|   
#   38|           return mfree(q);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
systemd-259/src/shared/dns-question.c:41:1: warning[-Wanalyzer-malloc-leak]: leak of ‘k’
systemd-259/src/shared/dns-question.c:572:5: enter_function: entry to ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:576:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:578:12: branch_false: ...to here
systemd-259/src/shared/dns-question.c:578:12: branch_false: following ‘false’ branch (when ‘a != b’)...
systemd-259/src/shared/dns-question.c:578:23: call_function: inlined call to ‘dns_question_size’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:578:13: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:583:13: call_function: inlined call to ‘dns_question_size’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:583:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:588:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:588:13: call_function: calling ‘dns_question_new’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:588:13: return_function: returning to ‘dns_question_merge’ from ‘dns_question_new’
systemd-259/src/shared/dns-question.c:589:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:592:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:592:13: call_function: calling ‘dns_question_add_raw_all’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:573:53: call_function: calling ‘dns_question_unrefp’ from ‘dns_question_merge’
#   39|   }
#   40|   
#   41|-> DEFINE_TRIVIAL_REF_UNREF_FUNC(DnsQuestion, dns_question, dns_question_free);
#   42|   
#   43|   int dns_question_add_raw(DnsQuestion *q, DnsResourceKey *key, DnsQuestionFlags flags) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def264]
systemd-259/src/shared/dns-question.c:82:44: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘item’
systemd-259/src/shared/dns-question.c:604:5: enter_function: entry to ‘dns_json_dispatch_question’
systemd-259/src/shared/dns-question.c:605:27: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:608:14: branch_false: ...to here
systemd-259/src/shared/dns-question.c:608:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:611:53: branch_false: ...to here
systemd-259/src/shared/dns-question.c:612:14: call_function: calling ‘dns_question_new’ from ‘dns_json_dispatch_question’
systemd-259/src/shared/dns-question.c:612:14: return_function: returning to ‘dns_json_dispatch_question’ from ‘dns_question_new’
systemd-259/src/shared/dns-question.c:613:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:613:12: branch_false: ...to here
systemd-259/src/shared/dns-question.c:617:9: branch_true: following ‘true’ branch...
systemd-259/src/shared/dns-question.c:626:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:629:21: branch_false: ...to here
systemd-259/src/shared/dns-question.c:629:21: call_function: calling ‘dns_question_add’ from ‘dns_json_dispatch_question’
#   80|   
#   81|           DNS_QUESTION_FOREACH_ITEM(item, q) {
#   82|->                 r = dns_resource_key_equal(item->key, key);
#   83|                   if (r < 0)
#   84|                           return r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
systemd-259/src/shared/dns-question.c:390:60: warning[-Wanalyzer-malloc-leak]: leak of ‘q’
systemd-259/src/shared/dns-question.c:389:5: enter_function: entry to ‘dns_question_new_reverse’
systemd-259/src/shared/dns-question.c:395:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:396:9: branch_false: ...to here
systemd-259/src/shared/dns-question.c:396:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:398:14: branch_false: ...to here
systemd-259/src/shared/dns-question.c:402:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:405:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:405:13: call_function: calling ‘dns_question_new’ from ‘dns_question_new_reverse’
systemd-259/src/shared/dns-question.c:405:13: return_function: returning to ‘dns_question_new_reverse’ from ‘dns_question_new’
systemd-259/src/shared/dns-question.c:406:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:409:15: branch_false: ...to here
systemd-259/src/shared/dns-question.c:410:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:413:9: branch_false: ...to here
systemd-259/src/shared/dns-question.c:415:13: call_function: calling ‘dns_question_add’ from ‘dns_question_new_reverse’
systemd-259/src/shared/dns-question.c:391:53: call_function: calling ‘dns_question_unrefp’ from ‘dns_question_new_reverse’
systemd-259/src/shared/dns-question.c:390:60: call_function: calling ‘dns_resource_key_unrefp’ from ‘dns_question_new_reverse’
systemd-259/src/shared/dns-question.c:390:60: return_function: returning to ‘dns_question_new_reverse’ from ‘dns_resource_key_unrefp’
systemd-259/src/shared/dns-question.c:390:60: danger: ‘q’ leaks here; was allocated at [(12)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/11)
#  388|   
#  389|   int dns_question_new_reverse(DnsQuestion **ret, int family, const union in_addr_union *a) {
#  390|->         _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
#  391|           _cleanup_(dns_question_unrefp) DnsQuestion *q = NULL;
#  392|           _cleanup_free_ char *reverse = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
systemd-259/src/shared/dns-question.c:425:60: warning[-Wanalyzer-malloc-leak]: leak of ‘q’
systemd-259/src/shared/dns-question.c:424:5: enter_function: entry to ‘dns_question_new_service_pointer’
systemd-259/src/shared/dns-question.c:431:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:433:12: branch_false: ...to here
systemd-259/src/shared/dns-question.c:433:12: branch_false: following ‘false’ branch (when ‘domain’ is non-NULL)...
systemd-259/src/shared/dns-question.c:436:12: branch_false: ...to here
systemd-259/src/shared/dns-question.c:436:12: branch_false: following ‘false’ branch (when ‘type’ is NULL)...
systemd-259/src/shared/dns-question.c:454:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:454:13: call_function: calling ‘dns_question_new’ from ‘dns_question_new_service_pointer’
systemd-259/src/shared/dns-question.c:454:13: return_function: returning to ‘dns_question_new_service_pointer’ from ‘dns_question_new’
systemd-259/src/shared/dns-question.c:455:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:458:15: branch_false: ...to here
systemd-259/src/shared/dns-question.c:459:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:462:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:462:13: call_function: calling ‘dns_question_add’ from ‘dns_question_new_service_pointer’
systemd-259/src/shared/dns-question.c:426:53: call_function: calling ‘dns_question_unrefp’ from ‘dns_question_new_service_pointer’
systemd-259/src/shared/dns-question.c:425:60: call_function: calling ‘dns_resource_key_unrefp’ from ‘dns_question_new_service_pointer’
systemd-259/src/shared/dns-question.c:425:60: return_function: returning to ‘dns_question_new_service_pointer’ from ‘dns_resource_key_unrefp’
systemd-259/src/shared/dns-question.c:425:60: danger: ‘q’ leaks here; was allocated at [(10)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/9)
#  423|   
#  424|   int dns_question_new_service_pointer(DnsQuestion **ret, const char *type, const char *domain, bool convert_idna) {
#  425|->         _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
#  426|           _cleanup_(dns_question_unrefp) DnsQuestion *q = NULL;
#  427|           _cleanup_free_ char *buf = NULL, *joined = NULL;

Error: CPPCHECK_WARNING (CWE-457): [#def267]
systemd-259/src/shared/dns-question.c:625: error[uninitvar]: Uninitialized variable: i
#  623|                   };
#  624|   
#  625|->                 r = sd_json_dispatch(i, dispatch_table, flags, &key);
#  626|                   if (r < 0)
#  627|                           return r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
systemd-259/src/shared/dns-question.h:65:1: warning[-Wanalyzer-malloc-leak]: leak of ‘k’
systemd-259/src/shared/dns-question.c:572:5: enter_function: entry to ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:576:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:578:12: branch_false: ...to here
systemd-259/src/shared/dns-question.c:578:12: branch_false: following ‘false’ branch (when ‘a != b’)...
systemd-259/src/shared/dns-question.c:578:23: call_function: inlined call to ‘dns_question_size’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:578:13: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:583:13: call_function: inlined call to ‘dns_question_size’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:583:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:588:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:588:13: call_function: calling ‘dns_question_new’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:588:13: return_function: returning to ‘dns_question_merge’ from ‘dns_question_new’
systemd-259/src/shared/dns-question.c:589:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:592:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:592:13: call_function: calling ‘dns_question_add_raw_all’ from ‘dns_question_merge’
systemd-259/src/shared/dns-question.c:573:53: call_function: calling ‘dns_question_unrefp’ from ‘dns_question_merge’
#   63|   int dns_json_dispatch_question(const char *name, sd_json_variant *variant, sd_json_dispatch_flags_t flags, void *userdata);
#   64|   
#   65|-> DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQuestion*, dns_question_unref);
#   66|   
#   67|   #define _DNS_QUESTION_FOREACH(u, k, q)                                     \

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
systemd-259/src/shared/dns-rr.c:128:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(112)’
systemd-259/src/shared/dns-rr.c:1740:20: enter_function: entry to ‘dns_resource_record_copy’
systemd-259/src/shared/dns-rr.c:1744:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-rr.c:1746:16: branch_false: ...to here
systemd-259/src/shared/dns-rr.c:1746:16: call_function: calling ‘dns_resource_record_new’ from ‘dns_resource_record_copy’
#  126|           /* Static/const keys created with DNS_RESOURCE_KEY_CONST will
#  127|            * set this to -1, they should not be reffed/unreffed */
#  128|->         assert(k->n_ref != UINT_MAX);
#  129|   
#  130|           assert(k->n_ref > 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
systemd-259/src/shared/dns-rr.c:527:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
systemd-259/src/shared/dns-rr.c:1740:20: enter_function: entry to ‘dns_resource_record_copy’
systemd-259/src/shared/dns-rr.c:1744:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-rr.c:1746:16: branch_false: ...to here
systemd-259/src/shared/dns-rr.c:1746:16: call_function: calling ‘dns_resource_record_new’ from ‘dns_resource_record_copy’
systemd-259/src/shared/dns-rr.c:1746:16: return_function: returning to ‘dns_resource_record_copy’ from ‘dns_resource_record_new’
systemd-259/src/shared/dns-rr.c:1747:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-rr.c:1750:21: branch_false: ...to here
systemd-259/src/shared/dns-rr.c:1756:17: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-rr.c:1756:54: branch_false: ...to here
systemd-259/src/shared/dns-rr.c:1802:35: acquire_memory: allocated here
systemd-259/src/shared/dns-rr.c:1803:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-rr.c:1805:42: branch_false: ...to here
systemd-259/src/shared/dns-rr.c:1806:20: branch_true: following ‘true’ branch...
systemd-259/src/shared/dns-rr.c:1741:66: branch_true: ...to here
systemd-259/src/shared/dns-rr.c:1741:66: call_function: calling ‘dns_resource_record_unrefp’ from ‘dns_resource_record_copy’
#  525|   
#  526|           free(rr->to_string);
#  527|->         return mfree(rr);
#  528|   }
#  529|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
systemd-259/src/shared/dns-rr.c:941:27: warning[-Wanalyzer-malloc-leak]: leak of ‘format_svc_param(i)’
systemd-259/src/shared/dns-rr.c:956:14: enter_function: entry to ‘format_svc_params’
systemd-259/src/shared/dns-rr.c:959:9: branch_true: following ‘true’ branch (when ‘i’ is non-NULL)...
systemd-259/src/shared/dns-rr.c:959:9: branch_true: ...to here
systemd-259/src/shared/dns-rr.c:960:31: call_function: calling ‘format_svc_param’ from ‘format_svc_params’
systemd-259/src/shared/dns-rr.c:960:31: return_function: returning to ‘format_svc_params’ from ‘format_svc_param’
systemd-259/src/shared/dns-rr.c:961:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-rr.c:963:21: call_function: inlined call to ‘strv_push’ from ‘format_svc_params’
systemd-259/src/shared/dns-rr.c:941:27: danger: ‘format_svc_param(i)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/7)
#  939|   
#  940|   static char *format_svc_param(DnsSvcParam *i) {
#  941|->         const char *key = FORMAT_DNS_SVC_PARAM_KEY(i->key);
#  942|           _cleanup_free_ char *value = NULL;
#  943|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
systemd-259/src/shared/dns-rr.c:2566:60: warning[-Wanalyzer-malloc-leak]: leak of ‘_var_’
systemd-259/src/shared/dns-rr.c:2562:5: enter_function: entry to ‘dns_json_dispatch_resource_key’
systemd-259/src/shared/dns-rr.c:2563:30: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-rr.c:2566:60: branch_false: ...to here
systemd-259/src/shared/dns-rr.c:2567:13: call_function: calling ‘dns_resource_key_from_json’ from ‘dns_json_dispatch_resource_key’
systemd-259/src/shared/dns-rr.c:2567:13: return_function: returning to ‘dns_json_dispatch_resource_key’ from ‘dns_resource_key_from_json’
systemd-259/src/shared/dns-rr.c:2568:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-rr.c:2571:9: branch_false: ...to here
systemd-259/src/shared/dns-rr.c:2571:9: call_function: calling ‘dns_resource_key_unref’ from ‘dns_json_dispatch_resource_key’
systemd-259/src/shared/dns-rr.c:2566:60: call_function: calling ‘dns_resource_key_unrefp’ from ‘dns_json_dispatch_resource_key’
systemd-259/src/shared/dns-rr.c:2566:60: return_function: returning to ‘dns_json_dispatch_resource_key’ from ‘dns_resource_key_unrefp’
systemd-259/src/shared/dns-rr.c:2566:60: danger: ‘_var_’ leaks here; was allocated at [(16)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/15)
# 2564|           int r;
# 2565|   
# 2566|->         _cleanup_(dns_resource_key_unrefp) DnsResourceKey *nk = NULL;
# 2567|           r = dns_resource_key_from_json(variant, &nk);
# 2568|           if (r < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
systemd-259/src/shared/dns-rr.h:367:1: warning[-Wanalyzer-malloc-leak]: leak of ‘q’
systemd-259/src/shared/dns-question.c:424:5: enter_function: entry to ‘dns_question_new_service_pointer’
systemd-259/src/shared/dns-question.c:431:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:433:12: branch_false: ...to here
systemd-259/src/shared/dns-question.c:433:12: branch_false: following ‘false’ branch (when ‘domain’ is non-NULL)...
systemd-259/src/shared/dns-question.c:436:12: branch_false: ...to here
systemd-259/src/shared/dns-question.c:436:12: branch_false: following ‘false’ branch (when ‘type’ is NULL)...
systemd-259/src/shared/dns-question.c:454:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:454:13: call_function: calling ‘dns_question_new’ from ‘dns_question_new_service_pointer’
systemd-259/src/shared/dns-question.c:454:13: return_function: returning to ‘dns_question_new_service_pointer’ from ‘dns_question_new’
systemd-259/src/shared/dns-question.c:455:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:458:15: branch_false: ...to here
systemd-259/src/shared/dns-question.c:459:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/dns-question.c:462:13: branch_false: ...to here
systemd-259/src/shared/dns-question.c:462:13: call_function: calling ‘dns_question_add’ from ‘dns_question_new_service_pointer’
systemd-259/src/shared/dns-question.c:426:53: call_function: calling ‘dns_question_unrefp’ from ‘dns_question_new_service_pointer’
systemd-259/src/shared/dns-question.c:425:60: call_function: calling ‘dns_resource_key_unrefp’ from ‘dns_question_new_service_pointer’
#  365|           dns_resource_key_to_string(key, (char[DNS_RESOURCE_KEY_STRING_MAX]) {}, DNS_RESOURCE_KEY_STRING_MAX)
#  366|   
#  367|-> DEFINE_TRIVIAL_CLEANUP_FUNC(DnsResourceKey*, dns_resource_key_unref);
#  368|   
#  369|   static inline bool dns_key_is_shared(const DnsResourceKey *key) {

Error: CPPCHECK_WARNING (CWE-562): [#def274]
systemd-259/src/shared/ethtool-util.c:671: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  669|            * https://github.com/torvalds/linux/commit/793cf87de9d1a62dc9079c3ec5fcc01cfc62fafb */
#  670|   
#  671|->         ifr->ifr_data = &ecmd;
#  672|   
#  673|           if (ioctl(fd, SIOCETHTOOL, ifr) < 0)

Error: COMPILER_WARNING: [#def275] [important]
systemd-259/src/shared/ethtool-util.c:671:23: error[-Wincompatible-pointer-types]: assignment to ‘__caddr_t’ {{aka ‘char *’}} from incompatible pointer type ‘struct ethtool_link_settings *’
#  669|            * https://github.com/torvalds/linux/commit/793cf87de9d1a62dc9079c3ec5fcc01cfc62fafb */
#  670|   
#  671|->         ifr->ifr_data = &ecmd;
#  672|   
#  673|           if (ioctl(fd, SIOCETHTOOL, ifr) < 0)

Error: COMPILER_WARNING: [#def276] [important]
systemd-259/src/shared/ethtool-util.c:688:23: error[-Wincompatible-pointer-types]: assignment to ‘__caddr_t’ {{aka ‘char *’}} from incompatible pointer type ‘struct ethtool_link_settings *’
#  686|           settings->link_mode_masks_nwords = n;
#  687|   
#  688|->         ifr->ifr_data = settings;
#  689|           if (ioctl(fd, SIOCETHTOOL, ifr) < 0)
#  690|                   return -errno;

Error: COMPILER_WARNING: [#def277] [important]
systemd-259/src/shared/ethtool-util.c:787:22: error[-Wincompatible-pointer-types]: assignment to ‘__caddr_t’ {{aka ‘char *’}} from incompatible pointer type ‘struct ethtool_link_settings *’
#  785|   
#  786|           settings->cmd = ETHTOOL_SLINKSETTINGS;
#  787|->         ifr.ifr_data = settings;
#  788|           if (ioctl(*fd, SIOCETHTOOL, &ifr) < 0)
#  789|                   return log_debug_errno(errno, "ethtool: Cannot set link settings for %s: %m", ifname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
systemd-259/src/shared/hostname-setup.c:73:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(s)’
systemd-259/src/shared/hostname-setup.c:57:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:58:9: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:58:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:60:13: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:60:13: acquire_memory: allocated here
systemd-259/src/shared/hostname-setup.c:61:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:64:13: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:64:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:69:19: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:70:12: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
systemd-259/src/shared/hostname-setup.c:73:9: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:73:9: throw: if ‘strshorten’ throws an exception...
systemd-259/src/shared/hostname-setup.c:73:9: danger: ‘strdup(s)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#   71|                   *p = 0;
#   72|   
#   73|->         strshorten(h, LINUX_HOST_NAME_MAX);
#   74|   
#   75|           if (!hostname_is_valid(h, /* flags= */ 0))

Error: GCC_ANALYZER_WARNING (CWE-457): [#def279]
systemd-259/src/shared/hostname-setup.c:395:51: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘t’
systemd-259/src/shared/hostname-setup.c:353:5: enter_function: entry to ‘pidref_gethostname_full’
systemd-259/src/shared/hostname-setup.c:356:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:357:9: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:357:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:359:13: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:360:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:362:12: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:362:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:365:44: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:366:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:369:34: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:371:12: branch_false: following ‘false’ branch (when ‘r >= 0’)...
systemd-259/src/shared/hostname-setup.c:374:34: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:376:12: branch_false: following ‘false’ branch (when ‘r >= 0’)...
systemd-259/src/shared/hostname-setup.c:379:52: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:381:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:383:12: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:383:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/hostname-setup.c:384:33: branch_true: ...to here
systemd-259/src/shared/hostname-setup.c:387:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:390:23: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:391:21: call_function: calling ‘gethostname_full’ from ‘pidref_gethostname_full’
systemd-259/src/shared/hostname-setup.c:391:21: return_function: returning to ‘pidref_gethostname_full’ from ‘gethostname_full’
systemd-259/src/shared/hostname-setup.c:392:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:395:51: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:395:51: danger: use of uninitialized value ‘t’ here
#  393|                           report_errno_and_exit(errno_pipe[1], r);
#  394|   
#  395|->                 r = loop_write(result_pipe[1], t, strlen(t) + 1);
#  396|                   report_errno_and_exit(errno_pipe[1], r);
#  397|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
systemd-259/src/shared/hostname-setup.c:414:1: warning[-Wanalyzer-malloc-leak]: leak of ‘t’
systemd-259/src/shared/hostname-setup.c:353:5: enter_function: entry to ‘pidref_gethostname_full’
systemd-259/src/shared/hostname-setup.c:356:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:357:9: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:357:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:359:13: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:360:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:362:12: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:362:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:365:44: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:366:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:369:34: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:371:12: branch_false: following ‘false’ branch (when ‘r >= 0’)...
systemd-259/src/shared/hostname-setup.c:374:34: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:376:12: branch_false: following ‘false’ branch (when ‘r >= 0’)...
systemd-259/src/shared/hostname-setup.c:379:52: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:381:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:383:12: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:383:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/hostname-setup.c:384:33: branch_true: ...to here
systemd-259/src/shared/hostname-setup.c:387:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:390:23: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:391:21: call_function: calling ‘gethostname_full’ from ‘pidref_gethostname_full’
systemd-259/src/shared/hostname-setup.c:391:21: return_function: returning to ‘pidref_gethostname_full’ from ‘gethostname_full’
systemd-259/src/shared/hostname-setup.c:392:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/hostname-setup.c:395:51: branch_false: ...to here
systemd-259/src/shared/hostname-setup.c:395:21: call_function: inlined call to ‘loop_write’ from ‘pidref_gethostname_full’
systemd-259/src/shared/hostname-setup.c:414:1: danger: ‘t’ leaks here; was allocated at [(35)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/34)
#  412|   
#  413|           return strdup_to(ret, buf);
#  414|-> }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def281]
systemd-259/src/shared/loop-util.c:624:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘d’
systemd-259/src/shared/loop-util.c:752:5: enter_function: entry to ‘loop_device_make_by_path_memory’
systemd-259/src/shared/loop-util.c:765:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:766:9: branch_false: ...to here
systemd-259/src/shared/loop-util.c:767:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:769:9: branch_false: ...to here
systemd-259/src/shared/loop-util.c:772:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:775:13: branch_false: ...to here
systemd-259/src/shared/loop-util.c:775:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:778:14: branch_false: ...to here
systemd-259/src/shared/loop-util.c:778:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:781:13: branch_false: ...to here
systemd-259/src/shared/loop-util.c:782:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:785:15: branch_false: ...to here
systemd-259/src/shared/loop-util.c:786:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:789:14: branch_false: ...to here
systemd-259/src/shared/loop-util.c:791:16: call_function: calling ‘loop_device_make_internal’ from ‘loop_device_make_by_path_memory’
#  622|                           log_debug_errno(r, "Failed to read 'discard_max_bytes' of backing device, ignoring: %m");
#  623|                   else {
#  624|->                         r = fd_set_max_discard(d->fd, discard_max_bytes);
#  625|                           if (r < 0)
#  626|                                   log_debug_errno(r, "Failed to write 'discard_max_bytes' of loop device, ignoring: %m");

Error: GCC_ANALYZER_WARNING (CWE-457): [#def282]
systemd-259/src/shared/loop-util.c:624:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘discard_max_bytes’
systemd-259/src/shared/loop-util.c:752:5: enter_function: entry to ‘loop_device_make_by_path_memory’
systemd-259/src/shared/loop-util.c:765:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:766:9: branch_false: ...to here
systemd-259/src/shared/loop-util.c:767:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:769:9: branch_false: ...to here
systemd-259/src/shared/loop-util.c:772:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:775:13: branch_false: ...to here
systemd-259/src/shared/loop-util.c:775:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:778:14: branch_false: ...to here
systemd-259/src/shared/loop-util.c:778:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:781:13: branch_false: ...to here
systemd-259/src/shared/loop-util.c:782:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:785:15: branch_false: ...to here
systemd-259/src/shared/loop-util.c:786:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/loop-util.c:789:14: branch_false: ...to here
systemd-259/src/shared/loop-util.c:791:16: call_function: calling ‘loop_device_make_internal’ from ‘loop_device_make_by_path_memory’
#  622|                           log_debug_errno(r, "Failed to read 'discard_max_bytes' of backing device, ignoring: %m");
#  623|                   else {
#  624|->                         r = fd_set_max_discard(d->fd, discard_max_bytes);
#  625|                           if (r < 0)
#  626|                                   log_debug_errno(r, "Failed to write 'discard_max_bytes' of loop device, ignoring: %m");

Error: CPPCHECK_WARNING (CWE-401): [#def283]
systemd-259/src/shared/machine-credential.c:69: error[memleak]: Memory leak: cred.id
#   67|           cred.data = memdup(value, size);
#   68|           if (!cred.data)
#   69|->                 return -ENOMEM;
#   70|   
#   71|           cred.size = size;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
systemd-259/src/shared/machine-credential.c:73:14: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(id)’
systemd-259/src/shared/machine-credential.c:43:5: enter_function: entry to ‘machine_credential_add’
systemd-259/src/shared/machine-credential.c:49:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/machine-credential.c:50:9: branch_false: ...to here
systemd-259/src/shared/machine-credential.c:50:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/machine-credential.c:51:9: branch_false: ...to here
systemd-259/src/shared/machine-credential.c:51:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/machine-credential.c:53:14: branch_false: ...to here
systemd-259/src/shared/machine-credential.c:53:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/machine-credential.c:56:13: branch_true: ...to here
systemd-259/src/shared/machine-credential.c:56:13: call_function: calling ‘machine_credential_find’ from ‘machine_credential_add’
systemd-259/src/shared/machine-credential.c:56:13: return_function: returning to ‘machine_credential_add’ from ‘machine_credential_find’
systemd-259/src/shared/machine-credential.c:56:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/machine-credential.c:59:12: branch_false: ...to here
systemd-259/src/shared/machine-credential.c:63:19: acquire_memory: allocated here
systemd-259/src/shared/machine-credential.c:64:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/machine-credential.c:67:21: branch_false: ...to here
systemd-259/src/shared/machine-credential.c:68:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/machine-credential.c:71:9: branch_false: ...to here
systemd-259/src/shared/machine-credential.c:73:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/machine-credential.c:76:50: branch_false: ...to here
systemd-259/src/shared/machine-credential.c:73:14: danger: ‘strdup(id)’ leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)
#   71|           cred.size = size;
#   72|   
#   73|->         if (!GREEDY_REALLOC(ctx->credentials, ctx->n_credentials + 1))
#   74|                   return -ENOMEM;
#   75|   

Error: COMPILER_WARNING: [#def285] [important]
systemd-259/src/shared/nsresource.c:25:1: error[error]: expression in static assertion is not an integer
#   23|    * it also should be unique if we are called multiple times in a row. Hence we take the "comm" name (which is
#   24|    * 15 chars), and suffix it with the PID and a counter, possibly overriding the end. */
#   25|-> assert_cc(TASK_COMM_LEN == NAMESPACE_NAME_MAX);
#   26|   
#   27|   static int make_pid_name(char **ret) {

Error: COMPILER_WARNING: [#def286] [important]
systemd-259/src/shared/nsresource.c:25:1: error[error]: ‘TASK_COMM_LEN’ undeclared here (not in a function)
#   23|    * it also should be unique if we are called multiple times in a row. Hence we take the "comm" name (which is
#   24|    * 15 chars), and suffix it with the PID and a counter, possibly overriding the end. */
#   25|-> assert_cc(TASK_COMM_LEN == NAMESPACE_NAME_MAX);
#   26|   
#   27|   static int make_pid_name(char **ret) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def287]
systemd-259/src/shared/pam-util.c:98:38: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
systemd-259/src/shared/pam-util.c:94:9: acquire_resource: ‘va_start’ called here
systemd-259/src/shared/pam-util.c:97:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/pam-util.c:97:16: branch_true: ...to here
systemd-259/src/shared/pam-util.c:98:38: throw: if the called function throws an exception...
systemd-259/src/shared/pam-util.c:98:38: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   96|           const char *p = endswith(format, "@PAMERR@");
#   97|           if (p) {
#   98|->                 const char *pamerr = sym_pam_strerror(handle, error);
#   99|                   if (strchr(pamerr, '%'))
#  100|                           pamerr = "n/a";  /* We cannot have any formatting chars */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def288]
systemd-259/src/shared/pam-util.c:106:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
systemd-259/src/shared/pam-util.c:94:9: acquire_resource: ‘va_start’ called here
systemd-259/src/shared/pam-util.c:97:12: branch_true: following ‘true’ branch...
systemd-259/src/shared/pam-util.c:97:16: branch_true: ...to here
systemd-259/src/shared/pam-util.c:99:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/pam-util.c:102:26: branch_false: ...to here
systemd-259/src/shared/pam-util.c:103:17: branch_false: following ‘false’ branch...
systemd-259/src/shared/pam-util.c:106:17: branch_false: ...to here
systemd-259/src/shared/pam-util.c:106:17: throw: if the called function throws an exception...
systemd-259/src/shared/pam-util.c:106:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  104|   
#  105|                   DISABLE_WARNING_FORMAT_NONLITERAL;
#  106|->                 sym_pam_vsyslog(handle, level, buf, ap);
#  107|                   REENABLE_WARNING;
#  108|           } else

Error: GCC_ANALYZER_WARNING (CWE-404): [#def289]
systemd-259/src/shared/pam-util.c:109:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
systemd-259/src/shared/pam-util.c:94:9: acquire_resource: ‘va_start’ called here
systemd-259/src/shared/pam-util.c:97:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/pam-util.c:109:17: branch_false: ...to here
systemd-259/src/shared/pam-util.c:109:17: throw: if the called function throws an exception...
systemd-259/src/shared/pam-util.c:109:17: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  107|                   REENABLE_WARNING;
#  108|           } else
#  109|->                 sym_pam_vsyslog(handle, level, format, ap);
#  110|   
#  111|           va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def290]
systemd-259/src/shared/pam-util.c:316:21: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
systemd-259/src/shared/pam-util.c:305:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/pam-util.c:307:9: branch_false: ...to here
systemd-259/src/shared/pam-util.c:307:9: acquire_resource: ‘va_start’ called here
systemd-259/src/shared/pam-util.c:310:20: branch_false: following ‘false’ branch (when ‘item_type > 0’)...
systemd-259/src/shared/pam-util.c:315:38: branch_false: ...to here
systemd-259/src/shared/pam-util.c:315:38: branch_false: following ‘false’ branch...
systemd-259/src/shared/pam-util.c:316:21: branch_false: ...to here
systemd-259/src/shared/pam-util.c:316:21: throw: if the called function throws an exception...
systemd-259/src/shared/pam-util.c:316:21: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  314|   
#  315|                   const void **value = ASSERT_PTR(va_arg(ap, const void **));
#  316|->                 r = sym_pam_get_item(handle, item_type, value);
#  317|                   if (!IN_SET(r, PAM_BAD_ITEM, PAM_SUCCESS))
#  318|                           break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def291]
systemd-259/src/shared/pam-util.c:340:21: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
systemd-259/src/shared/pam-util.c:329:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/pam-util.c:331:9: branch_false: ...to here
systemd-259/src/shared/pam-util.c:331:9: acquire_resource: ‘va_start’ called here
systemd-259/src/shared/pam-util.c:334:20: branch_false: following ‘false’ branch (when ‘data_name’ is non-NULL)...
systemd-259/src/shared/pam-util.c:339:38: branch_false: ...to here
systemd-259/src/shared/pam-util.c:339:38: branch_false: following ‘false’ branch...
systemd-259/src/shared/pam-util.c:340:21: branch_false: ...to here
systemd-259/src/shared/pam-util.c:340:21: throw: if the called function throws an exception...
systemd-259/src/shared/pam-util.c:340:21: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  338|   
#  339|                   const void **value = ASSERT_PTR(va_arg(ap, const void **));
#  340|->                 r = sym_pam_get_data(handle, data_name, value);
#  341|                   if (!IN_SET(r, PAM_NO_MODULE_DATA, PAM_SUCCESS))
#  342|                           break;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def292]
systemd-259/src/shared/rm-rf.c:82:36: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘old_mode’
systemd-259/src/shared/rm-rf.c:544:7: enter_function: entry to ‘rm_rf_subvolume_and_free’
systemd-259/src/shared/rm-rf.c:547:12: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
systemd-259/src/shared/rm-rf.c:550:16: call_function: inlined call to ‘rm_rf’ from ‘rm_rf_subvolume_and_free’
#   80|                   r = -errno;
#   81|                   /* Try to restore the original access mode if this didn't work */
#   82|->                 (void) fchmod(dfd, old_mode & 07777);
#   83|                   return r;
#   84|           }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def293]
systemd-259/src/shared/smack-util.h:45:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘<unknown>’
systemd-259/src/shared/socket-label.c:39:5: enter_function: entry to ‘socket_address_listen’
systemd-259/src/shared/socket-label.c:57:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/socket-label.c:59:13: branch_false: ...to here
systemd-259/src/shared/socket-label.c:60:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/socket-label.c:63:13: branch_false: ...to here
systemd-259/src/shared/socket-label.c:72:14: acquire_resource: socket created here
systemd-259/src/shared/socket-label.c:72:14: call_function: inlined call to ‘RET_NERRNO’ from ‘socket_address_listen’
systemd-259/src/shared/socket-label.c:74:12: branch_false: ...to here
systemd-259/src/shared/socket-label.c:77:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/socket-label.c:80:12: branch_false: ...to here
systemd-259/src/shared/socket-label.c:80:12: branch_true: following ‘true’ branch (when ‘smack_label’ is non-NULL)...
systemd-259/src/shared/socket-label.c:81:21: call_function: inlined call to ‘mac_smack_apply_fd’ from ‘socket_address_listen’
#   43|   }
#   44|   static inline int mac_smack_apply_fd(int fd, SmackAttr attr, const char *label) {
#   45|->         return mac_smack_apply_at(fd, NULL, attr, label);
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
systemd-259/src/shared/tar-util.c:661:22: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(name)’
systemd-259/src/shared/tar-util.c:688:5: enter_function: entry to ‘tar_x’
systemd-259/src/shared/tar-util.c:691:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:692:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:692:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:694:55: branch_false: ...to here
systemd-259/src/shared/tar-util.c:696:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:699:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:700:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:705:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:706:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:711:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:712:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:716:20: branch_false: ...to here
systemd-259/src/shared/tar-util.c:717:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:723:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:740:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:742:20: branch_false: ...to here
systemd-259/src/shared/tar-util.c:742:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:745:29: branch_false: ...to here
systemd-259/src/shared/tar-util.c:746:21: call_function: calling ‘archive_entry_pathname_safe’ from ‘tar_x’
systemd-259/src/shared/tar-util.c:746:21: return_function: returning to ‘tar_x’ from ‘archive_entry_pathname_safe’
systemd-259/src/shared/tar-util.c:747:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:750:21: branch_false: ...to here
systemd-259/src/shared/tar-util.c:750:20: branch_true: following ‘true’ branch...
systemd-259/src/shared/tar-util.c:763:42: branch_true: ...to here
systemd-259/src/shared/tar-util.c:752:29: call_function: calling ‘archive_entry_read_stat’ from ‘tar_x’
#  659|   
#  660|                   _cleanup_(iovec_done) struct iovec iovec_copy = {};
#  661|->                 if (!iovec_memdup(&data, &iovec_copy))
#  662|                           return log_oom();
#  663|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
systemd-259/src/shared/tar-util.c:662:32: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(name)’
systemd-259/src/shared/tar-util.c:688:5: enter_function: entry to ‘tar_x’
systemd-259/src/shared/tar-util.c:691:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:692:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:692:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:694:55: branch_false: ...to here
systemd-259/src/shared/tar-util.c:696:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:699:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:700:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:705:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:706:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:711:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:712:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:716:20: branch_false: ...to here
systemd-259/src/shared/tar-util.c:717:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:723:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:740:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:742:20: branch_false: ...to here
systemd-259/src/shared/tar-util.c:742:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:745:29: branch_false: ...to here
systemd-259/src/shared/tar-util.c:746:21: call_function: calling ‘archive_entry_pathname_safe’ from ‘tar_x’
systemd-259/src/shared/tar-util.c:746:21: return_function: returning to ‘tar_x’ from ‘archive_entry_pathname_safe’
systemd-259/src/shared/tar-util.c:747:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:750:21: branch_false: ...to here
systemd-259/src/shared/tar-util.c:750:20: branch_true: following ‘true’ branch...
systemd-259/src/shared/tar-util.c:763:42: branch_true: ...to here
systemd-259/src/shared/tar-util.c:752:29: call_function: calling ‘archive_entry_read_stat’ from ‘tar_x’
#  660|                   _cleanup_(iovec_done) struct iovec iovec_copy = {};
#  661|                   if (!iovec_memdup(&data, &iovec_copy))
#  662|->                         return log_oom();
#  663|   
#  664|                   if (!GREEDY_REALLOC(*xa, *n_xa+1))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
systemd-259/src/shared/tar-util.c:664:22: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(name)’
systemd-259/src/shared/tar-util.c:688:5: enter_function: entry to ‘tar_x’
systemd-259/src/shared/tar-util.c:691:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:692:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:692:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:694:55: branch_false: ...to here
systemd-259/src/shared/tar-util.c:696:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:699:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:700:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:705:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:706:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:711:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:712:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:716:20: branch_false: ...to here
systemd-259/src/shared/tar-util.c:717:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:723:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:740:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:742:20: branch_false: ...to here
systemd-259/src/shared/tar-util.c:742:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:745:29: branch_false: ...to here
systemd-259/src/shared/tar-util.c:746:21: call_function: calling ‘archive_entry_pathname_safe’ from ‘tar_x’
systemd-259/src/shared/tar-util.c:746:21: return_function: returning to ‘tar_x’ from ‘archive_entry_pathname_safe’
systemd-259/src/shared/tar-util.c:747:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:750:21: branch_false: ...to here
systemd-259/src/shared/tar-util.c:750:20: branch_true: following ‘true’ branch...
systemd-259/src/shared/tar-util.c:763:42: branch_true: ...to here
systemd-259/src/shared/tar-util.c:752:29: call_function: calling ‘archive_entry_read_stat’ from ‘tar_x’
#  662|                           return log_oom();
#  663|   
#  664|->                 if (!GREEDY_REALLOC(*xa, *n_xa+1))
#  665|                           return log_oom();
#  666|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
systemd-259/src/shared/tar-util.c:815:25: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(element, (long unsigned int)path_find_first_component(&rest, 0, & element))’
systemd-259/src/shared/tar-util.c:688:5: enter_function: entry to ‘tar_x’
systemd-259/src/shared/tar-util.c:691:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:692:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:692:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:694:55: branch_false: ...to here
systemd-259/src/shared/tar-util.c:696:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:699:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:700:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:705:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:706:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:711:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:712:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:716:20: branch_false: ...to here
systemd-259/src/shared/tar-util.c:717:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:723:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:740:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:742:20: branch_false: ...to here
systemd-259/src/shared/tar-util.c:742:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:745:29: branch_false: ...to here
systemd-259/src/shared/tar-util.c:746:21: call_function: calling ‘archive_entry_pathname_safe’ from ‘tar_x’
systemd-259/src/shared/tar-util.c:746:21: return_function: returning to ‘tar_x’ from ‘archive_entry_pathname_safe’
systemd-259/src/shared/tar-util.c:747:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:750:21: branch_false: ...to here
systemd-259/src/shared/tar-util.c:750:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:774:29: branch_false: ...to here
systemd-259/src/shared/tar-util.c:785:24: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:785:24: branch_false: ...to here
systemd-259/src/shared/tar-util.c:798:28: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:800:28: branch_false: ...to here
systemd-259/src/shared/tar-util.c:804:28: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:809:50: branch_false: ...to here
systemd-259/src/shared/tar-util.c:809:50: acquire_memory: allocated here
systemd-259/src/shared/tar-util.c:810:28: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:815:25: branch_false: ...to here
systemd-259/src/shared/tar-util.c:815:25: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/shared/tar-util.c:815:25: danger: ‘strndup(element, (long unsigned int)path_find_first_component(&rest, 0, & element))’ leaks here; was allocated at [(45)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/44)
#  813|                           const char *parent_path = NULL;
#  814|                           int parent_fd = -EBADF;
#  815|->                         assert(n_open_inodes > 0);
#  816|                           parent_fd = open_inodes[n_open_inodes-1].fd;
#  817|                           parent_path = open_inodes[n_open_inodes-1].path;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
systemd-259/src/shared/tar-util.c:823:30: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
systemd-259/src/shared/tar-util.c:688:5: enter_function: entry to ‘tar_x’
systemd-259/src/shared/tar-util.c:691:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:692:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:692:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:694:55: branch_false: ...to here
systemd-259/src/shared/tar-util.c:696:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:699:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:700:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:705:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:706:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:711:14: branch_false: ...to here
systemd-259/src/shared/tar-util.c:712:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:716:20: branch_false: ...to here
systemd-259/src/shared/tar-util.c:717:12: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:723:9: branch_false: ...to here
systemd-259/src/shared/tar-util.c:740:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:742:20: branch_false: ...to here
systemd-259/src/shared/tar-util.c:742:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:745:29: branch_false: ...to here
systemd-259/src/shared/tar-util.c:746:21: call_function: calling ‘archive_entry_pathname_safe’ from ‘tar_x’
systemd-259/src/shared/tar-util.c:746:21: return_function: returning to ‘tar_x’ from ‘archive_entry_pathname_safe’
systemd-259/src/shared/tar-util.c:747:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:750:21: branch_false: ...to here
systemd-259/src/shared/tar-util.c:750:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:774:29: branch_false: ...to here
systemd-259/src/shared/tar-util.c:785:24: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:785:24: branch_false: ...to here
systemd-259/src/shared/tar-util.c:798:28: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:800:28: branch_false: ...to here
systemd-259/src/shared/tar-util.c:804:28: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:809:50: branch_false: ...to here
systemd-259/src/shared/tar-util.c:810:28: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:815:25: branch_false: ...to here
systemd-259/src/shared/tar-util.c:815:25: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:816:48: branch_false: ...to here
systemd-259/src/shared/tar-util.c:819:92: acquire_memory: allocated here
systemd-259/src/shared/tar-util.c:820:28: branch_false: following ‘false’ branch...
systemd-259/src/shared/tar-util.c:823:30: branch_false: ...to here
systemd-259/src/shared/tar-util.c:823:30: throw: if ‘greedy_realloc’ throws an exception...
systemd-259/src/shared/tar-util.c:823:30: danger: ‘<unknown>’ leaks here; was allocated at [(49)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/48)
#  821|                                   return log_oom();
#  822|   
#  823|->                         if (!GREEDY_REALLOC(open_inodes, n_open_inodes+1))
#  824|                                   return log_oom();
#  825|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
systemd-259/src/shared/unit-file.c:452:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(*__unique_prefix_i16)’
systemd-259/src/shared/unit-file.c:366:5: enter_function: entry to ‘unit_file_build_name_map’
systemd-259/src/shared/unit-file.c:391:12: branch_true: following ‘true’ branch (when ‘cache_timestamp_hash’ is non-NULL)...
systemd-259/src/shared/unit-file.c:392:13: branch_true: ...to here
systemd-259/src/shared/unit-file.c:392:13: call_function: calling ‘lookup_paths_timestamp_hash_same’ from ‘unit_file_build_name_map’
systemd-259/src/shared/unit-file.c:392:13: return_function: returning to ‘unit_file_build_name_map’ from ‘lookup_paths_timestamp_hash_same’
systemd-259/src/shared/unit-file.c:391:13: branch_false: following ‘false’ branch...
systemd-259/src/shared/unit-file.c:398:12: branch_false: ...to here
systemd-259/src/shared/unit-file.c:398:12: branch_true: following ‘true’ branch (when ‘path_cache’ is non-NULL)...
systemd-259/src/shared/unit-file.c:399:25: branch_true: ...to here
systemd-259/src/shared/unit-file.c:400:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/unit-file.c:421:9: branch_false: ...to here
systemd-259/src/shared/unit-file.c:421:9: branch_true: following ‘true’ branch...
systemd-259/src/shared/unit-file.c:425:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/unit-file.c:428:21: branch_false: ...to here
systemd-259/src/shared/unit-file.c:421:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/unit-file.c:442:9: branch_false: ...to here
systemd-259/src/shared/unit-file.c:442:9: branch_true: following ‘true’ branch...
systemd-259/src/shared/unit-file.c:445:21: acquire_memory: allocated here
systemd-259/src/shared/unit-file.c:446:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/unit-file.c:452:17: branch_false: ...to here
systemd-259/src/shared/unit-file.c:452:17: throw: if ‘readdir_ensure_type’ throws an exception...
systemd-259/src/shared/unit-file.c:452:17: danger: ‘opendir(*__unique_prefix_i16)’ leaks here; was allocated at [(23)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/22)
#  450|                   }
#  451|   
#  452|->                 FOREACH_DIRENT_ALL(de, d, log_warning_errno(errno, "Failed to read \"%s\", ignoring: %m", *dir)) {
#  453|                           _unused_ _cleanup_free_ char *_filename_free = NULL;
#  454|                           char *filename;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
systemd-259/src/shared/userdb.c:1923:21: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(c, (long unsigned int)(endswith_internal(*<unknown>, ".membership") - c))’
systemd-259/src/shared/userdb.c:1822:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/userdb.c:1822:9: branch_false: ...to here
systemd-259/src/shared/userdb.c:1826:20: branch_true: following ‘true’ branch...
systemd-259/src/shared/userdb.c:1829:30: branch_true: ...to here
systemd-259/src/shared/userdb.c:1898:16: branch_true: following ‘true’ branch...
systemd-259/src/shared/userdb.c:1911:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/userdb.c:1913:21: branch_false: ...to here
systemd-259/src/shared/userdb.c:1914:28: branch_false: following ‘false’ branch (when the strings are equal)...
systemd-259/src/shared/userdb.c:1919:17: branch_false: ...to here
systemd-259/src/shared/userdb.c:1920:22: acquire_memory: allocated here
systemd-259/src/shared/userdb.c:1921:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/userdb.c:1923:21: branch_false: ...to here
systemd-259/src/shared/userdb.c:1923:20: branch_false: following ‘false’ branch...
systemd-259/src/shared/userdb.c:1926:29: branch_false: ...to here
systemd-259/src/shared/userdb.c:1926:29: throw: if ‘valid_user_group_name’ throws an exception...
systemd-259/src/shared/userdb.c:1923:21: danger: ‘strndup(c, (long unsigned int)(endswith_internal(*<unknown>, ".membership") - c))’ leaks here; was allocated at [(11)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/10)
# 1921|                   if (!gn)
# 1922|                           return -ENOMEM;
# 1923|->                 if (iterator->filter_group_name) {
# 1924|                           if (!streq(gn, iterator->filter_group_name))
# 1925|                                   continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
systemd-259/src/shared/vpick.c:564:27: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(fname, (long unsigned int)(endswith_internal(<unknown>, ".v") - fname))’
systemd-259/src/shared/vpick.c:647:5: enter_function: entry to ‘path_pick_update_warn’
systemd-259/src/shared/vpick.c:656:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/vpick.c:657:9: branch_false: ...to here
systemd-259/src/shared/vpick.c:657:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/vpick.c:658:9: branch_false: ...to here
systemd-259/src/shared/vpick.c:658:9: branch_false: following ‘false’ branch...
systemd-259/src/shared/vpick.c:662:13: branch_false: ...to here
systemd-259/src/shared/vpick.c:662:13: call_function: calling ‘path_pick’ from ‘path_pick_update_warn’
#  562|   
#  563|                   /* Chop off suffix, if specified */
#  564|->                 char *f = endswith_strv(filter_bname, filter->suffix);
#  565|                   if (f)
#  566|                           *f = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def302]
systemd-259/src/ssh-generator/ssh-util.c:21:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘<unknown>’
systemd-259/src/ssh-generator/ssh-util.c:11:5: enter_function: entry to ‘vsock_open_or_warn’
systemd-259/src/ssh-generator/ssh-util.c:12:18: acquire_resource: socket created here
systemd-259/src/ssh-generator/ssh-util.c:12:18: call_function: inlined call to ‘RET_NERRNO’ from ‘vsock_open_or_warn’
systemd-259/src/ssh-generator/ssh-util.c:15:17: branch_false: ...to here
systemd-259/src/ssh-generator/ssh-util.c:15:17: branch_false: following ‘false’ branch...
systemd-259/src/ssh-generator/ssh-util.c:18:12: branch_false: ...to here
systemd-259/src/ssh-generator/ssh-util.c:18:12: branch_false: following ‘false’ branch (when ‘ret’ is NULL)...
systemd-259/src/ssh-generator/ssh-util.c:21:17: branch_false: ...to here
systemd-259/src/ssh-generator/ssh-util.c:21:17: throw: if ‘close’ throws an exception...
systemd-259/src/ssh-generator/ssh-util.c:21:17: danger: ‘<unknown>’ leaks here
#   19|                   *ret = fd;
#   20|           else
#   21|->                 close(fd);
#   22|   
#   23|           return fd >= 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
systemd-259/src/sysctl/sysctl.c:233:21: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(buffer, (long unsigned int)(eq - buffer))’
systemd-259/src/sysctl/sysctl.c:217:43: branch_false: following ‘false’ branch...
systemd-259/src/sysctl/sysctl.c:222:26: branch_false: ...to here
systemd-259/src/sysctl/sysctl.c:223:12: branch_true: following ‘true’ branch (when ‘eq’ is non-NULL)...
systemd-259/src/sysctl/sysctl.c:224:21: branch_true: ...to here
systemd-259/src/sysctl/sysctl.c:229:21: acquire_memory: allocated here
systemd-259/src/sysctl/sysctl.c:230:20: branch_false: following ‘false’ branch...
systemd-259/src/sysctl/sysctl.c:233:21: branch_false: ...to here
systemd-259/src/sysctl/sysctl.c:234:20: branch_true: following ‘true’ branch...
systemd-259/src/sysctl/sysctl.c:235:32: branch_true: ...to here
systemd-259/src/sysctl/sysctl.c:235:32: throw: if ‘log_oom_internal’ throws an exception...
systemd-259/src/sysctl/sysctl.c:233:21: danger: ‘strndup(buffer, (long unsigned int)(eq - buffer))’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5)
#  231|                           return log_oom();
#  232|   
#  233|->                 v = strdup(eq + 1);
#  234|                   if (!v)
#  235|                           return log_oom();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
systemd-259/src/sysupdate/sysupdated.c:1716:13: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
systemd-259/src/sysupdate/sysupdated.c:1702:12: enter_function: entry to ‘manager_new’
systemd-259/src/sysupdate/sysupdated.c:1706:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/sysupdated.c:1708:13: call_function: inlined call to ‘malloc_multiply’ from ‘manager_new’
systemd-259/src/sysupdate/sysupdated.c:1709:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/sysupdated.c:1712:9: branch_false: ...to here
systemd-259/src/sysupdate/sysupdated.c:1716:13: throw: if ‘sd_event_default’ throws an exception...
systemd-259/src/sysupdate/sysupdated.c:1703:43: call_function: inlined call to ‘manager_freep’ from ‘manager_new’
# 1714|           };
# 1715|   
# 1716|->         r = sd_event_default(&m->event);
# 1717|           if (r < 0)
# 1718|                   return r;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def305]
systemd-259/src/sysupdate/updatectl.c:81:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*p.remaining’
systemd-259/src/sysupdate/updatectl.c:1055:12: enter_function: entry to ‘do_update’
systemd-259/src/sysupdate/updatectl.c:1066:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1067:9: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1067:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1069:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1069:13: call_function: calling ‘parse_targets’ from ‘do_update’
systemd-259/src/sysupdate/updatectl.c:1069:13: return_function: returning to ‘do_update’ from ‘parse_targets’
systemd-259/src/sysupdate/updatectl.c:1070:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1073:15: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1074:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1077:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1078:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1081:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1082:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1085:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1086:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1086:12: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1089:28: branch_true: following ‘true’ branch...
systemd-259/src/sysupdate/updatectl.c:1091:82: branch_true: ...to here
systemd-259/src/sysupdate/updatectl.c:1091:22: call_function: calling ‘operation_new’ from ‘do_update’
#   79|                   return NULL;
#   80|   
#   81|->         assert(*p->remaining > 0);
#   82|           *p->remaining -= 1;
#   83|           if (*p->remaining == 0)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def306]
systemd-259/src/sysupdate/updatectl.c:97:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘op’
systemd-259/src/sysupdate/updatectl.c:1055:12: enter_function: entry to ‘do_update’
systemd-259/src/sysupdate/updatectl.c:1066:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1067:9: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1067:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1069:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1069:13: call_function: calling ‘parse_targets’ from ‘do_update’
systemd-259/src/sysupdate/updatectl.c:1069:13: return_function: returning to ‘do_update’ from ‘parse_targets’
systemd-259/src/sysupdate/updatectl.c:1070:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1073:15: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1074:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1077:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1078:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1081:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1082:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1085:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1086:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1086:12: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1089:28: branch_true: following ‘true’ branch...
systemd-259/src/sysupdate/updatectl.c:1091:82: branch_true: ...to here
systemd-259/src/sysupdate/updatectl.c:1092:20: branch_true: following ‘true’ branch...
systemd-259/src/sysupdate/updatectl.c:1093:32: branch_true: ...to here
systemd-259/src/sysupdate/updatectl.c:1093:32: throw: if ‘log_oom_internal’ throws an exception...
systemd-259/src/sysupdate/updatectl.c:1090:55: call_function: inlined call to ‘operation_freep’ from ‘do_update’
#   95|   }
#   96|   
#   97|-> DEFINE_TRIVIAL_CLEANUP_FUNC(Operation*, operation_free);
#   98|   
#   99|   static Operation* operation_new(

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
systemd-259/src/sysupdate/updatectl.c:257:1: warning[-Wanalyzer-malloc-leak]: leak of ‘version’
systemd-259/src/sysupdate/updatectl.c:1055:12: enter_function: entry to ‘do_update’
systemd-259/src/sysupdate/updatectl.c:1066:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1067:9: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1067:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1069:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1069:13: call_function: calling ‘parse_targets’ from ‘do_update’
#  255|                   *ret_versions = TAKE_PTR(versions);
#  256|           return 0;
#  257|-> }
#  258|   
#  259|   static int log_bus_error(int r, const sd_bus_error *error, const char *target, const char *action) {

Error: CPPCHECK_WARNING (CWE-457): [#def308]
systemd-259/src/sysupdate/updatectl.c:576: error[uninitvar]: Uninitialized variable: entry
#  574|   
#  575|           JSON_VARIANT_ARRAY_FOREACH(entry, json) {
#  576|->                 assert(sd_json_variant_is_object(entry));
#  577|                   const char *key;
#  578|                   sd_json_variant *value;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
systemd-259/src/sysupdate/updatectl.c:997:51: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*(Operation *)userdata.target_id)’
systemd-259/src/sysupdate/updatectl.c:980:12: enter_function: entry to ‘update_started’
systemd-259/src/sysupdate/updatectl.c:981:52: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:982:31: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:982:31: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:985:21: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:988:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:990:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:991:12: branch_true: following ‘true’ branch...
systemd-259/src/sysupdate/updatectl.c:992:22: branch_true: ...to here
systemd-259/src/sysupdate/updatectl.c:994:23: acquire_memory: allocated here
systemd-259/src/sysupdate/updatectl.c:995:20: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:997:51: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:997:21: call_function: inlined call to ‘ordered_hashmap_put’ from ‘update_started’
systemd-259/src/sysupdate/updatectl.c:997:51: danger: ‘strdup(*(Operation *)userdata.target_id)’ leaks here; was allocated at [(10)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/9)
#  995|                   if (!key)
#  996|                           return log_oom();
#  997|->                 r = ordered_hashmap_put(map, key, INT_TO_PTR(r));
#  998|                   if (r < 0)
#  999|                           return log_error_errno(r, "Failed to update hashmap: %m");

Error: GCC_ANALYZER_WARNING (CWE-457): [#def310]
systemd-259/src/sysupdate/updatectl.c:1089:28: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘n’
systemd-259/src/sysupdate/updatectl.c:1055:12: enter_function: entry to ‘do_update’
systemd-259/src/sysupdate/updatectl.c:1066:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1067:9: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1067:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1069:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1069:13: call_function: calling ‘parse_targets’ from ‘do_update’
systemd-259/src/sysupdate/updatectl.c:1069:13: return_function: returning to ‘do_update’ from ‘parse_targets’
systemd-259/src/sysupdate/updatectl.c:1070:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1073:15: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1074:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1077:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1078:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1081:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1082:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1085:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1086:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1086:12: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1089:28: danger: use of uninitialized value ‘n’ here
# 1087|                   return log_error_errno(r, "Failed to set up interrupt handler: %m");
# 1088|   
# 1089|->         for (size_t i = 0; i < n; i++) {
# 1090|                   _cleanup_(operation_freep) Operation *op = NULL;
# 1091|                   op = operation_new(map, bus, &remaining, target_paths[i], targets[i]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
systemd-259/src/sysupdate/updatectl.c:1096:21: warning[-Wanalyzer-malloc-leak]: leak of ‘operation_new(ordered_hashmap_new(&string_hash_ops_free), bus, & remaining, *<unknown>, *<unknown>)’
systemd-259/src/sysupdate/updatectl.c:1055:12: enter_function: entry to ‘do_update’
systemd-259/src/sysupdate/updatectl.c:1066:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1067:9: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1067:9: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1069:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1069:13: call_function: calling ‘parse_targets’ from ‘do_update’
systemd-259/src/sysupdate/updatectl.c:1069:13: return_function: returning to ‘do_update’ from ‘parse_targets’
systemd-259/src/sysupdate/updatectl.c:1070:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1073:15: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1074:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1077:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1078:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1081:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1082:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1085:13: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1086:12: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1086:12: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1089:28: branch_true: following ‘true’ branch...
systemd-259/src/sysupdate/updatectl.c:1091:82: branch_true: ...to here
systemd-259/src/sysupdate/updatectl.c:1091:22: call_function: calling ‘operation_new’ from ‘do_update’
systemd-259/src/sysupdate/updatectl.c:1091:22: return_function: returning to ‘do_update’ from ‘operation_new’
systemd-259/src/sysupdate/updatectl.c:1092:20: branch_false: following ‘false’ branch...
systemd-259/src/sysupdate/updatectl.c:1096:21: branch_false: ...to here
systemd-259/src/sysupdate/updatectl.c:1096:21: throw: if ‘bus_match_signal_async’ throws an exception...
systemd-259/src/sysupdate/updatectl.c:1096:21: danger: ‘operation_new(ordered_hashmap_new(&string_hash_ops_free), bus, & remaining, *<unknown>, *<unknown>)’ leaks here; was allocated at [(77)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/76)
# 1094|   
# 1095|                   /* Sign up for notification when the associated job finishes */
# 1096|->                 r = bus_match_signal_async(
# 1097|                                   op->bus, &op->job_finished_slot, bus_sysupdate_mgr, "JobRemoved", update_finished, NULL, op);
# 1098|                   if (r < 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def312]
systemd-259/src/sysv-generator/sysv-generator.c:730:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(*__unique_prefix_i21)’
systemd-259/src/sysv-generator/sysv-generator.c:897:12: enter_function: entry to ‘run’
systemd-259/src/sysv-generator/sysv-generator.c:903:12: branch_false: following ‘false’ branch...
systemd-259/src/sysv-generator/sysv-generator.c:908:9: branch_false: ...to here
systemd-259/src/sysv-generator/sysv-generator.c:908:9: branch_false: following ‘false’ branch...
systemd-259/src/sysv-generator/sysv-generator.c:910:13: branch_false: ...to here
systemd-259/src/sysv-generator/sysv-generator.c:911:12: branch_false: following ‘false’ branch...
systemd-259/src/sysv-generator/sysv-generator.c:914:24: branch_false: ...to here
systemd-259/src/sysv-generator/sysv-generator.c:915:12: branch_false: following ‘false’ branch...
systemd-259/src/sysv-generator/sysv-generator.c:918:13: branch_false: ...to here
systemd-259/src/sysv-generator/sysv-generator.c:918:13: call_function: calling ‘enumerate_sysv’ from ‘run’
#  728|                   }
#  729|   
#  730|->                 FOREACH_DIRENT(de, d, log_error_errno(errno, "Failed to enumerate directory %s, ignoring: %m", *path)) {
#  731|                           _cleanup_free_ char *fpath = NULL, *name = NULL;
#  732|                           _cleanup_(sysvstub_freep) SysvStub *service = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def313]
systemd-259/src/test/test-coredump-stacktrace.c:10: error[ctunullpointer]: Null pointer dereference: x
#    8|   __attribute__((noinline))
#    9|   static void baz(int *x) {
#   10|->         *x = rand();
#   11|   }
#   12|   

Error: CPPCHECK_WARNING (CWE-476): [#def314]
systemd-259/src/test/test-coredump-stacktrace.c:10: warning[nullPointer]: Possible null pointer dereference: x
#    8|   __attribute__((noinline))
#    9|   static void baz(int *x) {
#   10|->         *x = rand();
#   11|   }
#   12|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
systemd-259/src/test/test-env-util.c:519:25: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(*__unique_prefix_i36, (long unsigned int)(eq - *__unique_prefix_i36_34))’
systemd-259/src/test/test-env-util.c:498:12: branch_true: following ‘true’ branch...
systemd-259/src/test/test-env-util.c:499:44: branch_true: ...to here
systemd-259/src/test/test-env-util.c:503:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-env-util.c:505:21: branch_false: ...to here
systemd-259/src/test/test-env-util.c:506:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-env-util.c:508:17: branch_false: ...to here
systemd-259/src/test/test-env-util.c:510:17: branch_true: following ‘true’ branch...
systemd-259/src/test/test-env-util.c:515:28: branch_false: following ‘false’ branch (when ‘eq’ is non-NULL)...
systemd-259/src/test/test-env-util.c:518:41: branch_false: ...to here
systemd-259/src/test/test-env-util.c:518:29: acquire_memory: allocated here
systemd-259/src/test/test-env-util.c:519:25: branch_false: following ‘false’ branch...
systemd-259/src/test/test-env-util.c:521:40: branch_false: ...to here
systemd-259/src/test/test-env-util.c:522:25: branch_true: following ‘true’ branch...
systemd-259/src/test/test-env-util.c:522:25: branch_true: ...to here
systemd-259/src/test/test-env-util.c:522:25: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/test/test-env-util.c:519:25: danger: ‘strndup(*__unique_prefix_i36, (long unsigned int)(eq - *__unique_prefix_i36_34))’ leaks here; was allocated at [(12)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/11)
#  517|   
#  518|                           n = strndup(*e, eq - *e);
#  519|->                         assert_se(n);
#  520|   
#  521|                           copy1 = strdup(eq + 1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def316]
systemd-259/src/test/test-fd-util.c:59:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 524288)’
systemd-259/src/test/test-fd-util.c:55:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:56:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:56:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:59:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:59:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:59:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:61:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:61:9: throw: if ‘fd_validate’ throws an exception...
systemd-259/src/test/test-fd-util.c:59:9: danger: ‘open("/dev/null", 524288)’ leaks here; was opened at [(5)](sarif:/runs/0/results/64/codeFlows/0/threadFlows/0/locations/4)
#   57|   
#   58|           _cleanup_close_ int b = -EBADF;
#   59|->         assert_se((b = open("/dev/null", O_RDONLY|O_CLOEXEC)) >= 0);
#   60|   
#   61|           assert_se(fd_validate(b) == 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def317]
systemd-259/src/test/test-fd-util.c:73:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/bin/sh", 524288)’
systemd-259/src/test/test-fd-util.c:71:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:72:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:72:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:73:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:73:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:73:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:74:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:74:9: throw: if ‘fcntl’ throws an exception...
systemd-259/src/test/test-fd-util.c:73:9: danger: ‘open("/bin/sh", 524288)’ leaks here; was opened at [(6)](sarif:/runs/0/results/65/codeFlows/0/threadFlows/0/locations/5)
#   71|           assert_se(pipe2(p, O_CLOEXEC) >= 0);
#   72|           assert_se((a = fcntl(p[0], F_DUPFD, 3)) >= 0);
#   73|->         assert_se((b = open("/bin/sh", O_RDONLY|O_CLOEXEC)) >= 0);
#   74|           assert_se((c = fcntl(a, F_DUPFD, 3)) >= 0);
#   75|           assert_se((d = open("/bin/sh", O_RDONLY|O_CLOEXEC|O_PATH)) >= 0); /* O_PATH changes error returns in F_DUPFD_QUERY, let's test explicitly */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def318]
systemd-259/src/test/test-fd-util.c:75:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/bin/sh", 2621440)’
systemd-259/src/test/test-fd-util.c:71:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:72:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:72:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:73:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:73:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:74:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:74:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:75:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:75:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:75:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:76:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:76:9: throw: if ‘fcntl’ throws an exception...
systemd-259/src/test/test-fd-util.c:75:9: danger: ‘open("/bin/sh", 2621440)’ leaks here; was opened at [(10)](sarif:/runs/0/results/78/codeFlows/0/threadFlows/0/locations/9)
#   73|           assert_se((b = open("/bin/sh", O_RDONLY|O_CLOEXEC)) >= 0);
#   74|           assert_se((c = fcntl(a, F_DUPFD, 3)) >= 0);
#   75|->         assert_se((d = open("/bin/sh", O_RDONLY|O_CLOEXEC|O_PATH)) >= 0); /* O_PATH changes error returns in F_DUPFD_QUERY, let's test explicitly */
#   76|           assert_se((e = fcntl(d, F_DUPFD, 3)) >= 0);
#   77|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def319]
systemd-259/src/test/test-fd-util.c:149:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
systemd-259/src/test/test-fd-util.c:145:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:146:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:146:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:148:18: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:148:18: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:149:9: danger: ‘open("/dev/null", 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/79/codeFlows/0/threadFlows/0/locations/4)
#  147|   
#  148|           new_fd = open("/dev/null", O_RDONLY);
#  149|->         assert_se(new_fd == 0);
#  150|   
#  151|           new_fd = fd_move_above_stdio(new_fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def320]
systemd-259/src/test/test-fd-util.c:154:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup(fcntl(0, 0, 3))’
systemd-259/src/test/test-fd-util.c:145:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:146:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:146:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:148:18: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:149:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:151:18: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:152:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:154:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:154:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:154:9: danger: ‘dup(fcntl(0, 0, 3))’ leaks here; was opened at [(9)](sarif:/runs/0/results/80/codeFlows/0/threadFlows/0/locations/8)
#  152|           assert_se(new_fd >= 3);
#  153|   
#  154|->         assert_se(dup(original_stdin) == 0);
#  155|           assert_se(close_nointr(original_stdin) != EBADF);
#  156|           assert_se(close_nointr(new_fd) != EBADF);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def321]
systemd-259/src/test/test-fd-util.c:203:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/full", 524289)’
systemd-259/src/test/test-fd-util.c:164:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:166:12: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:166:12: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:167:38: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:175:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:178:17: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:181:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:182:17: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:182:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:183:24: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:185:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:186:17: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:186:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:187:24: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:189:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:190:17: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:190:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:191:24: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:197:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:198:17: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:198:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:199:17: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:199:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:200:32: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:201:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:203:17: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:203:17: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:203:17: danger: ‘open("/dev/full", 524289)’ leaks here; was opened at [(28)](sarif:/runs/0/results/81/codeFlows/0/threadFlows/0/locations/27)
#  201|                   assert_se(pipe_read_fd >= 3);
#  202|   
#  203|->                 assert_se(open("/dev/full", O_WRONLY|O_CLOEXEC) == 0);
#  204|                   assert_se(memfd_new_and_seal_string("data", "foobar") == 2);
#  205|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def322]
systemd-259/src/test/test-fd-util.c:290:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor
systemd-259/src/test/test-fd-util.c:262:13: enter_function: entry to ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:272:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:274:12: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:288:9: call_function: calling ‘malloc_multiply’ from ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:288:9: return_function: returning to ‘test_close_all_fds_inner’ from ‘malloc_multiply’
systemd-259/src/test/test-fd-util.c:288:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:288:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:289:28: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:290:17: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:290:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:289:39: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:289:28: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:290:17: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:290:17: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:290:17: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:290:17: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/test/test-fd-util.c:290:17: danger: leaks here
#  288|           assert_se(fds = new(int, n_fds));
#  289|           for (size_t i = 0; i < n_fds; i += 2)
#  290|->                 assert_se(pipe2(fds + i, O_CLOEXEC) >= 0);
#  291|   
#  292|           /* Validate this worked */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def323]
systemd-259/src/test/test-fd-util.c:293:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
systemd-259/src/test/test-fd-util.c:262:13: enter_function: entry to ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:272:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:274:12: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:288:9: call_function: calling ‘malloc_multiply’ from ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:288:9: return_function: returning to ‘test_close_all_fds_inner’ from ‘malloc_multiply’
systemd-259/src/test/test-fd-util.c:288:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:288:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:289:28: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:290:17: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:290:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:289:39: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:289:28: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:293:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:293:9: call_function: calling ‘validate_fds’ from ‘test_close_all_fds_inner’
systemd-259/src/test/test-fd-util.c:293:9: danger: leaks here
#  291|   
#  292|           /* Validate this worked */
#  293|->         assert_se(validate_fds(true, fds, n_fds) == n_fds);
#  294|   
#  295|           /* Randomized number of fds to keep, but at most every second */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def324]
systemd-259/src/test/test-fd-util.c:491:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/usr/", 589824)’
systemd-259/src/test/test-fd-util.c:490:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:491:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:493:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:493:14: throw: if ‘fcntl’ throws an exception...
systemd-259/src/test/test-fd-util.c:491:9: danger: ‘open("/usr/", 589824)’ leaks here; was opened at [(1)](sarif:/runs/0/results/84/codeFlows/0/threadFlows/0/locations/0)
#  489|           /* Open without O_PATH */
#  490|           fd1 = open("/usr/", O_RDONLY|O_DIRECTORY|O_CLOEXEC);
#  491|->         assert_se(fd1 >= 0);
#  492|   
#  493|           fl = fcntl(fd1, F_GETFL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def325]
systemd-259/src/test/test-fd-util.c:577:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/", 2818048)’
systemd-259/src/test/test-fd-util.c:571:1: enter_function: entry to ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:577:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:577:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:578:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:577:9: danger: ‘open("/", 2818048)’ leaks here; was opened at [(2)](sarif:/runs/0/results/85/codeFlows/0/threadFlows/0/locations/1)
#  575|           assert_se(dir_fd_is_root_or_cwd(AT_FDCWD) > 0);
#  576|   
#  577|->         assert_se((fd = open("/", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW)) >= 0);
#  578|           assert_se(dir_fd_is_root(fd) > 0);
#  579|           assert_se(dir_fd_is_root_or_cwd(fd) > 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def326]
systemd-259/src/test/test-fd-util.c:583:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/usr", 2818048)’
systemd-259/src/test/test-fd-util.c:571:1: enter_function: entry to ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:577:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:578:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:578:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:579:9: call_function: inlined call to ‘dir_fd_is_root_or_cwd’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:579:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:581:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:583:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:583:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:584:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:583:9: danger: ‘open("/usr", 2818048)’ leaks here; was opened at [(10)](sarif:/runs/0/results/86/codeFlows/0/threadFlows/0/locations/9)
#  581|           fd = safe_close(fd);
#  582|   
#  583|->         assert_se((fd = open("/usr", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW)) >= 0);
#  584|           assert_se(dir_fd_is_root(fd) == 0);
#  585|           assert_se(dir_fd_is_root_or_cwd(fd) == 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def327]
systemd-259/src/test/test-fd-util.c:602:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(tmp, 2818048)’
systemd-259/src/test/test-fd-util.c:571:1: enter_function: entry to ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:577:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:578:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:578:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:579:9: call_function: inlined call to ‘dir_fd_is_root_or_cwd’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:579:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:581:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:583:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:584:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:584:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:585:9: call_function: inlined call to ‘dir_fd_is_root_or_cwd’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:585:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:587:13: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:588:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:591:51: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:594:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:595:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:595:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:596:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:596:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:597:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:597:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:598:9: call_function: inlined call to ‘mount_nofollow_verbose’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:598:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:600:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:602:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:602:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:603:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:602:9: danger: ‘open(tmp, 2818048)’ leaks here; was opened at [(31)](sarif:/runs/0/results/87/codeFlows/0/threadFlows/0/locations/30)
#  600|           fd = safe_close(fd);
#  601|   
#  602|->         assert_se((fd = open(tmp, O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW)) >= 0);
#  603|           assert_se(dir_fd_is_root(fd) == 0);
#  604|           assert_se(dir_fd_is_root_or_cwd(fd) == 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def328]
systemd-259/src/test/test-fd-util.c:608:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path_extend_internal(0, tmp, "x", 18446744073709551615), 2818048)’
systemd-259/src/test/test-fd-util.c:571:1: enter_function: entry to ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:577:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:578:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:578:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:579:9: call_function: inlined call to ‘dir_fd_is_root_or_cwd’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:579:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:581:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:583:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:584:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:584:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:585:9: call_function: inlined call to ‘dir_fd_is_root_or_cwd’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:585:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:587:13: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:588:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:591:51: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:594:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:595:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:595:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:596:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:596:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:597:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:597:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:598:9: call_function: inlined call to ‘mount_nofollow_verbose’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:598:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:600:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:602:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:603:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:603:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:604:9: call_function: inlined call to ‘dir_fd_is_root_or_cwd’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:604:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:606:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:608:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:608:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:609:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:608:9: danger: ‘open(path_extend_internal(0, tmp, "x", 18446744073709551615), 2818048)’ leaks here; was opened at [(39)](sarif:/runs/0/results/88/codeFlows/0/threadFlows/0/locations/38)
#  606|           fd = safe_close(fd);
#  607|   
#  608|->         assert_se((fd = open(x, O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW)) >= 0);
#  609|           assert_se(dir_fd_is_root(fd) == 0);
#  610|           assert_se(dir_fd_is_root_or_cwd(fd) == 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def329]
systemd-259/src/test/test-fd-util.c:614:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path_extend_internal(0, tmp, "x/y", 18446744073709551615), 2818048)’
systemd-259/src/test/test-fd-util.c:571:1: enter_function: entry to ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:577:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:578:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:578:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:579:9: call_function: inlined call to ‘dir_fd_is_root_or_cwd’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:579:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:581:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:583:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:584:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:584:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:585:9: call_function: inlined call to ‘dir_fd_is_root_or_cwd’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:585:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:587:13: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:588:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:591:51: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:594:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:595:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:595:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:596:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:596:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:597:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:597:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:598:9: call_function: inlined call to ‘mount_nofollow_verbose’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:598:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:600:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:602:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:603:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:603:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:604:9: call_function: inlined call to ‘dir_fd_is_root_or_cwd’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:604:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:606:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:608:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:609:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:609:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:610:9: call_function: inlined call to ‘dir_fd_is_root_or_cwd’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:610:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:612:14: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:614:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:614:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:615:9: call_function: inlined call to ‘dir_fd_is_root’ from ‘test_dir_fd_is_root’
systemd-259/src/test/test-fd-util.c:614:9: danger: ‘open(path_extend_internal(0, tmp, "x/y", 18446744073709551615), 2818048)’ leaks here; was opened at [(47)](sarif:/runs/0/results/89/codeFlows/0/threadFlows/0/locations/46)
#  612|           fd = safe_close(fd);
#  613|   
#  614|->         assert_se((fd = open(y, O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW)) >= 0);
#  615|           assert_se(dir_fd_is_root(fd) == 0);
#  616|           assert_se(dir_fd_is_root_or_cwd(fd) == 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def330]
systemd-259/src/test/test-fd-util.c:637:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/", 2818048)’
systemd-259/src/test/test-fd-util.c:619:13: enter_function: entry to ‘test_path_is_root_at_one’
systemd-259/src/test/test-fd-util.c:620:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:621:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:622:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:623:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:624:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:625:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:626:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:628:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:629:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:630:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:631:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:632:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:635:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:635:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:637:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:637:9: throw: if ‘path_is_root_at’ throws an exception...
systemd-259/src/test/test-fd-util.c:637:9: danger: ‘open("/", 2818048)’ leaks here; was opened at [(37)](sarif:/runs/0/results/90/codeFlows/0/threadFlows/0/locations/36)
#  635|           ASSERT_OK_ERRNO(fd = open("/", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW));
#  636|   
#  637|->         ASSERT_OK_POSITIVE(path_is_root_at(fd, NULL));
#  638|           ASSERT_OK_POSITIVE(path_is_root_at(fd, ""));
#  639|           ASSERT_OK_POSITIVE(path_is_root_at(fd, "."));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def331]
systemd-259/src/test/test-fd-util.c:662:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/../", 2818048)’
systemd-259/src/test/test-fd-util.c:619:13: enter_function: entry to ‘test_path_is_root_at_one’
systemd-259/src/test/test-fd-util.c:620:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:621:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:622:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:623:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:624:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:625:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:626:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:628:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:629:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:630:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:631:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:632:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:635:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:637:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:637:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:638:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:639:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:640:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:641:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:642:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:643:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:644:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:645:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:646:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:647:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:648:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:650:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:651:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:652:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:653:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:654:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:655:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:656:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:657:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:660:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:660:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:662:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:662:9: throw: if ‘path_is_root_at’ throws an exception...
systemd-259/src/test/test-fd-util.c:662:9: danger: ‘open("/../", 2818048)’ leaks here; was opened at [(79)](sarif:/runs/0/results/91/codeFlows/0/threadFlows/0/locations/78)
#  660|           ASSERT_OK_ERRNO(fd = open("/../", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW));
#  661|   
#  662|->         ASSERT_OK_EQ(path_is_root_at(fd, NULL), expected);
#  663|           ASSERT_OK_EQ(path_is_root_at(fd, ""), expected);
#  664|           ASSERT_OK_EQ(path_is_root_at(fd, "."), expected);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def332]
systemd-259/src/test/test-fd-util.c:751:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/sys", 2818048)’
systemd-259/src/test/test-fd-util.c:750:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:751:15: throw: if ‘open’ throws an exception...
systemd-259/src/test/test-fd-util.c:751:15: danger: ‘open("/sys", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/92/codeFlows/0/threadFlows/0/locations/0)
#  749|   
#  750|           fd1 = open("/sys", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  751|->         fd2 = open("/proc", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  752|           fd3 = open("/proc", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  753|           fd4 = open("/", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def333]
systemd-259/src/test/test-fd-util.c:752:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc", 2818048)’
systemd-259/src/test/test-fd-util.c:751:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:752:15: throw: if ‘open’ throws an exception...
systemd-259/src/test/test-fd-util.c:752:15: danger: ‘open("/proc", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/94/codeFlows/0/threadFlows/0/locations/0)
#  750|           fd1 = open("/sys", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  751|           fd2 = open("/proc", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  752|->         fd3 = open("/proc", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  753|           fd4 = open("/", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  754|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def334]
systemd-259/src/test/test-fd-util.c:752:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/sys", 2818048)’
systemd-259/src/test/test-fd-util.c:750:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:752:15: throw: if ‘open’ throws an exception...
systemd-259/src/test/test-fd-util.c:752:15: danger: ‘open("/sys", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/93/codeFlows/0/threadFlows/0/locations/0)
#  750|           fd1 = open("/sys", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  751|           fd2 = open("/proc", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  752|->         fd3 = open("/proc", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  753|           fd4 = open("/", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  754|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def335]
systemd-259/src/test/test-fd-util.c:753:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc", 2818048)’
systemd-259/src/test/test-fd-util.c:751:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:753:15: throw: if ‘open’ throws an exception...
systemd-259/src/test/test-fd-util.c:753:15: danger: ‘open("/proc", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/96/codeFlows/0/threadFlows/0/locations/0)
#  751|           fd2 = open("/proc", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  752|           fd3 = open("/proc", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  753|->         fd4 = open("/", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  754|   
#  755|           if (fd1 < 0 || fd2 < 0 || fd3 < 0 || fd4 < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def336]
systemd-259/src/test/test-fd-util.c:753:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/sys", 2818048)’
systemd-259/src/test/test-fd-util.c:750:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:753:15: throw: if ‘open’ throws an exception...
systemd-259/src/test/test-fd-util.c:753:15: danger: ‘open("/sys", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/95/codeFlows/0/threadFlows/0/locations/0)
#  751|           fd2 = open("/proc", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  752|           fd3 = open("/proc", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  753|->         fd4 = open("/", O_CLOEXEC|O_PATH|O_DIRECTORY|O_NOFOLLOW);
#  754|   
#  755|           if (fd1 < 0 || fd2 < 0 || fd3 < 0 || fd4 < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def337]
systemd-259/src/test/test-fd-util.c:758:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/", 2818048)’
systemd-259/src/test/test-fd-util.c:753:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:755:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:755:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:758:13: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:758:13: throw: if ‘fds_are_same_mount’ throws an exception...
systemd-259/src/test/test-fd-util.c:758:13: danger: ‘open("/", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/99/codeFlows/0/threadFlows/0/locations/0)
#  756|                   return (void) log_tests_skipped_errno(errno, "Failed to open /sys or /proc or /");
#  757|   
#  758|->         if (fds_are_same_mount(fd1, fd4) > 0 && fds_are_same_mount(fd2, fd4) > 0)
#  759|                   return (void) log_tests_skipped("Cannot test fds_are_same_mount() as /sys and /proc are not mounted");
#  760|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def338]
systemd-259/src/test/test-fd-util.c:758:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc", 2818048)’
systemd-259/src/test/test-fd-util.c:751:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:755:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:755:13: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:755:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:758:13: throw: if ‘fds_are_same_mount’ throws an exception...
systemd-259/src/test/test-fd-util.c:758:13: danger: ‘open("/proc", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/98/codeFlows/0/threadFlows/0/locations/0)
#  756|                   return (void) log_tests_skipped_errno(errno, "Failed to open /sys or /proc or /");
#  757|   
#  758|->         if (fds_are_same_mount(fd1, fd4) > 0 && fds_are_same_mount(fd2, fd4) > 0)
#  759|                   return (void) log_tests_skipped("Cannot test fds_are_same_mount() as /sys and /proc are not mounted");
#  760|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def339]
systemd-259/src/test/test-fd-util.c:758:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/sys", 2818048)’
systemd-259/src/test/test-fd-util.c:750:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:755:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:758:13: throw: if ‘fds_are_same_mount’ throws an exception...
systemd-259/src/test/test-fd-util.c:758:13: danger: ‘open("/sys", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/97/codeFlows/0/threadFlows/0/locations/0)
#  756|                   return (void) log_tests_skipped_errno(errno, "Failed to open /sys or /proc or /");
#  757|   
#  758|->         if (fds_are_same_mount(fd1, fd4) > 0 && fds_are_same_mount(fd2, fd4) > 0)
#  759|                   return (void) log_tests_skipped("Cannot test fds_are_same_mount() as /sys and /proc are not mounted");
#  760|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def340]
systemd-259/src/test/test-fd-util.c:758:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc", 2818048)’
systemd-259/src/test/test-fd-util.c:751:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:755:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:755:13: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:755:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:758:12: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:758:49: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:758:49: throw: if ‘fds_are_same_mount’ throws an exception...
systemd-259/src/test/test-fd-util.c:758:49: danger: ‘open("/proc", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/100/codeFlows/0/threadFlows/0/locations/0)
#  756|                   return (void) log_tests_skipped_errno(errno, "Failed to open /sys or /proc or /");
#  757|   
#  758|->         if (fds_are_same_mount(fd1, fd4) > 0 && fds_are_same_mount(fd2, fd4) > 0)
#  759|                   return (void) log_tests_skipped("Cannot test fds_are_same_mount() as /sys and /proc are not mounted");
#  760|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def341]
systemd-259/src/test/test-fd-util.c:759:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc", 2818048)’
systemd-259/src/test/test-fd-util.c:752:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:755:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:755:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:758:12: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:759:31: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:759:31: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:759:31: throw: if ‘log_internal’ throws an exception...
systemd-259/src/test/test-fd-util.c:759:31: danger: ‘open("/proc", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/101/codeFlows/0/threadFlows/0/locations/0)
#  757|   
#  758|           if (fds_are_same_mount(fd1, fd4) > 0 && fds_are_same_mount(fd2, fd4) > 0)
#  759|->                 return (void) log_tests_skipped("Cannot test fds_are_same_mount() as /sys and /proc are not mounted");
#  760|   
#  761|           assert_se(fds_are_same_mount(fd1, fd2) == 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def342]
systemd-259/src/test/test-fd-util.c:761:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc", 2818048)’
systemd-259/src/test/test-fd-util.c:752:15: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:755:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:755:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:761:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fd-util.c:761:9: branch_true: ...to here
systemd-259/src/test/test-fd-util.c:761:9: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/test/test-fd-util.c:761:9: danger: ‘open("/proc", 2818048)’ leaks here; was opened at [(1)](sarif:/runs/0/results/102/codeFlows/0/threadFlows/0/locations/0)
#  759|                   return (void) log_tests_skipped("Cannot test fds_are_same_mount() as /sys and /proc are not mounted");
#  760|   
#  761|->         assert_se(fds_are_same_mount(fd1, fd2) == 0);
#  762|           assert_se(fds_are_same_mount(fd2, fd3) > 0);
#  763|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def343]
systemd-259/src/test/test-fd-util.c:891:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&name, 524288)’
systemd-259/src/test/test-fd-util.c:885:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:886:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:886:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:887:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:888:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:890:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:890:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:891:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:891:9: throw: if ‘fd_vet_accmode’ throws an exception...
systemd-259/src/test/test-fd-util.c:891:9: danger: ‘open(&name, 524288)’ leaks here; was opened at [(9)](sarif:/runs/0/results/105/codeFlows/0/threadFlows/0/locations/8)
#  889|   
#  890|           ASSERT_OK_ERRNO(fd_ro = open(name, O_RDONLY | O_CLOEXEC));
#  891|->         ASSERT_OK_POSITIVE(fd_vet_accmode(fd_ro, O_RDONLY));
#  892|           ASSERT_ERROR(fd_vet_accmode(fd_ro, O_WRONLY), EPROTOTYPE);
#  893|           ASSERT_ERROR(fd_vet_accmode(fd_ro, O_RDWR), EPROTOTYPE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def344]
systemd-259/src/test/test-fd-util.c:896:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&name, 524289)’
systemd-259/src/test/test-fd-util.c:885:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:886:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:886:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:887:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:888:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:890:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:891:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:891:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:892:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:893:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:895:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:895:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:896:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:896:9: throw: if ‘fd_vet_accmode’ throws an exception...
systemd-259/src/test/test-fd-util.c:896:9: danger: ‘open(&name, 524289)’ leaks here; was opened at [(17)](sarif:/runs/0/results/106/codeFlows/0/threadFlows/0/locations/16)
#  894|   
#  895|           ASSERT_OK_ERRNO(fd_wo = open(name, O_WRONLY | O_CLOEXEC));
#  896|->         ASSERT_ERROR(fd_vet_accmode(fd_wo, O_RDONLY), EPROTOTYPE);
#  897|           ASSERT_OK_POSITIVE(fd_vet_accmode(fd_wo, O_WRONLY));
#  898|           ASSERT_ERROR(fd_vet_accmode(fd_wo, O_RDWR), EPROTOTYPE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def345]
systemd-259/src/test/test-fd-util.c:901:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&name, 2621440)’
systemd-259/src/test/test-fd-util.c:885:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:886:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:886:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:887:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:888:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:890:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:891:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:891:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:892:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:893:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:895:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:896:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:896:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:897:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:898:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:900:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:900:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:901:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:901:9: throw: if ‘fd_vet_accmode’ throws an exception...
systemd-259/src/test/test-fd-util.c:901:9: danger: ‘open(&name, 2621440)’ leaks here; was opened at [(25)](sarif:/runs/0/results/107/codeFlows/0/threadFlows/0/locations/24)
#  899|   
#  900|           ASSERT_OK_ERRNO(fd_opath = open(name, O_PATH | O_CLOEXEC));
#  901|->         ASSERT_ERROR(fd_vet_accmode(fd_opath, O_RDONLY), EBADFD);
#  902|           ASSERT_ERROR(fd_vet_accmode(fd_opath, O_WRONLY), EBADFD);
#  903|           ASSERT_ERROR(fd_vet_accmode(fd_opath, O_RDWR), EBADFD);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def346]
systemd-259/src/test/test-fd-util.c:914:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&name, 524288)’
systemd-259/src/test/test-fd-util.c:910:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:911:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:911:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:913:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:913:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:914:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:914:9: throw: if ‘fd_is_writable’ throws an exception...
systemd-259/src/test/test-fd-util.c:914:9: danger: ‘open(&name, 524288)’ leaks here; was opened at [(5)](sarif:/runs/0/results/108/codeFlows/0/threadFlows/0/locations/4)
#  912|   
#  913|           ASSERT_OK(fd_ro = open(name, O_RDONLY | O_CLOEXEC));
#  914|->         ASSERT_OK_ZERO(fd_is_writable(fd_ro));
#  915|   
#  916|           ASSERT_OK(fd_wo = open(name, O_WRONLY | O_CLOEXEC));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def347]
systemd-259/src/test/test-fd-util.c:917:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&name, 524289)’
systemd-259/src/test/test-fd-util.c:910:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:911:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:911:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:913:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:914:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:914:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:916:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:916:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:917:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:917:9: throw: if ‘fd_is_writable’ throws an exception...
systemd-259/src/test/test-fd-util.c:917:9: danger: ‘open(&name, 524289)’ leaks here; was opened at [(9)](sarif:/runs/0/results/109/codeFlows/0/threadFlows/0/locations/8)
#  915|   
#  916|           ASSERT_OK(fd_wo = open(name, O_WRONLY | O_CLOEXEC));
#  917|->         ASSERT_OK_POSITIVE(fd_is_writable(fd_wo));
#  918|   
#  919|           ASSERT_OK(fd_path = open(name, O_PATH | O_CLOEXEC));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def348]
systemd-259/src/test/test-fd-util.c:920:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&name, 2621440)’
systemd-259/src/test/test-fd-util.c:910:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:911:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:911:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:913:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:914:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:914:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:916:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:917:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:917:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:919:9: acquire_resource: opened here
systemd-259/src/test/test-fd-util.c:919:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fd-util.c:920:9: branch_false: ...to here
systemd-259/src/test/test-fd-util.c:920:9: throw: if ‘fd_is_writable’ throws an exception...
systemd-259/src/test/test-fd-util.c:920:9: danger: ‘open(&name, 2621440)’ leaks here; was opened at [(13)](sarif:/runs/0/results/110/codeFlows/0/threadFlows/0/locations/12)
#  918|   
#  919|           ASSERT_OK(fd_path = open(name, O_PATH | O_CLOEXEC));
#  920|->         ASSERT_OK_ZERO(fd_is_writable(fd_path));
#  921|   
#  922|           ASSERT_SIGNAL(fd_is_writable(-1), SIGABRT);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
systemd-259/src/test/test-fileio.c:76:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopen(mkostemp_safe(&fn), "we")’
systemd-259/src/test/test-fileio.c:66:1: enter_function: entry to ‘test_read_one_line_file’
systemd-259/src/test/test-fileio.c:72:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:74:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:74:9: acquire_memory: allocated here
systemd-259/src/test/test-fileio.c:74:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:76:9: call_function: inlined call to ‘read_one_line_file’ from ‘test_read_one_line_file’
systemd-259/src/test/test-fileio.c:76:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fileio.c:76:9: branch_true: ...to here
systemd-259/src/test/test-fileio.c:76:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/test/test-fileio.c:76:9: danger: ‘fdopen(mkostemp_safe(&fn), "we")’ leaks here; was allocated at [(4)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/3)
#   74|           ASSERT_NOT_NULL(f = fdopen(fd, "we"));
#   75|   
#   76|->         ASSERT_OK_EQ(read_one_line_file(fn, &buf), 0);
#   77|           ASSERT_STREQ(buf, "");
#   78|           ASSERT_OK_EQ(read_one_line_file(fn, &buf2), 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def350]
systemd-259/src/test/test-fileio.c:558:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fn, "we")’
systemd-259/src/test/test-fileio.c:556:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:557:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:557:9: acquire_resource: opened here
systemd-259/src/test/test-fileio.c:557:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:558:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fileio.c:558:9: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/test/test-fileio.c:558:9: danger: ‘fopen(fn, "we")’ leaks here; was opened at [(3)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/2)
#  556|           ASSERT_OK(tempfn_random_child(NULL, NULL, &fn));
#  557|           ASSERT_NOT_NULL(f = fopen(fn, "we"));
#  558|->         ASSERT_EQ(fwrite(buf, 1, sizeof(buf), f), sizeof(buf));
#  559|           ASSERT_OK(fflush_and_check(f));
#  560|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
systemd-259/src/test/test-fileio.c:558:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fn, "we")’
systemd-259/src/test/test-fileio.c:556:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:557:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:557:9: acquire_memory: allocated here
systemd-259/src/test/test-fileio.c:557:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:558:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-fileio.c:558:9: throw: if ‘log_assert_failed’ throws an exception...
systemd-259/src/test/test-fileio.c:558:9: danger: ‘fopen(fn, "we")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/2)
#  556|           ASSERT_OK(tempfn_random_child(NULL, NULL, &fn));
#  557|           ASSERT_NOT_NULL(f = fopen(fn, "we"));
#  558|->         ASSERT_EQ(fwrite(buf, 1, sizeof(buf), f), sizeof(buf));
#  559|           ASSERT_OK(fflush_and_check(f));
#  560|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def352]
systemd-259/src/test/test-fileio.c:559:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fn, "we")’
systemd-259/src/test/test-fileio.c:556:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:557:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:557:9: acquire_resource: opened here
systemd-259/src/test/test-fileio.c:557:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:558:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:559:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:559:9: throw: if ‘fflush_and_check’ throws an exception...
systemd-259/src/test/test-fileio.c:559:9: danger: ‘fopen(fn, "we")’ leaks here; was opened at [(3)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/2)
#  557|           ASSERT_NOT_NULL(f = fopen(fn, "we"));
#  558|           ASSERT_EQ(fwrite(buf, 1, sizeof(buf), f), sizeof(buf));
#  559|->         ASSERT_OK(fflush_and_check(f));
#  560|   
#  561|           ASSERT_OK(read_full_file_full(AT_FDCWD, fn, UINT64_MAX, SIZE_MAX, 0, NULL, &rbuf, &rbuf_size));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
systemd-259/src/test/test-fileio.c:559:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fn, "we")’
systemd-259/src/test/test-fileio.c:556:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:557:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:557:9: acquire_memory: allocated here
systemd-259/src/test/test-fileio.c:557:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:558:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:558:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-fileio.c:559:9: branch_false: ...to here
systemd-259/src/test/test-fileio.c:559:9: throw: if ‘fflush_and_check’ throws an exception...
systemd-259/src/test/test-fileio.c:559:9: danger: ‘fopen(fn, "we")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/2)
#  557|           ASSERT_NOT_NULL(f = fopen(fn, "we"));
#  558|           ASSERT_EQ(fwrite(buf, 1, sizeof(buf), f), sizeof(buf));
#  559|->         ASSERT_OK(fflush_and_check(f));
#  560|   
#  561|           ASSERT_OK(read_full_file_full(AT_FDCWD, fn, UINT64_MAX, SIZE_MAX, 0, NULL, &rbuf, &rbuf_size));

Error: GCC_ANALYZER_WARNING (CWE-404): [#def354]
systemd-259/src/test/test-log.c:99:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
systemd-259/src/test/test-log.c:92:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-log.c:93:30: branch_true: ...to here
systemd-259/src/test/test-log.c:92:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-log.c:95:9: branch_false: ...to here
systemd-259/src/test/test-log.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-log.c:97:9: branch_false: ...to here
systemd-259/src/test/test-log.c:97:9: acquire_resource: ‘va_start’ called here
systemd-259/src/test/test-log.c:99:9: throw: if ‘log_format_iovec’ throws an exception...
systemd-259/src/test/test-log.c:99:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   97|           va_start(ap, format);
#   98|           DISABLE_WARNING_FORMAT_NONLITERAL;
#   99|->         ASSERT_OK(log_format_iovec(iovec, iovec_len, &n, /* newline_separator= */ false, ENOANO, format, ap));
#  100|           REENABLE_WARNING;
#  101|           va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def355]
systemd-259/src/test/test-log.c:117:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
systemd-259/src/test/test-log.c:92:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-log.c:93:30: branch_true: ...to here
systemd-259/src/test/test-log.c:92:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-log.c:95:9: branch_false: ...to here
systemd-259/src/test/test-log.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-log.c:97:9: branch_false: ...to here
systemd-259/src/test/test-log.c:99:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-log.c:101:9: branch_false: ...to here
systemd-259/src/test/test-log.c:103:9: branch_false: following ‘false’ branch (when ‘_expr1 == _expr2’)...
systemd-259/src/test/test-log.c:103:9: branch_false: ...to here
systemd-259/src/test/test-log.c:105:28: branch_false: following ‘false’ branch...
systemd-259/src/test/test-log.c:113:9: branch_false: ...to here
systemd-259/src/test/test-log.c:115:9: acquire_resource: ‘va_start’ called here
systemd-259/src/test/test-log.c:117:9: throw: if ‘log_format_iovec’ throws an exception...
systemd-259/src/test/test-log.c:117:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
#  115|           va_start(ap, format);
#  116|           DISABLE_WARNING_FORMAT_NONLITERAL;
#  117|->         ASSERT_OK(log_format_iovec(iovec, iovec_len, &n, /* newline_separator= */ true, ENOANO, format, ap));
#  118|           REENABLE_WARNING;
#  119|           va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def356]
systemd-259/src/test/test-namespace.c:235:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/kmsg", 524288)’
systemd-259/src/test/test-namespace.c:200:1: enter_function: entry to ‘test_protect_kernel_logs’
systemd-259/src/test/test-namespace.c:209:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:215:13: branch_false: ...to here
systemd-259/src/test/test-namespace.c:215:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:220:13: branch_false: ...to here
systemd-259/src/test/test-namespace.c:221:13: call_function: inlined call to ‘ERRNO_IS_NEG_NOT_SUPPORTED’ from ‘test_protect_kernel_logs’
systemd-259/src/test/test-namespace.c:225:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:227:15: branch_false: ...to here
systemd-259/src/test/test-namespace.c:228:9: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
systemd-259/src/test/test-namespace.c:230:12: branch_false: ...to here
systemd-259/src/test/test-namespace.c:230:12: branch_true: following ‘true’ branch (when ‘pid == 0’)...
systemd-259/src/test/test-namespace.c:233:17: branch_true: ...to here
systemd-259/src/test/test-namespace.c:233:17: acquire_resource: opened here
systemd-259/src/test/test-namespace.c:233:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:235:17: branch_false: ...to here
systemd-259/src/test/test-namespace.c:235:17: throw: if ‘setup_namespace’ throws an exception...
systemd-259/src/test/test-namespace.c:235:17: danger: ‘open("/dev/kmsg", 524288)’ leaks here; was opened at [(15)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/14)
#  233|                   ASSERT_OK_ERRNO(fd = open("/dev/kmsg", O_RDONLY | O_CLOEXEC));
#  234|   
#  235|->                 ASSERT_OK_ZERO(setup_namespace(&p, NULL));
#  236|   
#  237|                   ASSERT_OK_ERRNO(setresuid(UID_NOBODY, UID_NOBODY, UID_NOBODY));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def357]
systemd-259/src/test/test-namespace.c:237:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/kmsg", 524288)’
systemd-259/src/test/test-namespace.c:200:1: enter_function: entry to ‘test_protect_kernel_logs’
systemd-259/src/test/test-namespace.c:209:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:215:13: branch_false: ...to here
systemd-259/src/test/test-namespace.c:215:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:220:13: branch_false: ...to here
systemd-259/src/test/test-namespace.c:221:13: call_function: inlined call to ‘ERRNO_IS_NEG_NOT_SUPPORTED’ from ‘test_protect_kernel_logs’
systemd-259/src/test/test-namespace.c:225:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:227:15: branch_false: ...to here
systemd-259/src/test/test-namespace.c:228:9: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
systemd-259/src/test/test-namespace.c:230:12: branch_false: ...to here
systemd-259/src/test/test-namespace.c:230:12: branch_true: following ‘true’ branch (when ‘pid == 0’)...
systemd-259/src/test/test-namespace.c:233:17: branch_true: ...to here
systemd-259/src/test/test-namespace.c:233:17: acquire_resource: opened here
systemd-259/src/test/test-namespace.c:233:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:235:17: branch_false: ...to here
systemd-259/src/test/test-namespace.c:235:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:237:17: branch_true: following ‘true’ branch (when ‘_result < 0’)...
systemd-259/src/test/test-namespace.c:237:17: branch_true: ...to here
systemd-259/src/test/test-namespace.c:237:17: throw: if ‘errno_name’ throws an exception...
systemd-259/src/test/test-namespace.c:237:17: danger: ‘open("/dev/kmsg", 524288)’ leaks here; was opened at [(15)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/14)
#  235|                   ASSERT_OK_ZERO(setup_namespace(&p, NULL));
#  236|   
#  237|->                 ASSERT_OK_ERRNO(setresuid(UID_NOBODY, UID_NOBODY, UID_NOBODY));
#  238|                   ASSERT_ERROR_ERRNO(open("/dev/kmsg", O_RDONLY | O_CLOEXEC), EACCES);
#  239|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def358]
systemd-259/src/test/test-namespace.c:238:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/kmsg", 524288)’
systemd-259/src/test/test-namespace.c:200:1: enter_function: entry to ‘test_protect_kernel_logs’
systemd-259/src/test/test-namespace.c:209:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:215:13: branch_false: ...to here
systemd-259/src/test/test-namespace.c:215:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:220:13: branch_false: ...to here
systemd-259/src/test/test-namespace.c:221:13: call_function: inlined call to ‘ERRNO_IS_NEG_NOT_SUPPORTED’ from ‘test_protect_kernel_logs’
systemd-259/src/test/test-namespace.c:225:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:227:15: branch_false: ...to here
systemd-259/src/test/test-namespace.c:228:9: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
systemd-259/src/test/test-namespace.c:230:12: branch_false: ...to here
systemd-259/src/test/test-namespace.c:230:12: branch_true: following ‘true’ branch (when ‘pid == 0’)...
systemd-259/src/test/test-namespace.c:233:17: branch_true: ...to here
systemd-259/src/test/test-namespace.c:233:17: acquire_resource: opened here
systemd-259/src/test/test-namespace.c:233:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:235:17: branch_false: ...to here
systemd-259/src/test/test-namespace.c:235:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-namespace.c:237:17: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-namespace.c:238:17: branch_false: ...to here
systemd-259/src/test/test-namespace.c:238:17: throw: if ‘open’ throws an exception...
systemd-259/src/test/test-namespace.c:238:17: danger: ‘open("/dev/kmsg", 524288)’ leaks here; was opened at [(15)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/14)
#  236|   
#  237|                   ASSERT_OK_ERRNO(setresuid(UID_NOBODY, UID_NOBODY, UID_NOBODY));
#  238|->                 ASSERT_ERROR_ERRNO(open("/dev/kmsg", O_RDONLY | O_CLOEXEC), EACCES);
#  239|   
#  240|                   _exit(EXIT_SUCCESS);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def359]
systemd-259/src/test/test-reread-partition-table.c:103:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(p, 526592)’
systemd-259/src/test/test-reread-partition-table.c:45:1: enter_function: entry to ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:48:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:50:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:50:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:52:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:52:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:55:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:57:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:61:34: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:62:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-reread-partition-table.c:66:51: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:75:13: call_function: inlined call to ‘ERRNO_IS_NEG_PRIVILEGE’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: call_function: calling ‘ERRNO_IS_NOT_SUPPORTED’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: return_function: returning to ‘test_rereadpt’ from ‘ERRNO_IS_NOT_SUPPORTED’
systemd-259/src/test/test-reread-partition-table.c:75:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:80:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:85:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:90:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:90:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:96:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:101:9: acquire_resource: opened here
systemd-259/src/test/test-reread-partition-table.c:101:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:102:18: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:103:9: throw: if ‘blockdev_get_device_size’ throws an exception...
systemd-259/src/test/test-reread-partition-table.c:103:9: danger: ‘open(p, 526592)’ leaks here; was opened at [(58)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/57)
#  101|           ASSERT_OK_ERRNO(pfd = open(p, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY));
#  102|           uint64_t size;
#  103|->         ASSERT_OK(blockdev_get_device_size(pfd, &size));
#  104|           ASSERT_EQ(size, 20U*1024U*1024U);
#  105|           pfd = safe_close(pfd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def360]
systemd-259/src/test/test-reread-partition-table.c:127:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(p, 526592)’
systemd-259/src/test/test-reread-partition-table.c:45:1: enter_function: entry to ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:48:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:50:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:50:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:52:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:52:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:55:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:57:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:61:34: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:62:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-reread-partition-table.c:66:51: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:75:13: call_function: inlined call to ‘ERRNO_IS_NEG_PRIVILEGE’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: call_function: calling ‘ERRNO_IS_NOT_SUPPORTED’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: return_function: returning to ‘test_rereadpt’ from ‘ERRNO_IS_NOT_SUPPORTED’
systemd-259/src/test/test-reread-partition-table.c:75:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:80:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:85:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:90:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:90:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:96:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:101:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:102:18: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:103:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: following ‘false’ branch (when ‘_expr1 == 20971520’)...
systemd-259/src/test/test-reread-partition-table.c:105:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:117:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:117:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:122:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:123:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:126:9: acquire_resource: opened here
systemd-259/src/test/test-reread-partition-table.c:126:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:127:9: throw: if ‘blockdev_get_device_size’ throws an exception...
systemd-259/src/test/test-reread-partition-table.c:127:9: danger: ‘open(p, 526592)’ leaks here; was opened at [(94)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/93)
#  125|   
#  126|           ASSERT_OK_ERRNO(pfd = open(p, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY));
#  127|->         ASSERT_OK(blockdev_get_device_size(pfd, &size));
#  128|           ASSERT_EQ(size, 30U*1024U*1024U);
#  129|           pfd = safe_close(pfd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def361]
systemd-259/src/test/test-reread-partition-table.c:136:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(p, 526592)’
systemd-259/src/test/test-reread-partition-table.c:45:1: enter_function: entry to ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:48:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:50:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:50:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:52:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:52:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:55:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:57:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:61:34: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:62:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-reread-partition-table.c:66:51: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:75:13: call_function: inlined call to ‘ERRNO_IS_NEG_PRIVILEGE’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: call_function: calling ‘ERRNO_IS_NOT_SUPPORTED’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: return_function: returning to ‘test_rereadpt’ from ‘ERRNO_IS_NOT_SUPPORTED’
systemd-259/src/test/test-reread-partition-table.c:75:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:80:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:85:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:90:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:90:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:96:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:101:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:102:18: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:103:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: following ‘false’ branch (when ‘_expr1 == 20971520’)...
systemd-259/src/test/test-reread-partition-table.c:105:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:117:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:117:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:122:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:123:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:126:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:128:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:128:9: branch_false: following ‘false’ branch (when ‘_expr1 == 31457280’)...
systemd-259/src/test/test-reread-partition-table.c:129:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:132:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:133:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:133:9: acquire_resource: opened here
systemd-259/src/test/test-reread-partition-table.c:133:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:136:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:136:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-reread-partition-table.c:136:9: branch_true: ...to here
systemd-259/src/test/test-reread-partition-table.c:136:9: throw: if ‘log_internal’ throws an exception...
systemd-259/src/test/test-reread-partition-table.c:136:9: danger: ‘open(p, 526592)’ leaks here; was opened at [(102)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/101)
#  134|   
#  135|           /* Move */
#  136|->         log_notice("MOVING BY 50M");
#  137|           sfdisk(sfdisk_path,
#  138|                  loop,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def362]
systemd-259/src/test/test-reread-partition-table.c:137:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(p, 526592)’
systemd-259/src/test/test-reread-partition-table.c:45:1: enter_function: entry to ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:48:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:50:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:50:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:52:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:52:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:55:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:57:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:61:34: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:62:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-reread-partition-table.c:66:51: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:75:13: call_function: inlined call to ‘ERRNO_IS_NEG_PRIVILEGE’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: call_function: calling ‘ERRNO_IS_NOT_SUPPORTED’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: return_function: returning to ‘test_rereadpt’ from ‘ERRNO_IS_NOT_SUPPORTED’
systemd-259/src/test/test-reread-partition-table.c:75:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:80:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:85:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:90:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:90:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:96:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:101:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:102:18: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:103:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: following ‘false’ branch (when ‘_expr1 == 20971520’)...
systemd-259/src/test/test-reread-partition-table.c:105:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:117:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:117:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:122:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:123:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:126:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:128:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:128:9: branch_false: following ‘false’ branch (when ‘_expr1 == 31457280’)...
systemd-259/src/test/test-reread-partition-table.c:129:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:132:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:133:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:133:9: acquire_resource: opened here
systemd-259/src/test/test-reread-partition-table.c:133:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:136:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:137:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:137:9: danger: ‘open(p, 526592)’ leaks here; was opened at [(102)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/101)
#  135|           /* Move */
#  136|           log_notice("MOVING BY 50M");
#  137|->         sfdisk(sfdisk_path,
#  138|                  loop,
#  139|                  "label: gpt\n"

Error: GCC_ANALYZER_WARNING (CWE-775): [#def363]
systemd-259/src/test/test-reread-partition-table.c:150:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(p, 526592)’
systemd-259/src/test/test-reread-partition-table.c:45:1: enter_function: entry to ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:48:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:50:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:50:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:52:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:52:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:55:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:57:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:61:34: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:62:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-reread-partition-table.c:66:51: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:75:13: call_function: inlined call to ‘ERRNO_IS_NEG_PRIVILEGE’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: call_function: calling ‘ERRNO_IS_NOT_SUPPORTED’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: return_function: returning to ‘test_rereadpt’ from ‘ERRNO_IS_NOT_SUPPORTED’
systemd-259/src/test/test-reread-partition-table.c:75:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:80:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:85:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:90:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:90:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:96:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:101:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:102:18: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:103:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: following ‘false’ branch (when ‘_expr1 == 20971520’)...
systemd-259/src/test/test-reread-partition-table.c:105:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:117:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:117:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:122:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:123:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:126:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:128:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:128:9: branch_false: following ‘false’ branch (when ‘_expr1 == 31457280’)...
systemd-259/src/test/test-reread-partition-table.c:129:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:132:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:133:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:133:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:136:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:137:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:137:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:142:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:143:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:146:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:147:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:149:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:149:15: acquire_resource: opened here
systemd-259/src/test/test-reread-partition-table.c:149:15: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:150:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:150:9: throw: if ‘blockdev_get_device_size’ throws an exception...
systemd-259/src/test/test-reread-partition-table.c:150:9: danger: ‘open(p, 526592)’ leaks here; was opened at [(128)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/127)
#  148|   
#  149|           pfd = ASSERT_OK_ERRNO(open(p, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY));
#  150|->         ASSERT_OK(blockdev_get_device_size(pfd, &size));
#  151|           ASSERT_EQ(size, 15U*1024U*1024U);
#  152|           pfd = safe_close(pfd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def364]
systemd-259/src/test/test-reread-partition-table.c:159:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(p, 526592)’
systemd-259/src/test/test-reread-partition-table.c:45:1: enter_function: entry to ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:48:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:50:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:50:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:52:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:52:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:55:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:57:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:61:34: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:62:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-reread-partition-table.c:66:51: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:75:13: call_function: inlined call to ‘ERRNO_IS_NEG_PRIVILEGE’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: call_function: calling ‘ERRNO_IS_NOT_SUPPORTED’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: return_function: returning to ‘test_rereadpt’ from ‘ERRNO_IS_NOT_SUPPORTED’
systemd-259/src/test/test-reread-partition-table.c:75:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:80:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:85:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:90:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:90:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:96:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:101:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:102:18: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:103:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: following ‘false’ branch (when ‘_expr1 == 20971520’)...
systemd-259/src/test/test-reread-partition-table.c:105:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:117:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:117:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:122:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:123:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:126:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:128:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:128:9: branch_false: following ‘false’ branch (when ‘_expr1 == 31457280’)...
systemd-259/src/test/test-reread-partition-table.c:129:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:132:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:133:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:133:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:136:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:137:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:137:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:142:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:143:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:146:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:147:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:149:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:149:15: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:150:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:150:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:151:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:151:9: branch_false: following ‘false’ branch (when ‘_expr1 == 15728640’)...
systemd-259/src/test/test-reread-partition-table.c:152:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:155:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:156:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:156:15: acquire_resource: opened here
systemd-259/src/test/test-reread-partition-table.c:156:15: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:159:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:159:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-reread-partition-table.c:159:9: branch_true: ...to here
systemd-259/src/test/test-reread-partition-table.c:159:9: throw: if ‘log_internal’ throws an exception...
systemd-259/src/test/test-reread-partition-table.c:159:9: danger: ‘open(p, 526592)’ leaks here; was opened at [(136)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/135)
#  157|   
#  158|           /* Remove */
#  159|->         log_notice("REMOVING");
#  160|           sfdisk(sfdisk_path,
#  161|                  loop,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def365]
systemd-259/src/test/test-reread-partition-table.c:160:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(p, 526592)’
systemd-259/src/test/test-reread-partition-table.c:45:1: enter_function: entry to ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:48:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:50:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:50:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:52:13: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:52:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:55:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:57:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:59:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:61:34: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:62:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:64:9: branch_false: following ‘false’ branch (when ‘_result >= 0’)...
systemd-259/src/test/test-reread-partition-table.c:66:51: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:75:13: call_function: inlined call to ‘ERRNO_IS_NEG_PRIVILEGE’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: call_function: calling ‘ERRNO_IS_NOT_SUPPORTED’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:75:42: return_function: returning to ‘test_rereadpt’ from ‘ERRNO_IS_NOT_SUPPORTED’
systemd-259/src/test/test-reread-partition-table.c:75:13: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:77:12: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:80:30: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:81:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:82:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:85:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:86:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:90:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:90:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:95:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:96:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:98:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:101:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:102:18: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:103:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:104:9: branch_false: following ‘false’ branch (when ‘_expr1 == 20971520’)...
systemd-259/src/test/test-reread-partition-table.c:105:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:108:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:109:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:112:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:113:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:117:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:117:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:122:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:123:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:124:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:126:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:127:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:128:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:128:9: branch_false: following ‘false’ branch (when ‘_expr1 == 31457280’)...
systemd-259/src/test/test-reread-partition-table.c:129:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:132:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:133:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:133:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:136:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:137:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:137:9: return_function: returning to ‘test_rereadpt’ from ‘sfdisk’
systemd-259/src/test/test-reread-partition-table.c:142:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:143:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:146:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:147:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:149:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:149:15: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:150:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:150:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:151:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:151:9: branch_false: following ‘false’ branch (when ‘_expr1 == 15728640’)...
systemd-259/src/test/test-reread-partition-table.c:152:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:155:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:156:15: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:156:15: acquire_resource: opened here
systemd-259/src/test/test-reread-partition-table.c:156:15: branch_false: following ‘false’ branch...
systemd-259/src/test/test-reread-partition-table.c:159:9: branch_false: ...to here
systemd-259/src/test/test-reread-partition-table.c:160:9: call_function: calling ‘sfdisk’ from ‘test_rereadpt’
systemd-259/src/test/test-reread-partition-table.c:160:9: danger: ‘open(p, 526592)’ leaks here; was opened at [(136)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/135)
#  158|           /* Remove */
#  159|           log_notice("REMOVING");
#  160|->         sfdisk(sfdisk_path,
#  161|                  loop,
#  162|                  "label: gpt\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def366]
systemd-259/src/test/test-stdio.c:18:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fn, "r")’
systemd-259/src/test/test-stdio.c:15:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:17:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:17:9: acquire_resource: opened here
systemd-259/src/test/test-stdio.c:17:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:18:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:18:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-stdio.c:18:9: branch_true: ...to here
systemd-259/src/test/test-stdio.c:18:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/test/test-stdio.c:18:9: danger: ‘fopen(&fn, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#   16|   
#   17|           ASSERT_NOT_NULL(f = fopen(fn, "r"));
#   18|->         ASSERT_ERROR_ERRNO(r = putc('a', f), EBADF);
#   19|           ASSERT_EQ(r, EOF);
#   20|           f = safe_fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def367]
systemd-259/src/test/test-stdio.c:18:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fn, "r")’
systemd-259/src/test/test-stdio.c:15:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:17:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:17:9: acquire_memory: allocated here
systemd-259/src/test/test-stdio.c:17:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:18:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:18:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-stdio.c:18:9: branch_true: ...to here
systemd-259/src/test/test-stdio.c:18:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/test/test-stdio.c:18:9: danger: ‘fopen(&fn, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#   16|   
#   17|           ASSERT_NOT_NULL(f = fopen(fn, "r"));
#   18|->         ASSERT_ERROR_ERRNO(r = putc('a', f), EBADF);
#   19|           ASSERT_EQ(r, EOF);
#   20|           f = safe_fclose(f);

Error: CPPCHECK_WARNING (CWE-664): [#def368]
systemd-259/src/test/test-stdio.c:28: error[writeReadOnlyFile]: Write operation on a file that was opened only for reading.
#   26|   
#   27|           ASSERT_NOT_NULL(f = fopen(fn, "r"));
#   28|->         ASSERT_ERROR_ERRNO(r = fputc('a', f), EBADF);
#   29|           ASSERT_EQ(r, EOF);
#   30|           f = safe_fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def369]
systemd-259/src/test/test-stdio.c:28:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fn, "r")’
systemd-259/src/test/test-stdio.c:9:1: enter_function: entry to ‘test_read_only’
systemd-259/src/test/test-stdio.c:15:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:17:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:17:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:18:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:18:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:19:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:20:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:22:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:23:9: call_function: inlined call to ‘putc_unlocked’ from ‘test_read_only’
systemd-259/src/test/test-stdio.c:23:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:24:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:25:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:27:9: acquire_resource: opened here
systemd-259/src/test/test-stdio.c:27:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:28:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:28:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-stdio.c:28:9: branch_true: ...to here
systemd-259/src/test/test-stdio.c:28:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/test/test-stdio.c:28:9: danger: ‘fopen(&fn, "r")’ leaks here; was opened at [(19)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/18)
#   26|   
#   27|           ASSERT_NOT_NULL(f = fopen(fn, "r"));
#   28|->         ASSERT_ERROR_ERRNO(r = fputc('a', f), EBADF);
#   29|           ASSERT_EQ(r, EOF);
#   30|           f = safe_fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def370]
systemd-259/src/test/test-stdio.c:28:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fn, "r")’
systemd-259/src/test/test-stdio.c:9:1: enter_function: entry to ‘test_read_only’
systemd-259/src/test/test-stdio.c:15:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:17:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:17:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:18:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:18:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:19:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:20:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:22:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:23:9: call_function: inlined call to ‘putc_unlocked’ from ‘test_read_only’
systemd-259/src/test/test-stdio.c:23:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:24:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:25:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:27:9: acquire_memory: allocated here
systemd-259/src/test/test-stdio.c:27:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:28:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:28:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-stdio.c:28:9: branch_true: ...to here
systemd-259/src/test/test-stdio.c:28:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/test/test-stdio.c:28:9: danger: ‘fopen(&fn, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/18)
#   26|   
#   27|           ASSERT_NOT_NULL(f = fopen(fn, "r"));
#   28|->         ASSERT_ERROR_ERRNO(r = fputc('a', f), EBADF);
#   29|           ASSERT_EQ(r, EOF);
#   30|           f = safe_fclose(f);

Error: CPPCHECK_WARNING (CWE-664): [#def371]
systemd-259/src/test/test-stdio.c:38: error[writeReadOnlyFile]: Write operation on a file that was opened only for reading.
#   36|   
#   37|           ASSERT_NOT_NULL(f = fopen(fn, "r"));
#   38|->         ASSERT_ERROR_ERRNO(r = fputs("a", f), EBADF);
#   39|           ASSERT_EQ(r, EOF);
#   40|           f = safe_fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def372]
systemd-259/src/test/test-stdio.c:38:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fn, "r")’
systemd-259/src/test/test-stdio.c:9:1: enter_function: entry to ‘test_read_only’
systemd-259/src/test/test-stdio.c:15:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:17:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:17:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:18:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:18:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:19:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:20:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:22:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:23:9: call_function: inlined call to ‘putc_unlocked’ from ‘test_read_only’
systemd-259/src/test/test-stdio.c:23:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:24:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:25:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:27:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:28:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:28:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:29:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:30:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:32:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:33:9: call_function: inlined call to ‘fputc_unlocked’ from ‘test_read_only’
systemd-259/src/test/test-stdio.c:33:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:34:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:35:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:37:9: acquire_resource: opened here
systemd-259/src/test/test-stdio.c:37:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:38:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:38:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-stdio.c:38:9: branch_true: ...to here
systemd-259/src/test/test-stdio.c:38:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/test/test-stdio.c:38:9: danger: ‘fopen(&fn, "r")’ leaks here; was opened at [(34)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/33)
#   36|   
#   37|           ASSERT_NOT_NULL(f = fopen(fn, "r"));
#   38|->         ASSERT_ERROR_ERRNO(r = fputs("a", f), EBADF);
#   39|           ASSERT_EQ(r, EOF);
#   40|           f = safe_fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def373]
systemd-259/src/test/test-stdio.c:38:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fn, "r")’
systemd-259/src/test/test-stdio.c:9:1: enter_function: entry to ‘test_read_only’
systemd-259/src/test/test-stdio.c:15:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:17:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:17:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:18:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:18:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:19:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:20:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:22:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:23:9: call_function: inlined call to ‘putc_unlocked’ from ‘test_read_only’
systemd-259/src/test/test-stdio.c:23:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:24:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:25:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:27:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:28:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:28:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:29:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:30:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:32:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:33:9: call_function: inlined call to ‘fputc_unlocked’ from ‘test_read_only’
systemd-259/src/test/test-stdio.c:33:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:34:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:35:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:37:9: acquire_memory: allocated here
systemd-259/src/test/test-stdio.c:37:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:38:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:38:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-stdio.c:38:9: branch_true: ...to here
systemd-259/src/test/test-stdio.c:38:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/test/test-stdio.c:38:9: danger: ‘fopen(&fn, "r")’ leaks here; was allocated at [(34)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/33)
#   36|   
#   37|           ASSERT_NOT_NULL(f = fopen(fn, "r"));
#   38|->         ASSERT_ERROR_ERRNO(r = fputs("a", f), EBADF);
#   39|           ASSERT_EQ(r, EOF);
#   40|           f = safe_fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def374]
systemd-259/src/test/test-stdio.c:43:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fn, "r")’
systemd-259/src/test/test-stdio.c:9:1: enter_function: entry to ‘test_read_only’
systemd-259/src/test/test-stdio.c:15:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:17:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:17:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:18:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:18:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:19:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:20:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:22:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:23:9: call_function: inlined call to ‘putc_unlocked’ from ‘test_read_only’
systemd-259/src/test/test-stdio.c:23:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:24:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:25:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:27:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:28:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:28:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:29:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:30:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:32:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:33:9: call_function: inlined call to ‘fputc_unlocked’ from ‘test_read_only’
systemd-259/src/test/test-stdio.c:33:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:34:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:35:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:37:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:38:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:38:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:39:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:40:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:42:9: acquire_resource: opened here
systemd-259/src/test/test-stdio.c:42:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:43:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:43:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-stdio.c:43:9: branch_true: ...to here
systemd-259/src/test/test-stdio.c:43:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/test/test-stdio.c:43:9: danger: ‘fopen(&fn, "r")’ leaks here; was opened at [(40)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/39)
#   41|   
#   42|           ASSERT_NOT_NULL(f = fopen(fn, "r"));
#   43|->         ASSERT_ERROR_ERRNO(r = fputs_unlocked("a", f), EBADF);
#   44|           ASSERT_EQ(r, EOF);
#   45|           f = safe_fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def375]
systemd-259/src/test/test-stdio.c:43:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fn, "r")’
systemd-259/src/test/test-stdio.c:9:1: enter_function: entry to ‘test_read_only’
systemd-259/src/test/test-stdio.c:15:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:17:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:17:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:18:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:18:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:19:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:20:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:22:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:23:9: call_function: inlined call to ‘putc_unlocked’ from ‘test_read_only’
systemd-259/src/test/test-stdio.c:23:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:24:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:25:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:27:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:28:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:28:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:29:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:30:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:32:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:33:9: call_function: inlined call to ‘fputc_unlocked’ from ‘test_read_only’
systemd-259/src/test/test-stdio.c:33:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:34:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:35:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:37:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:38:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:38:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:39:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:40:13: branch_false: ...to here
systemd-259/src/test/test-stdio.c:42:9: acquire_memory: allocated here
systemd-259/src/test/test-stdio.c:42:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-stdio.c:43:9: branch_false: ...to here
systemd-259/src/test/test-stdio.c:43:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-stdio.c:43:9: branch_true: ...to here
systemd-259/src/test/test-stdio.c:43:9: throw: if ‘errno_name’ throws an exception...
systemd-259/src/test/test-stdio.c:43:9: danger: ‘fopen(&fn, "r")’ leaks here; was allocated at [(40)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/39)
#   41|   
#   42|           ASSERT_NOT_NULL(f = fopen(fn, "r"));
#   43|->         ASSERT_ERROR_ERRNO(r = fputs_unlocked("a", f), EBADF);
#   44|           ASSERT_EQ(r, EOF);
#   45|           f = safe_fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def376]
systemd-259/src/test/test-sysctl-util.c:33:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*__unique_prefix_i14)’
systemd-259/src/test/test-sysctl-util.c:30:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-sysctl-util.c:33:17: acquire_memory: allocated here
systemd-259/src/test/test-sysctl-util.c:33:17: branch_false: following ‘false’ branch...
systemd-259/src/test/test-sysctl-util.c:34:17: branch_false: ...to here
systemd-259/src/test/test-sysctl-util.c:34:17: throw: if ‘sysctl_normalize’ throws an exception...
systemd-259/src/test/test-sysctl-util.c:33:17: danger: ‘strdup(*__unique_prefix_i14)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   31|                   _cleanup_free_ char *t;
#   32|   
#   33|->                 assert_se(t = strdup(*s));
#   34|                   assert_se(sysctl_normalize(t) == t);
#   35|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def377]
systemd-259/src/test/test-varlink-idl.c:472:34: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(n)’
systemd-259/src/test/test-varlink-idl.c:468:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:469:9: branch_false: ...to here
systemd-259/src/test/test-varlink-idl.c:469:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:471:9: branch_false: ...to here
systemd-259/src/test/test-varlink-idl.c:471:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:472:34: branch_false: ...to here
systemd-259/src/test/test-varlink-idl.c:472:34: acquire_memory: allocated here
systemd-259/src/test/test-varlink-idl.c:472:34: danger: ‘strdup(n)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  470|   
#  471|           assert(symbol->symbol_type == SD_VARLINK_ENUM_TYPE);
#  472|->         _cleanup_free_ char *m = ASSERT_PTR(json_underscorify(strdup(n)));
#  473|   
#  474|           bool found = false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
systemd-259/src/test/test-varlink-idl.c:516:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*f.name)’
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:516:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:516:9: branch_false: ...to here
systemd-259/src/test/test-varlink-idl.c:516:9: acquire_memory: allocated here
systemd-259/src/test/test-varlink-idl.c:516:9: danger: ‘strdup(*f.name)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  514|   
#  515|   TEST(enums_idl) {
#  516|->         TEST_IDL_ENUM(BootEntryType, boot_entry_type, vl_type_BootEntryType);
#  517|           TEST_IDL_ENUM_TO_STRING(BootEntrySource, boot_entry_source, vl_type_BootEntrySource);
#  518|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
systemd-259/src/test/test-varlink-idl.c:519:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*f.name)’
systemd-259/src/test/test-varlink-idl.c:515:1: enter_function: entry to ‘test_enums_idl’
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:516:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:519:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:519:9: acquire_memory: allocated here
systemd-259/src/test/test-varlink-idl.c:519:9: danger: ‘strdup(*f.name)’ leaks here; was allocated at [(13)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/12)
#  517|           TEST_IDL_ENUM_TO_STRING(BootEntrySource, boot_entry_source, vl_type_BootEntrySource);
#  518|   
#  519|->         TEST_IDL_ENUM(PartitionDesignator, partition_designator, vl_type_PartitionDesignator);
#  520|   
#  521|           TEST_IDL_ENUM(LinkAddressState, link_address_state, vl_type_LinkAddressState);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
systemd-259/src/test/test-varlink-idl.c:521:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*f.name)’
systemd-259/src/test/test-varlink-idl.c:515:1: enter_function: entry to ‘test_enums_idl’
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:516:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:521:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:521:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:521:9: acquire_memory: allocated here
systemd-259/src/test/test-varlink-idl.c:521:9: danger: ‘strdup(*f.name)’ leaks here; was allocated at [(15)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/14)
#  519|           TEST_IDL_ENUM(PartitionDesignator, partition_designator, vl_type_PartitionDesignator);
#  520|   
#  521|->         TEST_IDL_ENUM(LinkAddressState, link_address_state, vl_type_LinkAddressState);
#  522|           TEST_IDL_ENUM_TO_STRING(LinkAddressState, link_address_state, vl_type_LinkAddressState);
#  523|           TEST_IDL_ENUM(LinkOnlineState, link_online_state, vl_type_LinkOnlineState);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
systemd-259/src/test/test-varlink-idl.c:523:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*f.name)’
systemd-259/src/test/test-varlink-idl.c:515:1: enter_function: entry to ‘test_enums_idl’
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:516:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:521:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:521:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:522:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:522:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:523:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:523:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:523:9: acquire_memory: allocated here
systemd-259/src/test/test-varlink-idl.c:523:9: danger: ‘strdup(*f.name)’ leaks here; was allocated at [(19)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/18)
#  521|           TEST_IDL_ENUM(LinkAddressState, link_address_state, vl_type_LinkAddressState);
#  522|           TEST_IDL_ENUM_TO_STRING(LinkAddressState, link_address_state, vl_type_LinkAddressState);
#  523|->         TEST_IDL_ENUM(LinkOnlineState, link_online_state, vl_type_LinkOnlineState);
#  524|           TEST_IDL_ENUM_TO_STRING(LinkOnlineState, link_online_state, vl_type_LinkOnlineState);
#  525|           TEST_IDL_ENUM(AddressFamily, link_required_address_family, vl_type_LinkRequiredAddressFamily);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def382]
systemd-259/src/test/test-varlink-idl.c:525:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*f.name)’
systemd-259/src/test/test-varlink-idl.c:515:1: enter_function: entry to ‘test_enums_idl’
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:516:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:521:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:521:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:522:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:522:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:523:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:523:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:524:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:524:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:525:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:525:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:525:9: acquire_memory: allocated here
systemd-259/src/test/test-varlink-idl.c:525:9: danger: ‘strdup(*f.name)’ leaks here; was allocated at [(23)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/22)
#  523|           TEST_IDL_ENUM(LinkOnlineState, link_online_state, vl_type_LinkOnlineState);
#  524|           TEST_IDL_ENUM_TO_STRING(LinkOnlineState, link_online_state, vl_type_LinkOnlineState);
#  525|->         TEST_IDL_ENUM(AddressFamily, link_required_address_family, vl_type_LinkRequiredAddressFamily);
#  526|           TEST_IDL_ENUM_TO_STRING(AddressFamily, link_required_address_family, vl_type_LinkRequiredAddressFamily);
#  527|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
systemd-259/src/test/test-varlink-idl.c:528:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*f.name)’
systemd-259/src/test/test-varlink-idl.c:515:1: enter_function: entry to ‘test_enums_idl’
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:516:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:521:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:521:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:522:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:522:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:523:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:523:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:524:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:524:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:525:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:525:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:526:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:526:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:528:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:528:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:528:9: acquire_memory: allocated here
systemd-259/src/test/test-varlink-idl.c:528:9: danger: ‘strdup(*f.name)’ leaks here; was allocated at [(27)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/26)
#  526|           TEST_IDL_ENUM_TO_STRING(AddressFamily, link_required_address_family, vl_type_LinkRequiredAddressFamily);
#  527|   
#  528|->         TEST_IDL_ENUM(DnsOverTlsMode, dns_over_tls_mode, vl_type_DNSOverTLSMode);
#  529|           TEST_IDL_ENUM(ResolveSupport, resolve_support, vl_type_ResolveSupport);
#  530|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
systemd-259/src/test/test-varlink-idl.c:529:9: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*f.name)’
systemd-259/src/test/test-varlink-idl.c:515:1: enter_function: entry to ‘test_enums_idl’
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:516:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:516:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:517:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:519:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:521:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:521:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:522:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:522:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:523:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:523:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:524:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:524:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:525:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:525:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:526:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:526:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:528:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:528:9: branch_true: ...to here
systemd-259/src/test/test-varlink-idl.c:529:9: branch_true: following ‘true’ branch...
systemd-259/src/test/test-varlink-idl.c:529:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink-idl.c:529:9: acquire_memory: allocated here
systemd-259/src/test/test-varlink-idl.c:529:9: danger: ‘strdup(*f.name)’ leaks here; was allocated at [(29)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/28)
#  527|   
#  528|           TEST_IDL_ENUM(DnsOverTlsMode, dns_over_tls_mode, vl_type_DNSOverTLSMode);
#  529|->         TEST_IDL_ENUM(ResolveSupport, resolve_support, vl_type_ResolveSupport);
#  530|   }
#  531|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
systemd-259/src/test/test-varlink.c:220:17: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(333, 8)’
systemd-259/src/test/test-varlink.c:211:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink.c:213:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink.c:216:9: branch_false: ...to here
systemd-259/src/test/test-varlink.c:216:9: acquire_memory: allocated here
systemd-259/src/test/test-varlink.c:216:9: branch_false: following ‘false’ branch...
systemd-259/src/test/test-varlink.c:216:9: branch_false: ...to here
systemd-259/src/test/test-varlink.c:217:21: branch_true: following ‘true’ branch (when ‘k != 333’)...
systemd-259/src/test/test-varlink.c:218:38: branch_true: ...to here
systemd-259/src/test/test-varlink.c:220:17: throw: if ‘sd_varlink_connect_address’ throws an exception...
systemd-259/src/test/test-varlink.c:220:17: danger: ‘calloc(333, 8)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  218|                   _cleanup_free_ char *t = NULL;
#  219|                   log_debug("connection %zu", k);
#  220|->                 ASSERT_OK(sd_varlink_connect_address(connections + k, address));
#  221|   
#  222|                   ASSERT_OK(asprintf(&t, "flood-%zu", k));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
systemd-259/src/udev/net/link-config.c:1011:24: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(*__unique_prefix_i48, (long unsigned int)(eq - *__unique_prefix_i48_23))’
systemd-259/src/udev/net/link-config.c:991:30: branch_false: following ‘false’ branch...
systemd-259/src/udev/net/link-config.c:992:28: branch_false: following ‘false’ branch...
systemd-259/src/udev/net/link-config.c:995:9: branch_false: ...to here
systemd-259/src/udev/net/link-config.c:999:9: branch_true: following ‘true’ branch...
systemd-259/src/udev/net/link-config.c:1007:23: acquire_memory: allocated here
systemd-259/src/udev/net/link-config.c:1008:20: branch_false: following ‘false’ branch...
systemd-259/src/udev/net/link-config.c:1011:24: branch_false: ...to here
systemd-259/src/udev/net/link-config.c:1011:24: throw: if ‘udev_builtin_add_property’ throws an exception...
systemd-259/src/udev/net/link-config.c:1011:24: danger: ‘strndup(*__unique_prefix_i48, (long unsigned int)(eq - *__unique_prefix_i48_23))’ leaks here; was allocated at [(8)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/7)
# 1009|                           return log_oom();
# 1010|   
# 1011|->                 (void) udev_builtin_add_property(event, key, eq + 1);
# 1012|           }
# 1013|   

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-16.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namesystemd-258-1.fc43
diffbase-store-results-to/tmp/tmp5dt1p1ii/systemd-258-1.fc43.tar.xz
diffbase-time-created2026-01-08 21:49:20
diffbase-time-finished2026-01-08 22:04:05
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp5dt1p1ii/systemd-258-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp5dt1p1ii/systemd-258-1.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-16.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namesystemd-259-1.fc44
store-results-to/tmp/tmpetr41jzv/systemd-259-1.fc44.tar.xz
time-created2026-01-08 22:06:55
time-finished2026-01-08 22:20:46
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpetr41jzv/systemd-259-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpetr41jzv/systemd-259-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9