diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-02-12 17:11:43 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-02-12 17:11:43 +0900 |
commit | 5b94e2753439b699b78aacbb53e89bf0e814becc (patch) | |
tree | d8b49c88709d46203d39953c45d224febd1c6343 /src/backend/access/gist/gist.c | |
parent | 1b5841d4615045e48c3a0019e36f91e4e71d0912 (diff) | |
download | postgresql-5b94e2753439b699b78aacbb53e89bf0e814becc.tar.gz postgresql-5b94e2753439b699b78aacbb53e89bf0e814becc.zip |
Fix some inconsistencies with memory freeing in pg_createsubscriber
The correct function documented to free the memory allocated for the
result returned by PQescapeIdentifier() and PQescapeLiteral() is
PQfreemem(). pg_createsubscriber.c relied on pg_free() instead, which
is not incorrect as both do a free() internally, but inconsistent with
the documentation.
While on it, this commit fixes a small memory leak introduced by
4867f8a555ce, as the code of pg_createsubscriber makes this effort.
Author: Ranier Vilela
Reviewed-by: Euler Taveira
Discussion: https://postgr.es/m/CAEudQAp=AW5dJXrGLbC_aZg_9nOo=42W7uLDRONFQE-gcgnkgQ@mail.gmail.com
Backpatch-through: 17
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions