git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a1bd1d7)
Fix memory leak with pg_regcomp
2004年5月31日 13:52:57 +0000 (13:52 +0000)
2004年5月31日 13:52:57 +0000 (13:52 +0000)

diff --git a/contrib/tsearch2/ispell/spell.c b/contrib/tsearch2/ispell/spell.c
index bdcbc588163839b846cb73f07cee39160eef3764..caae1fc5c709b4334308555240a8a8005ac9b688 100644 (file)
--- 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); */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /