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

Commit7f857a5

Browse files
committed
Fix memory leak during regular expression execution.
For a regex containing backrefs, pg_regexec() might fail to free all thesub-DFAs that were created during execution, resulting in a permanent(session lifespan) memory leak. Problem was introduced by me in commit5873594. Per report from Sandro Santilli;diagnosis by Greg Stark.
1 parent63817f8 commit7f857a5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/backend/regex/regexec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ pg_regexec(regex_t *re,
259259
/* clean up */
260260
if (v->pmatch!=pmatch&&v->pmatch!=mat)
261261
FREE(v->pmatch);
262+
n= (size_t)v->g->ntree;
262263
for (i=0;i<n;i++)
263264
{
264265
if (v->subdfas[i]!=NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp