Remove memory leaks in isolationtester.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 2d094486541acd8baee3af7579d4606f78256165
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2021-06-27T16:45:04Z
Releases: 13.4
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.

Files

PathChange+/−
src/test/isolation/isolationtester.c modified +13 −7
src/test/isolation/specscanner.l modified +6 −2