diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-02-27 14:05:55 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-02-27 14:05:55 +0900 |
commit | f903d4da9276b3c44bb28ea705e7eff0e849f6a6 (patch) | |
tree | f9f8a1d059c4bf1e8ac9db7d0869a4e4bfe5b852 /src | |
parent | 7c906c5b46f8189a04e67bc550cba33dd3851b6e (diff) |
pg_amcheck: 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, but one spot in pg_amcheck was
missing that.
Oversight in b859d94c6389.
Author: Ranier Vilela <ranier.vf@gmail.com>
Reviewed-by: vignesh C <vignesh21@gmail.com>
Discussion: https://postgr.es/m/CAEudQArD_nKSnYCNUZiPPsJ2tNXgRmLbXGSOrH1vpOF_XtP0Vg@mail.gmail.com
Discussion: https://postgr.es/m/CAEudQArbTWVSbxq608GRmXJjnNSQ0B6R7CSffNnj2hPWMUsRNg@mail.gmail.com
Backpatch-through: 14
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_amcheck/pg_amcheck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_amcheck/pg_amcheck.c b/src/bin/pg_amcheck/pg_amcheck.c index 0c05cf58bce..8844bfb6a0e 100644 --- a/src/bin/pg_amcheck/pg_amcheck.c +++ b/src/bin/pg_amcheck/pg_amcheck.c @@ -559,7 +559,7 @@ main(int argc, char *argv[]) executeCommand(conn, install_sql, opts.echo); pfree(install_sql); - pfree(schema); + PQfreemem(schema); } /* |