Fix memory leak during regular expression execution.

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

Commit: ea8c7e9054abf23fa3de2f8e4414f60ac8a8b620
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2014-03-19T15:09:24Z
Releases: 9.4.0
Fix memory leak during regular expression execution.

For a regex containing backrefs, pg_regexec() might fail to free all the
sub-DFAs that were created during execution, resulting in a permanent
(session lifespan) memory leak.  Problem was introduced by me in commit
587359479acbbdc95c8e37da40707e37097423f5.  Per report from Sandro Santilli;
diagnosis by Greg Stark.

Files

PathChange+/−
src/backend/regex/regexec.c modified +1 −0