Fixed findings
List of Findings
Error: CPPCHECK_WARNING (CWE-457): [#def1]
postgresql-18beta1/postgresql-17.2/src/backend/access/gist/gistutil.c:206: error[uninitvar]: Uninitialized variable: &attrsize
Error: CPPCHECK_WARNING (CWE-457): [#def2]
postgresql-18beta1/postgresql-17.2/src/backend/access/gist/gistutil.c:275: error[uninitvar]: Uninitialized variable: &dstsize
Error: COMPILER_WARNING (CWE-457): [#def3]
postgresql-18beta1/postgresql-17.2/src/backend/utils/adt/jsonb_util.c: scope_hint: In function ‘compareJsonbContainers’
postgresql-18beta1/postgresql-17.2/src/backend/utils/adt/jsonb_util.c:294:34: warning[-Wmaybe-uninitialized]: ‘va.type’ may be used uninitialized
postgresql-18beta1/postgresql-17.2/src/backend/utils/adt/jsonb_util.c:202:33: note: ‘va’ declared here
Error: COMPILER_WARNING (CWE-457): [#def4]
postgresql-18beta1/postgresql-17.2/src/backend/utils/adt/jsonb_util.c:294:44: warning[-Wmaybe-uninitialized]: ‘vb.type’ may be used uninitialized
postgresql-18beta1/postgresql-17.2/src/backend/utils/adt/jsonb_util.c:203:41: note: ‘vb’ declared here
Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_lz4.c:730:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_lz4.c:717:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_lz4.c:718:22: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_lz4.c:718:22: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_lz4.c:721:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_lz4.c:727:9: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_lz4.c:730:1: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:473:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: acquire_resource: opened here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:478:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: throw: if ‘pg_malloc0’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:473:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:474:22: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:474:22: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:478:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: throw: if ‘pg_malloc0’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:487:37: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:473:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: acquire_resource: opened here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:478:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:485:12: branch_true: following ‘true’ branch...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:487:37: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:487:37: throw: if ‘ZSTD_DStreamInSize’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:487:37: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:487:37: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:473:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:478:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:485:12: branch_true: following ‘true’ branch...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:487:37: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:487:37: throw: if ‘ZSTD_DStreamInSize’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:487:37: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:494:39: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:473:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: acquire_resource: opened here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:478:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:485:12: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:492:18: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:492:17: branch_true: following ‘true’ branch...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:494:39: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:494:39: throw: if ‘ZSTD_CStreamOutSize’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:494:39: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:494:39: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:473:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:478:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:485:12: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:492:18: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:492:17: branch_true: following ‘true’ branch...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:494:39: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:494:39: throw: if ‘ZSTD_CStreamOutSize’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:494:39: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def12]
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:501:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:473:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: acquire_resource: opened here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:478:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:485:12: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:492:18: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:492:17: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:501:17: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:501:17: throw: if ‘pg_log_generic’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:501:17: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:501:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:473:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:476:22: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:478:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:481:42: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:485:12: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:492:18: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:492:17: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:501:17: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:501:17: throw: if ‘pg_log_generic’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/bin/pg_dump/compress_zstd.c:501:17: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:121:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:81:15: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:82:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:84:9: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:121:21: throw: if ‘pg_cryptohash_create’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:121:21: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:171:28: warning[-Wanalyzer-malloc-leak]: leak of ‘shrinkbuf’
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:145:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:148:9: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:158:12: branch_true: following ‘true’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:164:20: branch_false: following ‘false’ branch (when ‘shrinkbuf’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:169:17: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:171:28: throw: if ‘pg_cryptohash_create’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:171:28: danger: ‘shrinkbuf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:21: warning[-Wanalyzer-malloc-leak]: leak of ‘shrinkbuf’
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:145:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:148:9: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:158:12: branch_true: following ‘true’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:164:20: branch_false: following ‘false’ branch (when ‘shrinkbuf’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:169:17: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:172:20: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:21: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:21: throw: if ‘pg_cryptohash_init’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:21: danger: ‘shrinkbuf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:180:25: warning[-Wanalyzer-malloc-leak]: leak of ‘shrinkbuf’
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:145:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:148:9: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:158:12: branch_true: following ‘true’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:164:20: branch_false: following ‘false’ branch (when ‘shrinkbuf’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:169:17: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:172:20: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:21: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:20: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:180:25: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:180:25: throw: if ‘pg_cryptohash_update’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:180:25: danger: ‘shrinkbuf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:181:25: warning[-Wanalyzer-malloc-leak]: leak of ‘shrinkbuf’
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:145:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:148:9: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:158:12: branch_true: following ‘true’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:164:20: branch_false: following ‘false’ branch (when ‘shrinkbuf’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:169:17: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:172:20: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:21: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:20: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:180:25: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:21: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:181:25: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:181:25: throw: if ‘pg_cryptohash_final’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:181:25: danger: ‘shrinkbuf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:184:42: warning[-Wanalyzer-malloc-leak]: leak of ‘shrinkbuf’
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:145:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:148:9: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:158:12: branch_true: following ‘true’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:164:20: branch_false: following ‘false’ branch (when ‘shrinkbuf’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:169:17: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:172:20: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:21: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:184:42: throw: if ‘pg_cryptohash_error’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:184:42: danger: ‘shrinkbuf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:185:25: warning[-Wanalyzer-malloc-leak]: leak of ‘shrinkbuf’
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:145:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:148:9: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:158:12: branch_true: following ‘true’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: branch_true: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:163:29: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:164:20: branch_false: following ‘false’ branch (when ‘shrinkbuf’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:169:17: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:172:20: branch_false: following ‘false’ branch...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:179:21: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:185:25: throw: if ‘pg_cryptohash_free’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:185:25: danger: ‘shrinkbuf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:259:13: warning[-Wanalyzer-malloc-leak]: leak of ‘h’
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:248:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:251:13: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:251:13: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:252:12: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:257:9: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:259:13: throw: if ‘pg_cryptohash_final’ throws an exception...
postgresql-18beta1/postgresql-17.2/src/common/hmac.c:259:13: danger: ‘h’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
postgresql-18beta1/postgresql-17.2/src/interfaces/libpq/fe-protocol3.c:2312:29: warning[-Wanalyzer-malloc-leak]: leak of ‘startpacket’
postgresql-18beta1/postgresql-17.2/src/interfaces/libpq/fe-protocol3.c:2237:1: enter_function: entry to ‘pqBuildStartupPacket3’
postgresql-18beta1/postgresql-17.2/src/interfaces/libpq/fe-protocol3.c:2242:22: call_function: calling ‘build_startup_packet’ from ‘pqBuildStartupPacket3’
postgresql-18beta1/postgresql-17.2/src/interfaces/libpq/fe-protocol3.c:2242:22: return_function: returning to ‘pqBuildStartupPacket3’ from ‘build_startup_packet’
postgresql-18beta1/postgresql-17.2/src/interfaces/libpq/fe-protocol3.c:2243:32: acquire_memory: allocated here
postgresql-18beta1/postgresql-17.2/src/interfaces/libpq/fe-protocol3.c:2244:12: branch_false: following ‘false’ branch (when ‘startpacket’ is non-NULL)...
postgresql-18beta1/postgresql-17.2/src/interfaces/libpq/fe-protocol3.c:2246:22: branch_false: ...to here
postgresql-18beta1/postgresql-17.2/src/interfaces/libpq/fe-protocol3.c:2246:22: call_function: calling ‘build_startup_packet’ from ‘pqBuildStartupPacket3’
Error: CPPCHECK_WARNING (CWE-457): [#def23]
postgresql-18beta1/src/backend/access/gist/gistutil.c:207: error[uninitvar]: Uninitialized variable: &attrsize
Error: CPPCHECK_WARNING (CWE-457): [#def24]
postgresql-18beta1/src/backend/access/gist/gistutil.c:276: error[uninitvar]: Uninitialized variable: &dstsize
Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:307:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:627:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:307:32: warning[-Wanalyzer-malloc-leak]: leak of ‘pcc’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:627:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:334:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:603:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:334:32: warning[-Wanalyzer-malloc-leak]: leak of ‘pcc’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:603:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:361:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:600:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:361:32: warning[-Wanalyzer-malloc-leak]: leak of ‘pcc’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:600:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:397:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:654:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:397:32: warning[-Wanalyzer-malloc-leak]: leak of ‘pcc’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:654:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:424:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:651:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:424:32: warning[-Wanalyzer-malloc-leak]: leak of ‘pcc’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:651:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:451:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:657:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:451:32: warning[-Wanalyzer-malloc-leak]: leak of ‘pcc’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:657:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:478:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:597:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:478:32: warning[-Wanalyzer-malloc-leak]: leak of ‘pcc’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:597:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:505:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:630:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:505:32: warning[-Wanalyzer-malloc-leak]: leak of ‘pcc’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:630:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:532:32: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:648:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
postgresql-18beta1/src/backend/regex/regc_pg_locale.c:532:32: warning[-Wanalyzer-malloc-leak]: leak of ‘pcc’
postgresql-18beta1/src/backend/regex/regc_locale.c:569:1: enter_function: entry to ‘cclasscvec’
postgresql-18beta1/src/backend/regex/regc_locale.c:648:30: call_function: calling ‘pg_ctype_get_cache’ from ‘cclasscvec’
Error: COMPILER_WARNING (CWE-457): [#def43]
postgresql-18beta1/src/backend/utils/adt/jsonb_util.c: scope_hint: In function ‘compareJsonbContainers’
postgresql-18beta1/src/backend/utils/adt/jsonb_util.c:301:34: warning[-Wmaybe-uninitialized]: ‘va.type’ may be used uninitialized
postgresql-18beta1/src/backend/utils/adt/jsonb_util.c:202:33: note: ‘va’ declared here
Error: COMPILER_WARNING (CWE-457): [#def44]
postgresql-18beta1/src/backend/utils/adt/jsonb_util.c:301:44: warning[-Wmaybe-uninitialized]: ‘vb.type’ may be used uninitialized
postgresql-18beta1/src/backend/utils/adt/jsonb_util.c:203:41: note: ‘vb’ declared here
Error: GCC_ANALYZER_WARNING (CWE-457): [#def45]
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:959:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*num_contexts’
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:860:1: enter_function: entry to ‘MemoryContextStatsDetail’
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:876:9: call_function: calling ‘MemoryContextStatsInternal’ from ‘MemoryContextStatsDetail’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
postgresql-18beta1/src/bin/pg_dump/compress_lz4.c:730:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-18beta1/src/bin/pg_dump/compress_lz4.c:717:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
postgresql-18beta1/src/bin/pg_dump/compress_lz4.c:718:22: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_lz4.c:718:22: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/compress_lz4.c:721:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/compress_lz4.c:727:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_lz4.c:730:1: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:475:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:480:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: throw: if ‘pg_malloc0’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:475:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:476:22: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:476:22: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:480:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: throw: if ‘pg_malloc0’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:489:37: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:475:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:480:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:487:12: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:489:37: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:489:37: throw: if ‘ZSTD_DStreamInSize’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:489:37: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:489:37: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:475:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:480:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:487:12: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:489:37: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:489:37: throw: if ‘ZSTD_DStreamInSize’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:489:37: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:496:39: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:475:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:480:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:487:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:494:18: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:494:17: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:496:39: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:496:39: throw: if ‘ZSTD_CStreamOutSize’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:496:39: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:496:39: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:475:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:480:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:487:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:494:18: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:494:17: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:496:39: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:496:39: throw: if ‘ZSTD_CStreamOutSize’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:496:39: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:503:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:475:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:480:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:487:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:494:18: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:494:17: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:503:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:503:17: throw: if ‘pg_log_generic’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:503:17: danger: ‘fp’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:503:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:475:12: branch_false: following ‘false’ branch (when ‘fd < 0’)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:478:22: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:480:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:483:42: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:487:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:494:18: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:494:17: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:503:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:503:17: throw: if ‘pg_log_generic’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/compress_zstd.c:503:17: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:25: throw: if ‘PQntuples’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:25: danger: ‘map_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:25: warning[-Wanalyzer-malloc-leak]: leak of ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:25: throw: if ‘PQntuples’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:25: danger: ‘map_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: warning[-Wanalyzer-file-leak]: leak of FILE ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: throw: if ‘PQgetvalue’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: danger: ‘map_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: warning[-Wanalyzer-malloc-leak]: leak of ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: throw: if ‘PQgetvalue’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: danger: ‘map_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1670:35: warning[-Wanalyzer-file-leak]: leak of FILE ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1670:35: throw: if ‘PQgetvalue’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1670:35: danger: ‘map_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1670:35: warning[-Wanalyzer-malloc-leak]: leak of ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1670:35: throw: if ‘PQgetvalue’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1670:35: danger: ‘map_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: throw: if ‘simple_string_list_member’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: danger: ‘map_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: warning[-Wanalyzer-malloc-leak]: leak of ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: throw: if ‘simple_string_list_member’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: danger: ‘map_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def63]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1681:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:20: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1681:25: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1681:25: throw: if ‘pg_log_generic’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1681:25: danger: ‘map_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1681:25: warning[-Wanalyzer-malloc-leak]: leak of ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:20: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1681:25: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1681:25: throw: if ‘pg_log_generic’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1681:25: danger: ‘map_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1692:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_true: following ‘true’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_true: following ‘true’ branch (when ‘archDumpFormat == 1’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1692:33: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1692:33: throw: if ‘pg_snprintf’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1692:33: danger: ‘map_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1692:33: warning[-Wanalyzer-malloc-leak]: leak of ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_true: following ‘true’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_true: following ‘true’ branch (when ‘archDumpFormat == 1’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1692:33: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1692:33: throw: if ‘pg_snprintf’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1692:33: danger: ‘map_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1694:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_true: following ‘true’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_false: following ‘false’ branch (when ‘archDumpFormat != 1’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1693:33: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1693:33: branch_true: following ‘true’ branch (when ‘archDumpFormat == 3’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1694:33: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1694:33: throw: if ‘pg_snprintf’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1694:33: danger: ‘map_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1694:33: warning[-Wanalyzer-malloc-leak]: leak of ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_true: following ‘true’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_false: following ‘false’ branch (when ‘archDumpFormat != 1’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1693:33: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1693:33: branch_true: following ‘true’ branch (when ‘archDumpFormat == 3’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1694:33: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1694:33: throw: if ‘pg_snprintf’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1694:33: danger: ‘map_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def69]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1696:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_true: following ‘true’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_false: following ‘false’ branch (when ‘archDumpFormat != 1’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1693:33: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1693:33: branch_false: following ‘false’ branch (when ‘archDumpFormat != 3’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1696:33: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1696:33: throw: if ‘pg_snprintf’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1696:33: danger: ‘map_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1696:33: warning[-Wanalyzer-malloc-leak]: leak of ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_true: following ‘true’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_false: following ‘false’ branch (when ‘archDumpFormat != 1’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1693:33: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1693:33: branch_false: following ‘false’ branch (when ‘archDumpFormat != 3’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1696:33: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1696:33: throw: if ‘pg_snprintf’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1696:33: danger: ‘map_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1699:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_true: following ‘true’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1699:25: throw: if ‘pg_fprintf’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1699:25: danger: ‘map_file’ leaks here; was opened at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1699:25: warning[-Wanalyzer-malloc-leak]: leak of ‘map_file’
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1641:12: branch_false: following ‘false’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1653:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1656:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1659:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1662:28: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1663:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1754:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1667:21: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1669:38: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1689:20: branch_true: following ‘true’ branch (when ‘archDumpFormat != 4’)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1691:28: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1699:25: throw: if ‘pg_fprintf’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1699:25: danger: ‘map_file’ leaks here; was allocated at [(5)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/4)
Error: CPPCHECK_WARNING (CWE-457): [#def73]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1977: error[legacyUninitvar]: Uninitialized variable: archDumpFormat
Error: GCC_ANALYZER_WARNING (CWE-775): [#def74]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:869:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1340:16: call_function: calling ‘read_one_statement’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:869:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1340:16: call_function: calling ‘read_one_statement’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def76]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:871:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1340:16: call_function: calling ‘read_one_statement’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:871:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1340:16: call_function: calling ‘read_one_statement’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def78]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:876:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1340:16: call_function: calling ‘read_one_statement’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:876:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1340:16: call_function: calling ‘read_one_statement’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:878:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1340:16: call_function: calling ‘read_one_statement’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:878:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1340:16: call_function: calling ‘read_one_statement’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def82]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1063:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&map_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1037:1: enter_function: entry to ‘get_dbname_oid_list_from_mfile’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:14: call_function: calling ‘file_exists_in_directory’ from ‘get_dbname_oid_list_from_mfile’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:14: return_function: returning to ‘get_dbname_oid_list_from_mfile’ from ‘file_exists_in_directory’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:12: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1055:9: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1058:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1060:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1063:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1063:9: throw: if ‘initStringInfo’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1063:9: danger: ‘fopen(&map_file_path, "r")’ leaks here; was opened at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1063:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&map_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1037:1: enter_function: entry to ‘get_dbname_oid_list_from_mfile’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:14: call_function: calling ‘file_exists_in_directory’ from ‘get_dbname_oid_list_from_mfile’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:14: return_function: returning to ‘get_dbname_oid_list_from_mfile’ from ‘file_exists_in_directory’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:12: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1055:9: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1058:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1060:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1063:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1063:9: throw: if ‘initStringInfo’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1063:9: danger: ‘fopen(&map_file_path, "r")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def84]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1066:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&map_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1037:1: enter_function: entry to ‘get_dbname_oid_list_from_mfile’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:14: call_function: calling ‘file_exists_in_directory’ from ‘get_dbname_oid_list_from_mfile’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:14: return_function: returning to ‘get_dbname_oid_list_from_mfile’ from ‘file_exists_in_directory’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:12: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1055:9: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1058:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1060:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1063:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1066:16: throw: if ‘pg_get_line_buf’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1066:16: danger: ‘fopen(&map_file_path, "r")’ leaks here; was opened at [(9)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1066:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&map_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1037:1: enter_function: entry to ‘get_dbname_oid_list_from_mfile’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:14: call_function: calling ‘file_exists_in_directory’ from ‘get_dbname_oid_list_from_mfile’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:14: return_function: returning to ‘get_dbname_oid_list_from_mfile’ from ‘file_exists_in_directory’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1049:12: branch_true: following ‘true’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1055:9: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1058:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1060:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1063:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1066:16: throw: if ‘pg_get_line_buf’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1066:16: danger: ‘fopen(&map_file_path, "r")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: throw: if ‘initStringInfo’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: danger: ‘fopen(&global_file_path, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: throw: if ‘initStringInfo’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: danger: ‘fopen(&global_file_path, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def88]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1333:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1333:9: throw: if ‘initStringInfo’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1333:9: danger: ‘fopen(&global_file_path, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1333:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1333:9: throw: if ‘initStringInfo’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1333:9: danger: ‘fopen(&global_file_path, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1334:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1334:9: throw: if ‘appendStringInfoString’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1334:9: danger: ‘fopen(&global_file_path, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1334:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1334:9: throw: if ‘appendStringInfoString’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1334:9: danger: ‘fopen(&global_file_path, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def92]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:9: throw: if ‘appendStringInfoString’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:9: danger: ‘fopen(&global_file_path, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:9: throw: if ‘appendStringInfoString’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:9: danger: ‘fopen(&global_file_path, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def94]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:46: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:46: throw: if ‘PQuser’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:46: danger: ‘fopen(&global_file_path, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:46: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:46: throw: if ‘PQuser’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1336:46: danger: ‘fopen(&global_file_path, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def96]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1337:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1337:9: throw: if ‘appendStringInfoChar’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1337:9: danger: ‘fopen(&global_file_path, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1337:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: following ‘false’ branch (when ‘outfile’ is NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1330:9: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1337:9: throw: if ‘appendStringInfoChar’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1337:9: danger: ‘fopen(&global_file_path, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def98]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1390:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_true: following ‘true’ branch (when ‘outfile’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1325:17: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1325:17: call_function: calling ‘copy_or_print_global_file’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1390:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_true: following ‘true’ branch (when ‘outfile’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1325:17: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1325:17: call_function: calling ‘copy_or_print_global_file’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def100]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1400:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_true: following ‘true’ branch (when ‘outfile’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1325:17: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1325:17: call_function: calling ‘copy_or_print_global_file’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1400:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&global_file_path, "r")’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1302:1: enter_function: entry to ‘process_global_sql_commands’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1314:17: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1316:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1323:12: branch_true: following ‘true’ branch (when ‘outfile’ is non-NULL)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1325:17: branch_true: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1325:17: call_function: calling ‘copy_or_print_global_file’ from ‘process_global_sql_commands’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def102]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1400:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘OPF’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1385:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1389:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1390:23: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1392:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1392:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1400:21: throw: if ‘fgetc’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1400:21: danger: ‘OPF’ leaks here; was opened at [(3)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1400:21: warning[-Wanalyzer-malloc-leak]: leak of ‘OPF’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1385:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1389:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1390:23: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1392:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1392:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1400:21: throw: if ‘fgetc’ throws an exception...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1400:21: danger: ‘OPF’ leaks here; was allocated at [(3)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def104]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1408:1: warning[-Wanalyzer-file-leak]: leak of FILE ‘OPF’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1385:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1389:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1390:23: acquire_resource: opened here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1392:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1392:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1406:12: branch_false: following ‘false’ branch (when the strings are equal)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1408:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1408:1: danger: ‘OPF’ leaks here; was opened at [(3)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1408:1: warning[-Wanalyzer-malloc-leak]: leak of ‘OPF’
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1385:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1389:17: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1390:23: acquire_memory: allocated here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1392:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1392:20: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1406:12: branch_false: following ‘false’ branch (when the strings are equal)...
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1408:1: branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1408:1: danger: ‘OPF’ leaks here; was allocated at [(3)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/2)
Error: CPPCHECK_WARNING (CWE-457): [#def106]
postgresql-18beta1/src/bin/psql/tab-complete.in.c:2555: warning[uninitvar]: Uninitialized variable: argarray
Error: CPPCHECK_WARNING (CWE-457): [#def107]
postgresql-18beta1/src/bin/psql/tab-complete.in.c:2605: warning[uninitvar]: Uninitialized variable: argarray
Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:832:38: warning[-Wanalyzer-malloc-leak]: leak of ‘crypt_pwd’
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:806:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:811:13: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:824:45: acquire_memory: allocated here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:825:36: branch_false: following ‘false’ branch (when ‘crypt_pwd’ is non-NULL)...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:831:33: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:832:38: throw: if ‘pg_md5_encrypt’ throws an exception...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:832:38: danger: ‘crypt_pwd’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1372:14: warning[-Wanalyzer-malloc-leak]: leak of ‘crypt_pwd’
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1368:21: acquire_memory: allocated here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1369:12: branch_false: following ‘false’ branch (when ‘crypt_pwd’ is non-NULL)...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1372:14: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1372:14: throw: if ‘pg_md5_encrypt’ throws an exception...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1372:14: danger: ‘crypt_pwd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1485:30: warning[-Wanalyzer-malloc-leak]: leak of ‘crypt_pwd’
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1413:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1416:9: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1419:12: branch_false: following ‘false’ branch (when ‘algorithm’ is non-NULL)...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1461:13: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1468:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1478:18: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1478:17: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1480:29: branch_true: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1480:29: acquire_memory: allocated here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1481:20: branch_true: following ‘true’ branch (when ‘crypt_pwd’ is non-NULL)...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1483:37: branch_true: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1485:30: throw: if ‘pg_md5_encrypt’ throws an exception...
postgresql-18beta1/src/interfaces/libpq/fe-auth.c:1485:30: danger: ‘crypt_pwd’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-688): [#def111]
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:119:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc((long unsigned int)*conn.be_cancel_key_len)’ where non-null expected
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:73:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:77:12: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:77:12: branch_false: following ‘false’ branch (when ‘conn’ is non-NULL)...
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:83:13: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:83:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:90:13: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:90:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:99:9: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:101:12: branch_true: following ‘true’ branch...
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:107:14: branch_true: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:107:12: branch_true: following ‘true’ branch...
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:113:30: branch_true: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:114:12: branch_true: following ‘true’ branch...
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:116:52: branch_true: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:116:45: acquire_memory: this call could return NULL
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:117:20: branch_false: following ‘false’ branch...
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:119:72: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-cancel.c:119:17: danger: argument 1 (‘malloc((long unsigned int)*conn.be_cancel_key_len)’) from [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14) could be NULL where non-null expected
Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
postgresql-18beta1/src/interfaces/libpq/fe-protocol3.c:2388:29: warning[-Wanalyzer-malloc-leak]: leak of ‘startpacket’
postgresql-18beta1/src/interfaces/libpq/fe-protocol3.c:2313:1: enter_function: entry to ‘pqBuildStartupPacket3’
postgresql-18beta1/src/interfaces/libpq/fe-protocol3.c:2318:22: call_function: calling ‘build_startup_packet’ from ‘pqBuildStartupPacket3’
postgresql-18beta1/src/interfaces/libpq/fe-protocol3.c:2318:22: return_function: returning to ‘pqBuildStartupPacket3’ from ‘build_startup_packet’
postgresql-18beta1/src/interfaces/libpq/fe-protocol3.c:2319:32: acquire_memory: allocated here
postgresql-18beta1/src/interfaces/libpq/fe-protocol3.c:2320:12: branch_false: following ‘false’ branch (when ‘startpacket’ is non-NULL)...
postgresql-18beta1/src/interfaces/libpq/fe-protocol3.c:2322:22: branch_false: ...to here
postgresql-18beta1/src/interfaces/libpq/fe-protocol3.c:2322:22: call_function: calling ‘build_startup_packet’ from ‘pqBuildStartupPacket3’
Scan Properties
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.19.1 |
| diffbase-analyzer-version-gcc | 16.0.0 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-181.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | postgresql18-18.1-2.fc44 |
| diffbase-store-results-to | /tmp/tmpk6unkub7/postgresql18-18.1-2.fc44.tar.xz |
| diffbase-time-created | 2026-01-08 20:45:18 |
| diffbase-time-finished | 2026-01-08 21:19:59 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpk6unkub7/postgresql18-18.1-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpk6unkub7/postgresql18-18.1-2.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-181.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | postgresql18-18beta1-4.fc43 |
| store-results-to | /tmp/tmpeu5rmtu7/postgresql18-18beta1-4.fc43.tar.xz |
| time-created | 2026-01-08 20:19:57 |
| time-finished | 2026-01-08 20:44:11 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpeu5rmtu7/postgresql18-18beta1-4.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpeu5rmtu7/postgresql18-18beta1-4.fc43.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |