Fixed findings
List of Findings
Error: COMPILER_WARNING (CWE-457): [#def1]
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): [#def2]
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-404): [#def3]
postgresql-18beta1/postgresql-17.2/src/bin/pg_combinebackup/load_manifest.c:234:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
postgresql-18beta1/postgresql-17.2/src/bin/pg_combinebackup/load_manifest.c:233:9: acquire_resource: ‘va_start’ called here
postgresql-18beta1/postgresql-17.2/src/bin/pg_combinebackup/load_manifest.c:234:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
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: 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): [#def5]
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: 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): [#def6]
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: 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): [#def7]
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: 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): [#def8]
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: 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): [#def9]
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: 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): [#def10]
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: 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): [#def11]
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: danger: ‘h’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
Error: CPPCHECK_WARNING (CWE-457): [#def12]
postgresql-18beta1/src/backend/access/gist/gistutil.c:207: error[uninitvar]: Uninitialized variable: &attrsize
Error: CPPCHECK_WARNING (CWE-457): [#def13]
postgresql-18beta1/src/backend/access/gist/gistutil.c:276: error[uninitvar]: Uninitialized variable: &dstsize
Error: COMPILER_WARNING (CWE-457): [#def14]
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): [#def15]
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-476): [#def16]
postgresql-18beta1/src/backend/utils/adt/mcxtfuncs.c:143:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘context’
postgresql-18beta1/src/backend/utils/adt/mcxtfuncs.c:87:43: branch_false: following ‘false’ branch...
postgresql-18beta1/src/backend/utils/adt/mcxtfuncs.c:100:9: branch_false: ...to here
postgresql-18beta1/src/backend/utils/adt/mcxtfuncs.c:124:12: branch_false: following ‘false’ branch (when ‘ident’ is NULL)...
postgresql-18beta1/src/backend/utils/adt/mcxtfuncs.c:141:17: branch_false: ...to here
postgresql-18beta1/src/backend/utils/adt/mcxtfuncs.c:143:16: danger: dereference of NULL ‘context’
Error: GCC_ANALYZER_WARNING (CWE-457): [#def17]
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-476): [#def18]
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1870:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘context’
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1436:1: enter_function: entry to ‘ProcessGetMemoryContextInterrupt’
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1481:9: call_function: calling ‘compute_contexts_count_and_ids’ from ‘ProcessGetMemoryContextInterrupt’
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1481:9: return_function: returning to ‘ProcessGetMemoryContextInterrupt’ from ‘compute_contexts_count_and_ids’
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1548:12: branch_false: following ‘false’ branch...
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1563:20: branch_false: ...to here
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1570:12: branch_false: following ‘false’ branch (when ‘summary == 0’)...
branch_false: ...to here
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1622:9: branch_true: following ‘true’ branch...
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1630:24: call_function: calling ‘compute_context_path’ from ‘ProcessGetMemoryContextInterrupt’
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1630:24: return_function: returning to ‘ProcessGetMemoryContextInterrupt’ from ‘compute_context_path’
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1637:20: branch_true: following ‘true’ branch (when ‘context_id <= 1722’)...
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1640:25: branch_true: ...to here
postgresql-18beta1/src/backend/utils/mmgr/mcxt.c:1640:25: call_function: calling ‘PublishMemoryContext’ from ‘ProcessGetMemoryContextInterrupt’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
postgresql-18beta1/src/bin/pg_dump/compress_lz4.c:727:9: 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:727:9: 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): [#def20]
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: 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): [#def21]
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: 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): [#def22]
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: 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): [#def23]
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: 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): [#def24]
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: 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): [#def25]
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: 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): [#def26]
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: 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): [#def27]
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: 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): [#def28]
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...
branch_false: ...to here
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): [#def29]
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...
branch_false: ...to here
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): [#def30]
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...
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: 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): [#def31]
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...
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: 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): [#def32]
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...
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: 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): [#def33]
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...
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: 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): [#def34]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...to here
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): [#def35]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...to here
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): [#def36]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...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: 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): [#def37]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...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: 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): [#def38]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...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: 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): [#def39]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...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: 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): [#def40]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...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: 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): [#def41]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...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: 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): [#def42]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...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: 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): [#def43]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...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: 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): [#def44]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...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: 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): [#def45]
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...
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:1675:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1679:21: branch_false: ...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: 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): [#def46]
postgresql-18beta1/src/bin/pg_dump/pg_dumpall.c:1977: error[legacyUninitvar]: Uninitialized variable: archDumpFormat
Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
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): [#def48]
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): [#def49]
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): [#def50]
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): [#def51]
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): [#def52]
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): [#def53]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:880:25: 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): [#def54]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:880:25: 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): [#def55]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:881:37: 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): [#def56]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:881:37: 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): [#def57]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:884:41: 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): [#def58]
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:884:41: 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): [#def59]
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: danger: ‘fopen(&map_file_path, "r")’ leaks here; was opened at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
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: danger: ‘fopen(&map_file_path, "r")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
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: danger: ‘fopen(&map_file_path, "r")’ leaks here; was opened at [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
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: danger: ‘fopen(&map_file_path, "r")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def63]
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: danger: ‘fopen(&global_file_path, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
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: danger: ‘fopen(&global_file_path, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
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: danger: ‘fopen(&global_file_path, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
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: danger: ‘fopen(&global_file_path, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
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: 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): [#def68]
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: 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): [#def69]
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: 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): [#def70]
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: 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): [#def71]
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: 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): [#def72]
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: 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): [#def73]
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: 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): [#def74]
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: 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): [#def75]
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): [#def76]
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): [#def77]
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): [#def78]
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): [#def79]
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...
branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1400:21: danger: ‘OPF’ leaks here; was opened at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
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...
branch_false: ...to here
postgresql-18beta1/src/bin/pg_dump/pg_restore.c:1400:21: danger: ‘OPF’ leaks here; was allocated at [(3)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def81]
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...
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/34/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
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...
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/35/codeFlows/0/threadFlows/0/locations/2)
Error: CPPCHECK_WARNING (CWE-457): [#def83]
postgresql-18beta1/src/bin/psql/tab-complete.in.c:2555: warning[uninitvar]: Uninitialized variable: argarray
Error: CPPCHECK_WARNING (CWE-457): [#def84]
postgresql-18beta1/src/bin/psql/tab-complete.in.c:2605: warning[uninitvar]: Uninitialized variable: argarray
Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
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: 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): [#def86]
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: 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): [#def87]
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: danger: ‘crypt_pwd’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
Scan Properties
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.90.0 |
| diffbase-analyzer-version-cppcheck | 2.18.3 |
| diffbase-analyzer-version-gcc | 15.2.1 |
| 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-96.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-gcc-latest-x86_64 |
| diffbase-project-name | postgresql18-18.0-1.fc44 |
| diffbase-store-results-to | /tmp/tmpcf6xl8i0/postgresql18-18.0-1.fc44.tar.xz |
| diffbase-time-created | 2025-10-28 20:19:10 |
| diffbase-time-finished | 2025-10-28 20:50:18 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpcf6xl8i0/postgresql18-18.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpcf6xl8i0/postgresql18-18.0-1.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-96.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-gcc-latest-x86_64 |
| project-name | postgresql18-18beta1-4.fc43 |
| store-results-to | /tmp/tmpdfdnhfjw/postgresql18-18beta1-4.fc43.tar.xz |
| time-created | 2025-10-28 19:46:09 |
| time-finished | 2025-10-28 20:17:46 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpdfdnhfjw/postgresql18-18beta1-4.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpdfdnhfjw/postgresql18-18beta1-4.fc43.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |