diff options
Diffstat (limited to 'contrib/pg_trgm/trgm_regexp.c')
-rw-r--r-- | contrib/pg_trgm/trgm_regexp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/contrib/pg_trgm/trgm_regexp.c b/contrib/pg_trgm/trgm_regexp.c index 7965a29c9f9..e65e6838230 100644 --- a/contrib/pg_trgm/trgm_regexp.c +++ b/contrib/pg_trgm/trgm_regexp.c @@ -555,15 +555,12 @@ createTrgmNFA(text *text_re, Oid collation, { trg = createTrgmNFAInternal(®ex, graph, rcontext); } - PG_CATCH(); + PG_FINALLY(); { pg_regfree(®ex); - PG_RE_THROW(); } PG_END_TRY(); - pg_regfree(®ex); - /* Clean up all the cruft we created */ MemoryContextSwitchTo(oldcontext); MemoryContextDelete(tmpcontext); |