diff options
author | Michael Paquier | 2025-02-27 05:05:51 +0000 |
---|---|---|
committer | Michael Paquier | 2025-02-27 05:05:51 +0000 |
commit | 48e4ae9a0707b22cf874a4e8e531a07077318424 (patch) | |
tree | 745382802d73c9fbf06f7b0649ed107387b68466 | |
parent | 8709dccc793da0c0c6619cafa182c8e67a871154 (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 <[email protected]>
Reviewed-by: vignesh C <[email protected]>
Discussion: https://postgr.es/m/CAEudQArD_nKSnYCNUZiPPsJ2tNXgRmLbXGSOrH1vpOF_XtP0Vg@mail.gmail.com
Discussion: https://postgr.es/m/CAEudQArbTWVSbxq608GRmXJjnNSQ0B6R7CSffNnj2hPWMUsRNg@mail.gmail.com
Backpatch-through: 14
-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 996833ed400..2b1fd566c35 100644 --- a/src/bin/pg_amcheck/pg_amcheck.c +++ b/src/bin/pg_amcheck/pg_amcheck.c @@ -560,7 +560,7 @@ main(int argc, char *argv[]) executeCommand(conn, install_sql, opts.echo); pfree(install_sql); - pfree(schema); + PQfreemem(schema); } /* |