aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-04-15 15:56:01 +0900
committerMichael Paquier <michael@paquier.xyz>2020-04-15 15:56:01 +0900
commit8f4ee44bcdbcd437f860f2d048125a118335b088 (patch)
tree0ae8e67d78318ba28924beb46faf5faf876ff5df /src
parenta2ac73e7be7adf2a9248d14322d3a5e055ea4fd0 (diff)
downloadpostgresql-8f4ee44bcdbcd437f860f2d048125a118335b088.tar.gz
postgresql-8f4ee44bcdbcd437f860f2d048125a118335b088.zip
Fix minor memory leak in pg_dump
A query used to read default ACL information from the catalogs did not free a set of PQExpBuffer. Oversight in commit e2090d9, so backpatch down to 9.6. Author: Jie Zhang Reviewed-by: Sawada Masahiko Discussion: https://postgr.es/m/05bcbc5857f948efa0b451b85a48ae10@G08CNEXMBPEKD06.g08.fujitsu.local Backpatch-through: 9.6
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index c579227b197..5db4f5761d7 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -9592,6 +9592,11 @@ getDefaultACLs(Archive *fout, int *numDefaultACLs)
racl_subquery->data,
initacl_subquery->data,
initracl_subquery->data);
+
+ destroyPQExpBuffer(acl_subquery);
+ destroyPQExpBuffer(racl_subquery);
+ destroyPQExpBuffer(initacl_subquery);
+ destroyPQExpBuffer(initracl_subquery);
}
else
{