aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/xml.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-03-18 17:54:24 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-03-18 17:54:43 -0400
commitadf27de8eabbf43b049d1a1bb72780e53e8ea863 (patch)
tree13af7240bff1e9910fb9a663c1787bbd9587695c /src/backend/utils/adt/xml.c
parentfc8b39a46eb7132edc0165f23b738a2292ee9ca9 (diff)
downloadpostgresql-adf27de8eabbf43b049d1a1bb72780e53e8ea863.tar.gz
postgresql-adf27de8eabbf43b049d1a1bb72780e53e8ea863.zip
Fix memory leak in printtup.c.
Commit f2dec34e1 changed things so that printtup's output stringinfo buffer was allocated outside the per-row temporary context, not inside it. This creates a need to free that buffer explicitly when the temp context is freed, but that was overlooked. In most cases, this is all happening inside a portal or executor context that will go away shortly anyhow, but that's not always true. Notably, the stringinfo ends up getting leaked when JDBC uses row-at-a-time fetches. For a query that returns wide rows, that adds up after awhile. Per bug #15700 from Matthias Otterbach. Back-patch to v11 where the faulty code was added. Discussion: https://postgr.es/m/15700-8c408321a87d56bb@postgresql.org
Diffstat (limited to 'src/backend/utils/adt/xml.c')
0 files changed, 0 insertions, 0 deletions