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:
@@ -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); */
|
||||||
|
Reference in New Issue
Block a user