From: Teodor Sigaev Date: Mon, 31 May 2004 13:52:57 +0000 (+0000) Subject: Fix memory leak with pg_regcomp X-Git-Tag: REL8_0_0BETA1~480 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d222bb4d5ec7cf057f318e88992c8c06d5494ca8;p=postgresql Fix memory leak with pg_regcomp --- diff --git a/contrib/tsearch2/ispell/spell.c b/contrib/tsearch2/ispell/spell.c index bdcbc58816..caae1fc5c7 100644 --- a/contrib/tsearch2/ispell/spell.c +++ b/contrib/tsearch2/ispell/spell.c @@ -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); err = pg_regcomp(&(Affix->reg), mask, wmasklen, REG_EXTENDED | REG_ICASE | REG_NOSUB); + pfree(mask); if (err) { /* regerror(err, &(Affix->reg), regerrstr, ERRSTRSIZE); */