Skip to content

Commit d222bb4

Browse files
committed
Fix memory leak with pg_regcomp
1 parent a1bd1d7 commit d222bb4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/tsearch2/ispell/spell.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ CheckAffix(const char *word, size_t len, AFFIX * Affix, char flagflags, char *ne
647647
wmasklen = pg_mb2wchar_with_len( Affix->mask, mask, masklen);
648648

649649
err = pg_regcomp(&(Affix->reg), mask, wmasklen, REG_EXTENDED | REG_ICASE | REG_NOSUB);
650+
pfree(mask);
650651
if (err)
651652
{
652653
/* regerror(err, &(Affix->reg), regerrstr, ERRSTRSIZE); */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy