pgsql: Simplify memory management for regex DFAs a little.

Started by Tom Laneover 5 years ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Simplify memory management for regex DFAs a little.

Coverity complained that functions in regexec.c might leak DFA
storage. It's wrong, but this logic is confusing enough that it's
not so surprising Coverity couldn't make sense of it. Rewrite
in hopes of making it more legible to humans as well as machines.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/190c79884aae540c92f017701726ed69265e2dab

Modified Files
--------------
src/backend/regex/rege_dfa.c | 18 ++++++++++--------
src/backend/regex/regexec.c | 6 +++---
2 files changed, 13 insertions(+), 11 deletions(-)