1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-08 06:02:22 +03:00

Fix memory leak with pg_regcomp

This commit is contained in:
Teodor Sigaev
2004-05-31 13:52:57 +00:00
parent a1bd1d70d6
commit d222bb4d5e

View File

@@ -647,6 +647,7 @@ CheckAffix(const char *word, size_t len, AFFIX * Affix, char flagflags, char *ne
wmasklen = pg_mb2wchar_with_len( Affix->mask, mask, masklen); wmasklen = pg_mb2wchar_with_len( Affix->mask, mask, masklen);
err = pg_regcomp(&(Affix->reg), mask, wmasklen, REG_EXTENDED | REG_ICASE | REG_NOSUB); err = pg_regcomp(&(Affix->reg), mask, wmasklen, REG_EXTENDED | REG_ICASE | REG_NOSUB);
pfree(mask);
if (err) if (err)
{ {
/* regerror(err, &(Affix->reg), regerrstr, ERRSTRSIZE); */ /* regerror(err, &(Affix->reg), regerrstr, ERRSTRSIZE); */