pgsql: Simplify memory management for regex DFAs a little.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Simplify memory management for regex DFAs a little.
Date: 2021-02-22 01:29:24
Message-ID: E1lE02O-0004lh-MY@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-02-22 01:45:09 pgsql: Remove outdated reference to RAID spindles.
Previous Message Tom Lane 2021-02-22 00:46:55 pgsql: Fix invalid array access in trgm_regexp.c.