Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7cb55d2

Browse files
committed
Fix memory leak with pg_regexec
1 parentd222bb4 commit7cb55d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎contrib/tsearch2/ispell/spell.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,11 @@ CheckAffix(const char *word, size_t len, AFFIX * Affix, char flagflags, char *ne
662662
data= (pg_wchar*)palloc((dat_len+1)*sizeof(pg_wchar));
663663
data_len=pg_mb2wchar_with_len(newword,data,dat_len);
664664

665-
if (!(err=pg_regexec(&(Affix->reg),data,dat_len,NULL,1,subs,0)))
665+
if (!(err=pg_regexec(&(Affix->reg),data,dat_len,NULL,1,subs,0))) {
666+
pfree(data);
666667
returnnewword;
668+
}
669+
pfree(data);
667670

668671
returnNULL;
669672
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp