aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/arrayutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-03-24 15:13:21 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-03-24 15:13:21 -0400
commit171baf18325e30997123e9d5cf3e1a81e3a3f484 (patch)
treee77502cf196255afafd45f07df50e9240afd809e /src/backend/utils/adt/arrayutils.c
parentcda5f6575306e50136a5f8ce3f76d9b2d772b738 (diff)
downloadpostgresql-171baf18325e30997123e9d5cf3e1a81e3a3f484.tar.gz
postgresql-171baf18325e30997123e9d5cf3e1a81e3a3f484.zip
Avoid double-free in vacuumlo error path.
The code would do "PQclear(res)" twice if lo_unlink failed, evidently due to careless thinking about how far out a "break" would break. Remove the extra PQclear and adjust the loop logic so that we'll fall out of both levels of loop after an error, as was clearly the intent. Spotted by Coverity. I have no idea why it took this long to notice, since the bug has been there since commit 67ccbb080. Accordingly, back-patch to all supported branches.
Diffstat (limited to 'src/backend/utils/adt/arrayutils.c')
0 files changed, 0 insertions, 0 deletions