aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-02-28 10:15:29 +0900
committerMichael Paquier <michael@paquier.xyz>2025-02-28 10:15:29 +0900
commit2a083ab807db6d9e2e0e3aa82ee8f6ff9fc44c8d (patch)
treea985ea474713e98a14f31b7ed40aea3053b72236 /src/backend/utils/adt
parent2e4127b6d2d8f3a9d67a21d1905703d5be46970c (diff)
downloadpostgresql-2a083ab807db6d9e2e0e3aa82ee8f6ff9fc44c8d.tar.gz
postgresql-2a083ab807db6d9e2e0e3aa82ee8f6ff9fc44c8d.zip
pg_upgrade: Fix inconsistency in memory freeing
The function in charge of freeing the memory from a result created by PQescapeIdentifier() has to be PQfreemem(), to ensure that both allocation and free come from libpq. One spot in pg_upgrade was not respecting that for pg_database's datlocale (daticulocale in v16) when the collation provider is libc (aka datlocale/daticulocale is NULL) with an allocation done using pg_strdup() and a free with PQfreemem(). The code is changed to always use PQescapeLiteral() when processing the input. Oversight in 9637badd9f92. This commit is similar to 48e4ae9a0707 and 5b94e2753439. Author: Michael Paquier <michael@paquier.xyz> Co-authored-by: Ranier Vilela <ranier.vf@gmail.com> Discussion: https://postgr.es/m/Z601RQxTmIUohdkV@paquier.xyz Backpatch-through: 16
Diffstat (limited to 'src/backend/utils/adt')
0 files changed, 0 insertions, 0 deletions