From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove memory leaks in isolationtester.
Date: Sun, 27 Jun 2021 16:45:29 +0000
Message-ID: <E1lxXuT-0005kl-3N@gemulon.postgresql.org> (raw)
Remove memory leaks in isolationtester.
specscanner.l leaked a kilobyte of memory per token of the spec file.
Apparently somebody thought that the introductory code block would be
executed once; but it's once per yylex() call.
A couple of functions in isolationtester.c leaked small amounts of
memory due to not bothering to free one-time allocations. Might
as well improve these so that valgrind gives this program a clean
bill of health. Also get rid of an ugly static variable.
Coverity complained about one of the one-time leaks, which led me
to try valgrind'ing isolationtester, which led to discovery of the
larger leak.
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/7676d95949b1e33c1d20325c0231fc774364136e
Modified Files
--------------
src/test/isolation/isolationtester.c | 20 +++++++++++++-------
src/test/isolation/specscanner.l | 8 ++++++--
2 files changed, 19 insertions(+), 9 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Remove memory leaks in isolationtester.
In-Reply-To: <E1lxXuT-0005kl-3N@gemulon.postgresql.org>
References: <E1lxXuT-0005kl-3N@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox