git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: c302a61) | patch
Remove memory leaks in isolationtester.
2021年6月27日 16:45:04 +0000 (12:45 -0400)
2021年6月27日 16:45:04 +0000 (12:45 -0400)
commit 642c0697c96b9c6ba5d194653a329f7820565f01
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.
src/test/isolation/isolationtester.c diff | blob | blame | history
src/test/isolation/specscanner.l diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /