]> granicus.if.org Git - postgresql/commitdiff
Fix memory leak with pg_regcomp
authorTeodor Sigaev <teodor@sigaev.ru>
Mon, 31 May 2004 13:52:57 +0000 (13:52 +0000)
committerTeodor Sigaev <teodor@sigaev.ru>
Mon, 31 May 2004 13:52:57 +0000 (13:52 +0000)
contrib/tsearch2/ispell/spell.c

index bdcbc588163839b846cb73f07cee39160eef3764..caae1fc5c709b4334308555240a8a8005ac9b688 100644 (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);
                
                err = pg_regcomp(&(Affix->reg), mask, wmasklen, REG_EXTENDED | REG_ICASE | REG_NOSUB);
+               pfree(mask);
                if (err)
                {
                        /* regerror(err, &(Affix->reg), regerrstr, ERRSTRSIZE); */