pg_amcheck: Fix inconsistency in memory freeing
authorMichael Paquier <michael@paquier.xyz>
Thu, 27 Feb 2025 05:05:57 +0000 (14:05 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 27 Feb 2025 05:05:57 +0000 (14:05 +0900)
commit816149dc6bf9dfc1fa6bdb03ef52e1453fef736a
treed390a80c3a9d8cc1c4c89e0bbe00ca84d1bc82c2
parentcc628f66187c56e0bfd1befee298755f7dfbf65e
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: http://postgr.es/m/CAEudQArD_nKSnYCNUZiPPsJ2tNXgRmLbXGSOrH1vpOF_XtP0Vg@mail.gmail.com
Discussion: http://postgr.es/m/CAEudQArbTWVSbxq608GRmXJjnNSQ0B6R7CSffNnj2hPWMUsRNg@mail.gmail.com
Backpatch-through: 14
src/bin/pg_amcheck/pg_amcheck.c